Build a Kitchen Inventory Tracker - Step 14

Tell us what’s happening:

Hello there,
I am stuck at this step I am afraid. I tried finding answers with socractes and in the forum. But I am lost.
To my understanding the error code does not make sense since the if statement is in the function.

Your code so far

available_eggs = 1
available_flour = 2
available_sugar = 3

def check_kitchen_stock():
    total_items = available_eggs + available_flour + available_sugar
    print(f'The kitchen has {total_items} total items:')
    print(f'- {available_eggs} eggs')
    print(f'- {available_flour} flour')
    print(f'- {available_sugar} sugar')

check_kitchen_stock()

def use_eggs(available_eggs, eggs_to_use):
    if eggs_to_use > available_eggs:
        print('The kitchen does not have enough eggs.')
        return available_eggs

    print(f'{eggs_to_use} egg(s) used out of {available_eggs} available.')
    return available_eggs - eggs_to_use

def make_fried_egg(available_eggs):
    has_enough_eggs = available_eggs >= 1
# User Editable Region
    if has_enough_eggs == True:
        available_eggs = use_eggs (available_eggs, 1)
        print('Made a fried egg. Yummy!')
    else:
        print('Could not make a fried egg. Not enough eggs!')

make_fried_egg(available_eggs)
print(available_eggs)
# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36

Challenge Information:

Build a Kitchen Inventory Tracker - Step 14

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/workshop-kitchen-inventory-tracker/6a3e73eabddd614f91cc235a.md at main · freeCodeCamp/freeCodeCamp · GitHub

you are using has_enough_eggs == True as the condition, the request is to use has_enough_eggs, this uses the boolean value directly

Thanks. That solved it.