A simple Python-based fitness tracker that allows users to monitor their physical activities, including tracking steps, calories burned, distance traveled, and workout time. The program is built using Object-Oriented Programming (OOP) principles and provides an interactive console-based interface.
- Start/End Workout: Tracks the active time spent during a workout.
- Step Counting: Users can manually add steps, which will automatically calculate calories burned and distance traveled.
- Statistics Display: View total steps, calories burned, distance, and workout time in a simple, formatted output.
- User-Friendly Console Menu: Navigate through the program using a text-based menu.
To get started with the fitness tracker, follow these steps:
- Clone the repository to your local machine:
git clone https://github.com/yourusername/fitness-tracker.git
- Navigate to the project directory:
cd fitness-tracker
- (Optional) Set up a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use 'venv\Scripts\activate'
- Install any dependencies if required (for now, there are none for this project, but if you expand it later, this step will be necessary).
- Run the program:
python fitness_tracker.py
Once you run the program, it will prompt you to enter your name. After that, you’ll be presented with a menu to interact with the tracker.
1. Start Workout: Start tracking your active workout time.
2. End Workout: End the workout session and log the total time spent.
3. Add Steps: Input the number of steps you’ve taken to update your statistics.
4. Show Stats: View your total steps, calories burned, distance, and active time.
5. Exit: Exit the program.
- Start Workout
- End Workout
- Add Steps
- Show Stats
- Exit
Choose an option: 1
Future Enhancements
This project is designed to be simple but scalable. Future improvements could include:
• Integration with wearable fitness devices for automatic data collection.
• Setting daily step goals and notifications when the goal is achieved.
• Graphical User Interface (GUI) implementation using libraries like tkinter or PyQt.
• Data persistence (saving and loading workout data from files or databases).
Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page if you want to contribute.
1. Fork the repository.
2. Create a new branch (git checkout -b feature/YourFeature).
3. Commit your changes (git commit -m 'Add YourFeature').
4. Push to the branch (git push origin feature/YourFeature).
5. Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
Author: Komoire Ashiraf Date: September 22, 2024 Feel free to contact me if you have any questions or suggestions!
1. Replace https://github.com/yourusername/fitness-tracker.git with the actual URL of your GitHub repository.
2. Add the proper link to the issues page or create a custom one.
3. If you plan to use a license like MIT or Apache, make sure to add the appropriate LICENSE file to the repository.