If statement comparison error


#1



https://www.codecademy.com/courses/python-beginner-en-IZ9Ra/2/3?curriculum_id=4f89dab3d788890003000096

I'm getting a syntax error for trying to compare an integer to zero

It should have worked and properly proceded with the code


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:
        if stock[item] > 0
            total += prices[item]
            stock -= 1
    
    return total


#2

at the end of a if there should be a colon:

if stock[item] > 0:

just like you did with your for loop and your function


#3

Perfect! Thanks much