Due: February 15, 2012 | Points: 100 |
As for all earlier assignments, please put refinements for all your programs into one file called “refinements.txt” or “refinements.pdf”, and error journal entries for all your programs into one file called “errors.txt” or “errors.pdf”.
In the example outputs, what your program outputs is in typewriter font, what the user types is in italicized typewriter font, and the user typing “enter” or “return” is represented by the character “↵”. You don’t need to change the font, use italics, or show the “↵” in your output.
Please enter your string: helloworld↵Submit: Please turn in your program in the file “pala.py”.
Not a palindrome
Please enter your string: abcdedcba↵
Palindrome
Please enter your string: HeLlOwOrlD↵Submit: Please turn in your program in the file “palb.py&trdquo;.
Not a palindrome
Please enter your string: AbCdEeDcBa↵
Palindrome
Please enter your string: AmanaplanacanalPanama↵
Palindrome
Please enter your string: hello, world!↵Submit: Please turn in your program in the file “palc.py”.
Not a palindrome
Please enter your string: A man, a plan, a canal--Panama!↵
Palindrome
Enter your line: gleep sn0rk!↵Your program is to read one input, produce the output, and stop. Notice that the program prints the input in single quotes, and if there is only one digit, vowel, consonant, or other character, it prints the singular of the word “digit”, “vowel”, “consonant”, or “character” as appropriate. As another two examples:
'gleep sn0rk!' has 1 digit, 2 vowels, 7 consonants, and 2 other characters.
Enter your line: 3er,↵Submit: Please turn in your program in the file “count.py”.
'3er,' has 1 digit, 1 vowel, 1 consonant, and 1 other character.
Enter your line: 3er,3ER,↵
'3er,3ER,' has 2 digits, 2 vowels, 2 consonants, and 2 other characters.
ECS 10, Basic Concepts of Computing Winter Quarter 2012 |