Problem 1: The Weird Widget Company of New York has several stores in New York. Each evening, the corporate office in midtown Manhattan receives sales figures from each store in a list of tuples. Each tuple contains two elements, (store, sales). Write a program that prints the total sales and the average sales for the day. Use a for loop to calculate the total sales and the average sales (try not to use any external libraries!).
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
29 | 30 | 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 1 | 2 |