Making a Purchase in A Day at the Supermarket exercise


#1



A Day at the Supermarket ->Making a Puchase #11

Oops, try again. compute_bill(['apple'])
resulted in a NameError: global name 'orices' is not defined

I don't know where is the error. Help me kindly. Thanks in advance


shopping_list = ["banana", "orange", "apple"]

stock = {
    "banana": 6,
    "apple": 0,
    "orange": 32,
    "pear": 15
}
    
prices = {
    "banana": 4,
    "apple": 2,
    "orange": 1.5,
    "pear": 3
}

# Write your code below!
def compute_bill(food):
    total=0
    for item in food:
        total+=orices[item]
    return total


#2

here:

total+=orices[item]

you misspelled prices


#3

Oops.
Yaa. Now it is done

Thank You stetim94

I just overlooked that as the error dialogue box sprang up on that part of the code.
Have a nice day.


#4