Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program which reads in text from the keyboard until an exclamation mark ('!') is found. (Note that the exclamation mark might not be

Write a program which reads in text from the keyboard until an exclamation mark ('!') is found. (Note that the exclamation mark mightnotbe 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 whichletterwas 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.























Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

App Inventor

Authors: David Wolber, Hal Abelson

1st Edition

1449397484, 9781449397487

More Books

Students also viewed these Programming questions

Question

Calculate the number of neutrons of 239Pu.

Answered: 1 week ago