about | help | code help+videos | done | prefs |
Write a function firstLetterCount(words) that takes as a parameter a list of strings named words and computes a dictionary D with lower case letters as keys and the number of words in words that begin with that letter as values. Finish your code with the line return [D], i.e. return a list containing D as its only item. firstLetterCount(['ant', 'bee', 'armadillo', 'dog', 'cat']) → [{'a': 2, 'b': 1, 'c': 1, 'd': 1}] firstLetterCount(['All', 'are', 'actually', 'Awesome', 'aye?']) → [{'a': 5}] firstLetterCount(['no', 'Repeated', 'Words', 'Are', 'here']) → [{'a': 1, 'r': 1, 'w': 1, 'h': 1, 'n': 1}] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy