DEV Community

Vani thakur
Vani thakur

Posted on

Running Workout Plan Generator — A Personal Fitness Coach Built in Python

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass

What I Built

I built a simple Python program that asks the user for their fitness level and how many days a week they want to run, then generates a personalized weekly running plan. It gives people an easy, approachable first step to get off their screens and start running, especially those who don't know where to begin.

Demo

I tested this locally in Google Colab. The program asks for the user's fitness level and preferred number of running days, then prints a complete personalized weekly workout plan.

Code

-- coding: utf-8 --

"""Untitled3.ipynb

Automatically generated by Colab.

Original file is located at
https://colab.research.google.com/drive/1WVPfMt0uvWrAO-ykSecu9EwaCDK-tR48
"""

fitness_level = input("What is your fitness level? (beginner / intermediate / advanced): ")
days_per_week = int(input("How many days per week do you want to run? "))
plans = {"beginner": "20 min light jogging + 5 min walk", "intermediate": "35 min run + 2 interval sprints", "advanced": "50 min run + hill training"}
print(f"\nYour weekly workout plan ({days_per_week} days/week):")
for day in range(1, days_per_week + 1):
print(f"Day {day}: {plans.get(fitness_level, plans['beginner'])}")

How I Built It

I used Python's built-in input function to collect user responses, and a dictionary to map fitness levels to suitable running plans. The whole project was built and tested directly in Google Colab, without needing any local setup.

Why Does Open Innovation Matter?

Open and lightweight tools like this make it possible for anyone, even without a gym or fancy equipment, to get a personalized plan and start moving. It lowers the barrier to going outside and being active.

My Agent Session

Prize Categories

I'm entering as an individual, in the general Touch Grass challenge category.

Top comments (0)