order_list = ['rice', 'beef', 'chips', 'pizza', 'pizza', 'yogurt', 'tomato', 'rice', 'beef']
sum = 0
def food_price(food: str, price: int):
global sum
sum += price
print("{0} is {1} dollars".format(food, str(price)))
for food in order_list:
if food == "pizza":
food_price(food, 10)
elif food == "rice":
food_price(food, 2)
elif food == "yogurt":
food_price(food, 5)
else:
food_price(food, 8)
print(sum)