Letter Frequency


It has been said that the most common letter in the English alphabet is the letter "E". In actual messages that is not always the case. In this program you are asked to write a program that will find the most common letter in a message, ignoring upper case or lower case, not counting any nonalphabetic characters such as spaces, commas or numbers. State the number of occurrences of the letter, and if there is a tie, list each letter in the tie in alphabetic order.

DATA11.txt (DATA12.txt for the second try) contains 5 messages on 5 lines. Each message contains 256 characters or less.

Sample Input

Beware the Jabberwock, my son!
the jaws that bite,
and the claws that catch!
Beware the Jujub bird, and shun
This frumious Bandersnatch!

Sample Output

E occur(s) 4 times.
T occur(s) 4 times.
A T occur(s) 4 times.
B E U occur(s) 3 times.
S occur(s) 3 times.
Comments