Question: In python Write a function named letter_counter that takes a string as a parameter and prints out the number of times each letter (upper- or

 In python Write a function named letter_counter that takes a string

In python Write a function named letter_counter that takes a string as a parameter and prints out the number of times each letter (upper- or lower-case) appears in the string. The letters must be printed alphabetically and in lowercase. Your program should output this: >>> result - letter_counter ("brontasaurus") The letter a is in the string brontasaurus 2 time(s). The letter bis in the string brontasaurus 1 time(s). The letter n is in the string brontasaurus 1 time(s). The letter o is in the string brontasaurus 1 time(s). The letter r is in the string brontasaurus 2 time(s). The letter s is in the string brontasaurus 2 time(s). The letter t is in the string brontasaurus i time(s). The letter u is in the string brontasaurus 2 time(s). >>> print (result) {'b': 1, 'r': 2, 'o': 1, 'n': 1, 't': 1, 'a': 2, 's': 2, 'u': 2)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!