Question: Create a program, counter.py . You are given a single string argument. Print a dictionary where the keys are composed of each letter from a

Create a program, counter.py. You are given a single string argument. Print a dictionary where the keys are composed of each letter from a word and values are the sum of each letters appearances. The key order should be in the order of the letters appearances.
Example 1- If the word is good, the program should print:
{'g': 1,'o': 2,'d': 1}
Example 2- If the word is onomatopoeia, the program should print:
{'o': 4,'n': 1,'m': 1,'a': 2,'t': 1,'p': 1,'e': 1,'i': 1}

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 Programming Questions!