Skip to content

A simple Python Coffee Machine simulator that handles drink selection, resource management, coin processing, and transaction handling.

Notifications You must be signed in to change notification settings

ayovz/PyCoffeeMachine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PyCoffeeMachine β˜•

A simple Python Coffee Machine simulator that lets you select drinks, processes coins, checks resource availability, and makes coffee β€” all in the terminal.


πŸ“Œ Features

  • Drink Selection: Choose from espresso, latte, or cappuccino.
  • Resource Management: Tracks available water, milk, coffee, and profit.
  • Coin Processing: Accepts quarters, dimes, nickels, and pennies.
  • Transaction Handling: Checks for sufficient funds, refunds if not enough, and gives change when needed.
  • Maintenance Commands:
    • report β†’ Prints current resources & profit.
    • off β†’ Turns off the machine.

πŸ“‚ Project Structure

PyCoffeeMachine/
│── cmmain.py # Main program logic
│── data.py # Drink menu, resources, and ASCII art

▢️ How to Run

  1. Clone this repository:
    git clone https://github.com/ayovz/PyCoffeeMachine/
  2. Navigate to the folder:
    cd PyCoffeeMachine
    
  3. Run the program:
    python cmmain.py
    

πŸ›  Example Usage

 ____ ____ ____ ____ ____ ____ _________ ____ ____ ____ ____ ____ ____ ____ 
||C |||o |||f |||f |||e |||e |||       |||M |||a |||c |||h |||i |||n |||e ||
||__|||__|||__|||__|||__|||__|||_______|||__|||__|||__|||__|||__|||__|||__||
|/__\|/__\|/__\|/__\|/__\|/__\|/_______\|/__\|/__\|/__\|/__\|/__\|/__\|/__\|

What would you like? (espresso/latte/cappuccino): latte
Please insert coins.
How many quarters?: 10
How many dimes?: 0
How many nickels?: 0
How many pennies?: 0
Here is $0.0 in change.
Here's your Latte! Enjoyβ˜•!

πŸ“œ License

If you want, I can also make you a sample LICENSE file so you can push this as a fully ready GitHub repo. That way your project will look polished and professional.
Do you want me to prepare that?

About

A simple Python Coffee Machine simulator that handles drink selection, resource management, coin processing, and transaction handling.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages