Stocking out


I don't really know why it doesn't work

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

It says "Oops, try again. calling compute_bill with a list containing 1 apple, 1 pear and 1 banana resulted in 9 instead of the correct 7"

Thanks a lot for helping



Hello, @cssslayer41527 :slight_smile: . It seems like you've left some parts (that the instructions asked for) out of your block of code. Take a look at them again (the instructions), and if you need further assistance, let me know. :slight_smile:


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