← Back to Dictionaries
Question 291
Sum Per Key
Sum Per Key
The dict sales maps each day to a list of amounts. Print one line per day in the form <day>: <sum> where the sum adds up that day's list with sum, and after the loop print Week: <grand total>, the total of all the days found by adding each day's sum into a running total. Input: none. Output: one line per day in insertion order, then the week line, all whole numbers.
Expected Output:
mon: 7 tue: 5 wed: 6 Week: 18
= newline. The output ends with a newline — print one after the last line.
Hints3 available
Sign in to use hintsTopics:
Dictionaries
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.