Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def pizza_counter():
- global pizza_sold
- pizza_seller = input("Enter employee who sold it")
- pizza_name = input("Enter the pizza to update")
- pizza_amount = int(input("Enter how much by"))
- print(pizza_amount)
- print(pizza_sold)
- pizza_sold[pizza_seller][pizza_name] += pizza_amount
- print(pizza_sold)
- error message = Traceback (most recent call last):
- 10
- File "C:/Users/Nilay - School/PycharmProjects/Pizza-Sales-Counter/main.py", line 56, in <module>
- menu()
- File "C:/Users/Nilay - School/PycharmProjects/Pizza-Sales-Counter/main.py", line 54, in menu
- menu_options[command]()
- File "C:/Users/Nilay - School/PycharmProjects/Pizza-Sales-Counter/main.py", line 40, in pizza_counter
- pizza_sold[pizza_seller][pizza_name] += pizza_amount
- {'John': {'Margarita': {'amount': 0, 'income': 0}, 'Marinara': {'amount': 0, 'income': 0}, 'Pepperoni': {'amount': 0, 'income': 0}, 'Veggie': {'amount': 0, 'income': 0}, 'Chicken': {'amount': 0, 'income': 0}, 'Four cheeses': {'amount': 0, 'income': 0}, 'Hawaiian': {'amount': 0, 'income': 0}}, 'Susan': {'Margarita': {'amount': 0, 'income': 0}, 'Marinara': {'amount': 0, 'income': 0}, 'Pepperoni': {'amount': 0, 'income': 0}, 'Veggie': {'amount': 0, 'income': 0}, 'Chicken': {'amount': 0, 'income': 0}, 'Four cheeses': {'amount': 0, 'income': 0}, 'Hawaiian': {'amount': 0, 'income': 0}}, 'Lauren': {'Margarita': {'amount': 0, 'income': 0}, 'Marinara': {'amount': 0, 'income': 0}, 'Pepperoni': {'amount': 0, 'income': 0}, 'Veggie': {'amount': 0, 'income': 0}, 'Chicken': {'amount': 0, 'income': 0}, 'Four cheeses': {'amount': 0, 'income': 0}, 'Hawaiian': {'amount': 0, 'income': 0}}, 'Alex': {'Margarita': {'amount': 0, 'income': 0}, 'Marinara': {'amount': 0, 'income': 0}, 'Pepperoni': {'amount': 0, 'income': 0}, 'Veggie': {'amount': 0, 'income': 0}, 'Chicken': {'amount': 0, 'income': 0}, 'Four cheeses': {'amount': 0, 'income': 0}, 'Hawaiian': {'amount': 0, 'income': 0}}}
- TypeError: unsupported operand type(s) for +=: 'dict' and 'int'
- Process finished with exit code 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement