Calories Burned Calculator
Desktop App with Python and Qt Platform
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.
Curious about how many calories you burned during exercise? You can estimate your calorie expenditure by using a simple calculator. The goal of this project is to create a desktop application with the PyQt5 platform to calculate the energy expenditure of multiple sports like running or boxing and routine activities such as ironing or yoga. The user will have to enter several variables like the age or weight and the application will automatically display the calories burned during the exercise along with two other ratios. You will have to build dropdown menus, selection buttons and blank spaces to enter data.
– The construction of the skeleton of the app with PyQt widgets, the graphical user interface.
– Populate the app with the data provided in a csv file and implement the calculations defined in the instructions to find out the calories burned.
It is also a beginner object oriented programming exercise, 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.
DOWNLOAD / CONTENT
You will receive an email with a ZIP file. The download is also available on your account.
The ZIP file includes:
1) INSTRUCTIONS: A PDF with the project description. It includes a short guidelines section, and a screenshot of the app so can visualize what you have to build.
2) DATA: A csv file with all the data related to the activities and their categories.
– A .py file with the source code (250 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 (13 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.
– Conditional statements
– Loops (for) + enumerate
– Read csv files
– Errors and exceptions
– Formatted String Literals (f-strings)
– “__init__” method
This project is highly recommended for Python intermediate students who have attended Python courses and feel comfortable with core Python concepts like loops, methods or functions definition. It is an excellent job to start building desktop applications and get familiar with the great PyQt platform.
If you need additional information, do not hesitate to contact us.