Why is My Code Not Passed?


Question about Making a Purchase

so below is the correct code (Codecademy only allows me to insert one image, lol)
def compute_bill(food):
total = 0
for items in food:
return total

and here is mine:

WHY isn’t mine working?

Thanks in advance!

FAQ: Learn Python: A Day at the Supermarket - Making a Purchase

what are the expected values for food?


You might be able to answer that yourself by simply avoiding the term “working” - compare what you expected and what happens instead, the difference is what you need to change. There’s nothing stopping you from adding prints in your code so that you can find out what happens in there.