CJCoding With Joseph
15free / daySign inCreate account

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
Topics:
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.