DEV Community

Cover image for 🛒 Building My First Python Kiosk Manager:
Nelly Triza
Nelly Triza

Posted on

🛒 Building My First Python Kiosk Manager:

As part of my Python learning journey, I built a Kiosk Manager as my capstone project.

The goal was to create a simple system that could help a small kiosk owner manage inventory, record sales, search for products, and generate sales reports.

💡 What the Project Does

The Kiosk Manager allows users to:

  • View available stock
  • Add new products or restock existing ones
  • Sell products and automatically update stock
  • Generate a sales report
  • Search for products using part of their name
  • Track unique products sold
  • Save inventory and sales data between sessions

🧩 Python Concepts I Used

One of the most valuable parts of this project was seeing how different Python concepts can work together.

I used a dictionary for inventory:

stock = {
    'Bread': {'price': 65, 'quantity': 20},
    'Milk': {'price': 50, 'quantity': 50},
    'Sugar': {'price': 120, 'quantity': 60}
}
Enter fullscreen mode Exit fullscreen mode

A list stores the sales records:

sales_log = []
Enter fullscreen mode Exit fullscreen mode

Each sale is stored as a tuple:

sales_log.append((item, quantity, total))
Enter fullscreen mode Exit fullscreen mode

And a set keeps track of unique products sold:

products_sold = set()
Enter fullscreen mode Exit fullscreen mode

I also used functions to separate the different tasks:

def full_inventory():
    ...

def restock_product():
    ...

def sell_product():
    ...

def sales_report():
    ...

def search_products():
    ...
Enter fullscreen mode Exit fullscreen mode

💾 Adding File Handling

I wanted the application to remember inventory after it was closed, so I added basic file handling.

The current inventory is saved to inventory.txt, while sales are stored in sales.txt.

I used "w" when saving the current inventory and "a" when adding new sales so that previous sales aren't overwritten.

This was one of the parts that made the project feel more like a real application rather than just a Python exercise.

🐛 Learning Through Errors

I also encountered a few errors along the way.

For example, I got a:

NameError: name 'sell_product' is not defined
Enter fullscreen mode Exit fullscreen mode

I learned that Python executes code from top to bottom, so my functions needed to be defined before the menu tried to call them.

Debugging these mistakes was honestly one of the most useful parts of the project.

🚀 What I Learned

This project helped me understand how Python concepts connect in a practical application.

I worked with:

Dictionaries
Lists
Tuples
Sets
Functions
Loops
Conditionals
String methods
F-strings
Input validation
File handling

Most importantly, I learned that you don't need to know everything before building something.

Build, break, debug, learn, repeat. 🐍💻

This Kiosk Manager is just the beginning, and I'm looking forward to adding more features as I continue learning Python.
This project helped me understand how Python concepts connect in a practical application.

I worked with:

  • Dictionaries
  • Lists
  • Tuples
  • Sets
  • Functions
  • Loops
  • Conditionals
  • String methods
  • F-strings
  • Input validation
  • File handling

Most importantly, I learned that you don't need to know everything before building something.

Build, break, debug, learn, repeat. 🐍💻

This Kiosk Manager

Top comments (0)