https://github.com/abdullahmuhammed5/coffee_machine
Python Coffee Machine Program
https://github.com/abdullahmuhammed5/coffee_machine
coffee-machine python3
Last synced: over 1 year ago
JSON representation
Python Coffee Machine Program
- Host: GitHub
- URL: https://github.com/abdullahmuhammed5/coffee_machine
- Owner: AbdullahMuhammed5
- Created: 2020-12-29T07:50:37.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-29T07:54:04.000Z (over 5 years ago)
- Last Synced: 2025-02-15T10:14:08.165Z (over 1 year ago)
- Topics: coffee-machine, python3
- Language: Python
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python Coffee Machine Program
This is a program that simulate a real world coffee machine, built by python3.
## Get started
You should have python3 installed on your machine.
1. Clone my repository
```
git clone https://github.com/AbdullahMuhammed5/coffee_machine.git
```
2. Navigate to the app directory
```
cd coffee_machine
```
3. Run the program
```
python3 app.py
```
Now you can play around with the program and you can use the example below as a references
```
Write action (buy, fill, take, remaining, exit):
> remaining
The coffee machine has:
400 of water
540 of milk
120 of coffee beans
9 of disposable cups
$550 of money
Write action (buy, fill, take, remaining, exit):
> buy
What do you want to buy? 1 - espresso, 2 - latte, 3 - cappuccino, back - to main menu:
> 2
I have enough resources, making you a coffee!
Write action (buy, fill, take, remaining, exit):
> remaining
The coffee machine has:
50 of water
465 of milk
100 of coffee beans
8 of disposable cups
$557 of money
Write action (buy, fill, take, remaining, exit):
> buy
What do you want to buy? 1 - espresso, 2 - latte, 3 - cappuccino, back - to main menu:
> 2
Sorry, not enough water!
Write action (buy, fill, take, remaining, exit):
> fill
Write how many ml of water do you want to add:
> 1000
Write how many ml of milk do you want to add:
> 0
Write how many grams of coffee beans do you want to add:
> 0
Write how many disposable cups of coffee do you want to add:
> 0
Write action (buy, fill, take, remaining, exit):
> remaining
The coffee machine has:
1050 of water
465 of milk
100 of coffee beans
8 of disposable cups
$557 of money
Write action (buy, fill, take, remaining, exit):
> buy
What do you want to buy? 1 - espresso, 2 - latte, 3 - cappuccino, back - to main menu:
> 2
I have enough resources, making you a coffee!
Write action (buy, fill, take, remaining, exit):
> remaining
The coffee machine has:
700 of water
390 of milk
80 of coffee beans
7 of disposable cups
$564 of money
Write action (buy, fill, take, remaining, exit):
> take
I gave you $564
Write action (buy, fill, take, remaining, exit):
> remaining
The coffee machine has:
700 of water
390 of milk
80 of coffee beans
7 of disposable cups
$0 of money
Write action (buy, fill, take, remaining, exit):
> exit
```