Traceback (most recent call last):
File "python", line 24, in
File "python", line 21, in compute_bill
TypeError: unsupported operand type(s) for +=: 'int' and 'dict'
I thought by coding
food = [prices]
prices will reflect the prices within the dictionary.
Replace this line with your code. def compute_bill(food): total = 0 for total_price in food: total += total_price return total food = [prices] print compute_bill(food)