[SOLVED] A program which reads in text from the keyboard until an exclamation mark ('!') is found

25.00 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (1 vote)

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.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.