Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pkx8326/simple_virtual_coffee_machine_with_python
This project demonstrates Python's modularity capability. This repository hosts a Python code for a simple virtual coffee machine. It is a coin-operated machine that can dispense espresso, latte, and cappuccino at different prices.
https://github.com/pkx8326/simple_virtual_coffee_machine_with_python
Last synced: 1 day ago
JSON representation
This project demonstrates Python's modularity capability. This repository hosts a Python code for a simple virtual coffee machine. It is a coin-operated machine that can dispense espresso, latte, and cappuccino at different prices.
- Host: GitHub
- URL: https://github.com/pkx8326/simple_virtual_coffee_machine_with_python
- Owner: pkx8326
- Created: 2022-02-21T13:38:00.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-02-21T14:59:07.000Z (over 2 years ago)
- Last Synced: 2024-01-08T11:17:47.898Z (10 months ago)
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple_Virtual_Coffee_Machine_with_Python
This project demonstrates Python's modularity capability. This repository hosts a Python code for a simple virtual coffee machine. It is a coin-operated machine that can dispense espresso, latte, and cappuccino at different prices.The machine principle is simple:
1. The customer chooses between the three choices of the coffees.
2. The machine checks its resources to make sure that it has enough raw material to make that coffee. If there's not enough raw material, it tells the customer and the customer chooses a different choice or stop ordering.
3. If there's enough raw material to make the coffee, the machine asks for coins.
4. The customer insert coins.
5. The machine checks if there're enough coins for the cost of that coffee, if there's not enough coins, the machine return all the coins and the customer needs to insert them again.
6. If there're enough coins, the machine makes and gives the coffee to the customer. The machine also collect the coins given by the customers.
7. At the process of choosing a coffee, the customer can also choose to make the machine display its status, including all the raw materials left in the machine and the value of the coins it has collected so far.The following picture shows how the program interacts with users:
![image](https://user-images.githubusercontent.com/65524471/154978845-83a15c4a-46dd-4b59-9d9e-6989d81cc5bc.png)