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
6 Antworten
+ 6
i see no print statement🤔
+ 2
you should use your fonction and also print something!
bill = compute_ bill(shopping_list)
print(bill)
+ 2
It is very good for beginner.
+ 1
I can see two best marked answers?
0
thanks :-) it´s often so confusing for a beginner, and i make lot of mistakes.
0
just keep practicing. it's also a good idea to google search "python tips and tricks", you'll be surprised!