Print Error 13/13


#1

https://www.codecademy.com/courses/learn-python/lessons/a-day-at-the-supermarket/exercises/lets-check-out?action=lesson_resume

This is my code - exercise 10. A Day at the Supermarket (13/13)
shopping_list = [“banana”, “orange”, “apple”]

stock = {
“banana”: 6,
“apple”: 0,
“orange”: 32,
“pear”: 15
}

prices = {
“banana”: 4,
“apple”: 2,
“orange”: 1.5,
“pear”: 3
}

def compute_bill(food):
total = 0
for item in food:
if stock[item] > 0:
total = total + prices[item]
stock[item] = stock[item] - 1
return total

print compute_bill

In the module appears this :

<function compute_bill at 0x7fec90e96ed8>
<function compute_bill at 0x7fec90eaa6e0>
<function compute_bill at 0x7fec90e96ed8>
<function compute_bill at 0x7fec90eaa6e0>
<function compute_bill at 0x7fec90e96ed8>
<function compute_bill at 0x7fec90eaa6e0>
<function compute_bill at 0x7fec90e96ed8>
<function compute_bill at 0x7fec90eaa6e0>
<function compute_bill at 0x7fec90e96ed8>
<function compute_bill at 0x7fec90eaa6e0>
<function compute_bill at 0x7fec90e96ed8>
<function compute_bill at 0x7fec90eaa6e0>
<function compute_bill at 0x7fec90e96ed8>
<function compute_bill at 0x7fec90eaa6e0>
<function compute_bill at 0x7fec90e96ed8>
<function compute_bill at 0x7fec90eaa6e0>
<function compute_bill at 0x7fec90e96ed8>
<function compute_bill at 0x7fec90eaa6e0>
<function compute_bill at 0x7fec90e96ed8>
<function compute_bill at 0x7fec90eaa6e0>
<function compute_bill at 0x7fec90e96ed8>
<function compute_bill at 0x7fec90eaa6e0>
<function compute_bill at 0x7fec90e96ed8>
<function compute_bill at 0x7fec90eaa6e0>
<function compute_bill at 0x7fec90e96ed8>
<function compute_bill at 0x7fec90eaa6e0>
<function compute_bill at 0x7fec90e96ed8>
<function compute_bill at 0x7fec90eaa6e0>

What am I wrong with this exercise?
Thank you

```python

Replace this line with your code.

<do not remove the three backticks above>

#2

print compute_bill

we need () after the name of the function to call that function.


#3

thank you for your answer


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.