{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

passwords - Password Pat Password Pat is known for making...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 Password Pat -------- --- Password Pat is known for making slick passwords such as @hwl2rt&tk which is derived from the sentence At Hogwarts we love to roast tyrants and tea kettles. by applying the following rules while reading the sentence: (1) On reading a non-special word, output its first letter in lower case. (2) The special words and the single character to output are: and&zero0 or|one1 not!two2 equal=three3 plus+four4 minus-five5 times*six6 slash/seven7 dollar$eight8 percent%nine9 [email protected] for4 ate8 Note these words are recognized even if some of their letters are capitals. (3) On reading space characters, output nothing. ( (4) On reading punctuation, output the punctuation, except on reading a period output nothing. (5) Numbers are not permitted in the sentence (unless spelled out as words). Pat does not limit herself to a single input sentence. For example, the input fairly!squarely!I won? produces the password:f!s!iw?
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Sheet1 Page 2 You are to write a program that will apply Pat's rules to sentences to derive a password.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern