Fun Python Projects
Recipe Calories Calculator
The calories calculator is one of Practity’s fun Python projects collection. You will have to build a desktop application with the PyQt5 platform to calculate the calories and nutrients of multiple recipes and dishes. The user will have to select the foods of the recipe or dish, including the drinks and desserts, and the application will automatically break down the nutritional data of each ingredient (calories, proteins, sugars, etc) and display the totals.
It is a real Python project, based on the multiple websites available on the internet that allow users control their menus. The data provided is real, so the application is very useful for those willing to adopt a healthy diet.
- The construction of the skeleton of the app with PyQt widgets: You will have to design the graphical user interface according to several requirements. The app must have dropdown menus, buttons, static texts and blank spaces to enter data.
- Populate the app with the data provided in a csv file so that widgets work and display it in a predefined layout.
In addtion to being among Practity’s fun Python projects, it is also a Python object-oriented programming exercise for beginners, since you will you have to create classes and write methods to make the app work.
Pyqt5 is one of the options provided by Python (like Tkinter) to build easily interactive desktop applications. You can install it as any other Python library (pip install) and it allows to design the front-end and combine it with the back-end.
Daniel Gunn is a software developer based in the UK. He holds a Computer Science degree, and he currently works as a freelance programmer specialized in Python.
DIGITAL DOWNLOAD / CONTENT
After purchase, you will receive an email with a ZIP file. The download is also available on your Practity account.
You will find the following content:
- INSTRUCTIONS: A PDF with the project description. It includes a short guidelines section, and a screenshot of the app so you can visualize the application you have to build.
- DATA: A csv file with data about foods and ingredients.
– A .py file with the Python project source code (200 lines). The code provided in the solutions has been written by a senior developer, so it is clean and easy to understand. A great way to learn and adopt right habits to create quality software.
– A PDF with detailed explanations of each chunk of code (23 pages). The instructor explains step by step what the code does and why.
WHAT YOU WILL PRACTICE
– Classes and methods.
– PyQt elements: QWidget, QApplication, QMessageBox,QComboBox, QPushButton, QLabel, etc.
– Json library.
– Conditional statements
– Loops (for)
– Read csv files
– Errors and exceptions
– “__init__” method
This type of fun Python projects is highly recommended for intermediate students who have attended Python courses and feel comfortable with core concepts like loops, methods or functions definition. It is an excellent Python assignment to start building desktop applications and get familiar with the great PyQt platform.
If you need additional information, do not hesitate to contact us.