A simple command-line coffee machine simulator built with Python.
This project simulates a real coffee machine where users can:
- Choose a drink
- Insert coins
- Receive change
- Check available resources
- Refill the machine
- Turn off the machine
-
โ Three available drinks:
- Espresso
- Latte
- Cappuccino
-
๐ฐ Payment system:
- Quarters
- Dimes
- Nickels
- Pennies
-
๐ Machine report:
- Current water level
- Milk amount
- Coffee amount
- Total money earned
-
๐ Resource management:
- Ingredients are automatically deducted after each purchase
- Refill option available
-
๐ก๏ธ Input validation:
- Handles invalid payment inputs
- Prevents making drinks without enough resources
- Python 3
- Dictionaries
- Functions
- Loops
- Conditional Statements
- Exception Handling
coffee-machine/
โ
โโโ main.py
โโโ README.md
- Clone the repository:
git clone https://github.com/Ramtinexe/python-coffee-machine-simulator.git- Navigate to the project folder:
cd python-coffee-machine-simulator- Run the program:
python main.py| Command | Description |
|---|---|
| espresso | Order an espresso |
| latte | Order a latte |
| cappuccino | Order a cappuccino |
| report | Show machine resources |
| refill | Refill ingredients |
| off | Turn off machine |
- Convert the project to Object-Oriented Programming (OOP)
- Add a graphical user interface (GUI)
- Store transactions in a database
- Add more drink options
Made with Python โ