Project

Coffee Machine (Python)

Medium
6989 completions
~ 10 hours
4.3

This project allows you to get a taste of Python. Practice working with functions, challenge yourself with loops and conditions, and get more confident in Python.

Provided by

JetBrains Academy JetBrains Academy

About

What can be better than a cup of coffee during a break? A coffee that you don’t have to make yourself. It’s enough to press a couple of buttons on the machine and you get a cup of energy; but first, we should teach the machine how to do it. In this project, you will work on programming a coffee machine simulator. The machine works with typical products: coffee, milk, sugar, and plastic cups; if it runs out of something, it shows a notification. You can get three types of coffee: espresso, cappuccino, and latte. Since nothing’s for free, it also collects the money.

Graduate project icon

Graduate project

This project covers the core topics of the Python OOP course, making it sufficiently challenging to be a proud addition to your portfolio.

At least one graduate project is required to complete the course.

What you'll learn

Once you choose a project, we'll provide you with a study plan that includes all the necessary topics from your course to get it built. Here’s what awaits you:
Write a program that puts some basic information on the screen: let the machine describe what it takes to make a cup of coffee!
Program the machine to calculate the amount of ingredients it needs depending on how many people want some coffee.
Working with conditions, program the machine to estimate how many creamy coffees it can make based on the amount of ingredients we enter.
Teach your virtual coffee machine to perform three basic actions: collect the money, renew the supplies, and serve the coffee.
Program the machine to display on the screen the amount of supplies left. Set the main loop: now the menu keeps updating until you enter “exit”.
Time for some final touch-ups: structure the code so that it runs smoothly.

Reviews

Aleksandr K avatar
Aleksandr K
2 months ago
After a long break from coding it was a good refresher. Keep it up JetBrains!!!
Redcloak avatar
Redcloak
2 months ago
I gained a much better understanding of using class structures. I also made it a point to add new functionality at each step by adding functions rather than dumping them into main. Converting them later on to methods was simple.
Sylwia Bartman avatar
Sylwia Bartman
3 months ago
I have learned how to create classes and it's method, state machine handle. Logic of the problem.

4.3

Learners who completed this project within the Python OOP course rated it as follows:
Usefulness
4.4
Fun
4.4
Clarity
4.2