# Build a kitchen inventory tracker Step 9

**URL:** <https://forum.freecodecamp.org/t/build-a-kitchen-inventory-tracker-step-9/802370>\
**Category:** Curriculum Help\
**Tags:** python\
**Created:** [October 17, 2026, 11:03am UTC](https://forum.freecodecamp.org/t/build-a-kitchen-inventory-tracker-step-9/802370 "2026-10-17T11:03:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![matanskis.l](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/matanskis.l/32/419838_2.png) [@matanskis.l](https://forum.freecodecamp.org/u/matanskis.l)\
**Post date:** [October 17, 2026, 11:03am UTC](https://forum.freecodecamp.org/t/build-a-kitchen-inventory-tracker-step-9/802370/1 "2026-10-17T11:03:13Z")

</div>

## Tell us what’s happening: So i write the code and i think it is right, i might be wrong as i had to take a week long break because of school, but the code says that there’s still an error somewhere

## Your code so far

```auto
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 eggs_to_use - available_eggs

```

## 

Lesson URL [https://www.freecodecamp.org/learn/python-v9/workshop-kitchen-inventory-tracker/step-9](https://www.freecodecamp.org/learn/python-v9/workshop-kitchen-inventory-tracker/step-9)

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [October 17, 2026, 2:23pm UTC](https://forum.freecodecamp.org/t/build-a-kitchen-inventory-tracker-step-9/802370/2 "2026-10-17T14:23:50Z")

</div>

> by subtracting `eggs_to_use` from `available_eggs`.

are you sure you are doing this?

how do you subtract a number from an other?

---

<div class="post-metadata">

**Author:** ![matanskis.l](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/matanskis.l/32/419838_2.png) [@matanskis.l](https://forum.freecodecamp.org/u/matanskis.l)\
**Post date:** [October 18, 2026, 12:48pm UTC](https://forum.freecodecamp.org/t/build-a-kitchen-inventory-tracker-step-9/802370/3 "2026-10-18T12:48:07Z")

</div>

> [@ILM](#):
>
> eggs\_to\_use

oh, i just noticed the mistake, i just didnt read the whole instruction carefully enough, thx

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [October 20, 2026, 12:48pm UTC](https://forum.freecodecamp.org/t/build-a-kitchen-inventory-tracker-step-9/802370/4 "2026-10-20T12:48:08Z")

</div>

Closed on October 20, 2026, 12:48pm UTC

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