Unit 3 Task 14: Letter frequency

Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.

Unit 3 Task 14 - Letter frequency

← Unit 3 tasks - Solution


Ask for a single word (or short string). Count how many times each character appears using a dictionary.

Print each character and count. You may use .lower() so A and a count together.

Skills: for char in string, dict .get.