Making a Purchase..........DONT KNOW WHY ITS NOT WORKING


#1

def compute_bill(food):
total = 0
for item in food:
total += prices[item]
return total

print compute_bill(shopping_list)


#2

@lecrunch,
you will have to use and present the code with the correct indentations....

re-edit your Post

  • leave one blank-line above of your code
  • select your code in the Post
  • then =click= on the </>-symbol-of-this-editor

Your code will then be in a pre-code state
and you will be able to make/present the proper indentations.

or even better use
= http://discuss.codecademy.com/t/using-backticks-to-format-your-code/3697
[extra's]
https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet