https://github.com/ymor-calayag/coffee_machine
A command-line coffee machine simulation that allows users to order different types of coffee, processes payments, manages ingredient resources, and tracks total earnings.
https://github.com/ymor-calayag/coffee_machine
coffee-machine python python3
Last synced: about 2 months ago
JSON representation
A command-line coffee machine simulation that allows users to order different types of coffee, processes payments, manages ingredient resources, and tracks total earnings.
- Host: GitHub
- URL: https://github.com/ymor-calayag/coffee_machine
- Owner: ymor-calayag
- Created: 2025-12-24T02:20:09.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-12-26T10:18:55.000Z (7 months ago)
- Last Synced: 2025-12-27T22:11:20.377Z (7 months ago)
- Topics: coffee-machine, python, python3
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Coffee Machine
This project simulates how a basic coffee vending machine works. Users can order drinks from a menu, insert money, and receive their coffee if there are enough resources available. The machine keeps track of remaining ingredients and total earnings throughout the session.
**Technologies Used**
+ ```Python```
+ ```sys``` module for program control
+ External data module for menu and resources
+ Dictionaries for structured data handling
**Features**
+ Menu-based coffee ordering system
+ Resource checking before making a drink
+ Payment processing with change calculation
+ Ingredient deduction after each successful order
+ Report feature to display remaining resources and earnings
+ Option to shut down the machine
**What Users Can Do**
+ Order espresso, latte, or cappuccino
+ View a report of remaining ingredients and earnings
+ Insert money and receive change when applicable
+ Get refunded if resources or payment are insufficient
+ Turn off the machine using a command
**The Process / How It’s Built**
+ The program displays a menu and waits for user input.
+ Users can order a drink, request a report, or turn off the machine.
+ Before processing an order, the machine checks if enough resources are available.
+ If payment is sufficient and resources are available, the drink is made and resources are deducted.
+ Earnings are tracked throughout the program’s runtime.