Objective
Create a Python program that finds the character that appears most often in a word.
Instructions
- Read a lower-case word, without spaces.
- Count the appearances of each character with a dictionary.
- Show
Most frequent: C (K), whereCis the character andKthe number of times it appears. - If several characters tie for the maximum, show the one that comes first alphabetically.
banana
Most frequent: a (3)
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise