about | help | code help+videos | done | prefs |
divisibilityDict
Create a dictionary that has keys 2,3,5,7,11 each of which has a value that is an empty list. Look at the list of number, and append each number to the lists of the keys that evenly divide the number. You can loop over a dictionary keys using 'for k in dict' / 'for k in dict.keys()' without quotes.
divisibilityDict([6, 30]) → [{2: [6, 30], 3: [6, 30], 5: [30], 7: [], 11: []}] divisibilityDict([]) → [{2: [], 3: [], 5: [], 7: [], 11: []}] divisibilityDict([57]) → [{2: [], 3: [57], 5: [], 7: [], 11: []}] ...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