CSCI-UA.0004 - Python - Summer 2016 - Nathan Hull
ASSIGNMENT 8
Due: Thursday, August 4th
Write a program which reads in text from the keyboard until an exclamation
mark ('!') is found. (Note that the exclamation mark might not be on the first line of input. It might be many lines down!)
Using a list of integers subscripted (logically) by the letters 'A' through 'Z', count
the number occurrences of each letter (regardless of whether it is upper or
lower case). In a separate, single variable, also count the total number of "other" characters
('.', '?', ' ', '2', etc.). (Note: There are NOT separate counters for every 'other' character, it's just the grand total.)
Print out the count for each letter found (but not for those which where
not found!) Also, print the total count of the non-letter characters.
By inspecting the list, print out the count of the number of vowels, and
the number of consonants.
Finally, print out which letter was found the most times. (Note there may
be more than one letter which has the maximum count attached to it.) Also,
print out which letter (or letters) was found the least number of times, but
make certain to exclude letters which were not found at all.
Hint: Your list will still have subscripts from [0] to [25]. Note that the ORD() of 'A' to 'Z' happens to be 65 to 90.