0

unimportant

but i am just wondering, why nothing is printed out or what is false? sorry for bothering 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: total += prices[item] return total

27th Mar 2020, 7:02 AM
Kath
Kath - avatar
6 Réponses
+ 6
i see no print statement🤔
27th Mar 2020, 7:05 AM
Oma Falk
Oma Falk - avatar
+ 2
you should use your fonction and also print something! bill = compute_ bill(shopping_list) print(bill)
27th Mar 2020, 7:06 AM
John Robotane
John Robotane - avatar
+ 2
It is very good for beginner.
28th Mar 2020, 7:15 AM
Oma Falk
Oma Falk - avatar
+ 1
I can see two best marked answers?
28th Mar 2020, 12:38 PM
Ishmam
Ishmam - avatar
0
thanks :-) it´s often so confusing for a beginner, and i make lot of mistakes.
28th Mar 2020, 7:03 AM
Kath
Kath - avatar
0
just keep practicing. it's also a good idea to google search "python tips and tricks", you'll be surprised!
28th Mar 2020, 7:10 AM
John Robotane
John Robotane - avatar