A day at the supermarket


#1

Write your code below!

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

Oops, try again. compute_bill(['banana', 'apple', 'orange', 'pear']) returned 4 instead of 10.5
That is the error i get.Kindly help me out bro


#2

'bro'?

I do not take questions privately.


#3

#4

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