Python Fitness Tracker – Final Project
For my final project in Introduction to Python, I created a simple terminal-based fitness tracker that lets users log, save, and review their daily step counts. The app supports average step tracking, goal-setting, and daily progress check-ins, all handled through clean Python logic and stored persistently in a .csv file.
I’ve always enjoyed running, biking, and staying active, so it felt natural to combine that interest with coding. Whenever I start a new project, I like to build around hobbies I already care about. In fact, I previously developed a workout website during a bootcamp, so this was a nice opportunity to expand on that idea and keep building something useful.
Project Purpose & Structure
The goal of this project was to explore real-world data tracking using Python, applying core concepts like:
-
Classes
-
Functions
-
Modules
-
File reading/writing
-
User interaction in the terminal
The fitness tracker collects data either by automatically using today’s date, or by allowing the user to enter a custom date. If step data already exists for a selected date, the app prompts the user to confirm whether to overwrite it or cancel. The program also supports a step goal system that lets you:
-
View your current goal
-
Change it
-
Track progress against it
All data is stored in a simple CSV format with two columns: date and steps.
Key Features and Methods
Here’s a quick breakdown of the core features and how they were implemented:
-
Class: StepEntry
A simple data model to hold a date and step count, and print that information cleanly. -
Modules
I split the code into two files: tracker.py (the main interface) and utils.py (helper functions and data models). This keeps the code modular and easier to maintain. -
CSV File Handling
Data is written to and read from a steps_data.csv file. If the file doesn’t exist, it’s created automatically. -
User Prompts
When adding a new entry, the user can choose to:-
Use today's date (automatically captured)
-
Enter a different date manually
-
-
Overwrite Warning
If data already exists for a chosen date, the app warns the user and offers the choice to:-
Overwrite the old data
-
Discard the new entry
-
-
Step Goal System
The tracker supports a goal-based system where the user can:-
View their current goal (default is 10,000 steps)
-
Set a new goal
-
Track daily progress against that goal with feedback
-
-
UX Touches
I added small time delays (time.sleep()), cleared the screen between actions, and added emojis to make the app more fun and readable. It’s a CLI app, but still enjoyable to use.
Design Decisions & Challenges
The biggest challenge wasn’t writing the code, it was deciding what not to add.
I didn’t want this project to spiral into a huge, over-engineered system. It was tempting to add charts, user accounts, or even calorie tracking, but I stuck to the basics. The final version includes all the necessary features to track and analyze steps in a clean, user-friendly way without tacking on extras just for the sake of it.
It’s a good reminder that sometimes the most professional thing you can do is draw a line and stop adding features.
Using AI in the Project
I used ChatGPT throughout the project, but not to generate large blocks of code. Instead, I leaned on it for wording help, especially when writing clean, consistent prompt messages and error messages for users. It also helped me brainstorm small visual flourishes, like using emojis to make the terminal experience more welcoming and intuitive.
The key was that I understood and tested every line of code that went into the project. AI was a helpful sidekick, but I stayed in full control of how everything was written and structured.
Final Thoughts
I’m proud of how this project turned out. It’s simple, focused, and actually usable. I also learned a lot about balancing user experience and functionality, even in a terminal-based Python app.
This project reflects how far I’ve come in Python, from writing basic scripts to designing a full workflow with data storage, modular logic, and user feedback.
Thanks for reading!
Comments
Post a Comment