ML LAB
Unit -1
04/12/2025 - 16/01/2026 = 19/01/2026
1. SUPERVISED LEARNING
2. Unsupervised learning -
By using Unsupervised learning create a data list which contains mixture of number
and alphabet. Where program has to classify between Alphabet and number
Semi Supervised Learning
Create a program for semi supervised learning where based on marks courses should be
suggested (MTECH,MBA, MCA ..ETC)
3. Reinforcement Learning
Create a program on Reinforecement learning
Create a quiz with 4 options each correct answer rewards a +ve reward as 1 and -ve
penalty as -1 point
Prg 5
Design a gym workout recommendation system using Supervised Learning and
Reinforcement [Link] system takes user details such as weight, height, gender, goal,
and fitness level as [Link] supervised learning, it generates a weekly workout plan (Day
1– 6 and one rest day).Using reinforcement learning, it evaluates daily performance by
giving rewards and penalties based on exercises completed.
weight = float(input("Enter body weight (kg): "))
height = float(input("Enter height (cm): "))
gender = input("Enter gender (Male/Female): ")
print("\nGoal:")
print("1. Weight Loss")
print("2. Muscle Gain")
goal = int(input("Enter choice (1/2): "))
print("\nLevel:")
print("1. Beginner")
print("2. Intermediate")
print("3. Advanced")
level = int(input("Enter choice (1/2/3): "))
# SUPERVISED LEARNING
# Weekly workout plans (labeled data)
if goal == 1: # Weight Loss
if level == 1:
week_plan = {
"Day 1": ["Walking", "Jumping Jacks"],
"Day 2": ["Cycling", "Squats"],
"Day 3": ["Running", "Lunges"],
"Day 4": ["Skipping", "Plank"],
"Day 5": ["Burpees", "Crunches"],
"Day 6": ["Brisk Walking", "Stretching"],
"Day 7": ["Rest Day"]
}
elif level == 2:
week_plan = {
"Day 1": ["Running", "Jump Squats"],
"Day 2": ["Burpees", "Plank"],
"Day 3": ["Cycling", "Lunges"],
"Day 4": ["Mountain Climbers", "Crunches"],
"Day 5": ["Skipping", "Leg Raises"],
"Day 6": ["HIIT", "Stretching"],
"Day 7": ["Rest Day"]
}
else:
week_plan = {
"Day 1": ["HIIT", "Sprints"],
"Day 2": ["Burpees", "Jump Lunges"],
"Day 3": ["Mountain Climbers", "Plank"],
"Day 4": ["Jump Rope", "Core"],
"Day 5": ["Sprint Intervals", "Crunches"],
"Day 6": ["Cardio Mix", "Stretching"],
"Day 7": ["Rest Day"]
}
else: # Muscle Gain
if level == 1:
week_plan = {
"Day 1": ["Push-ups", "Body Squats"],
"Day 2": ["Plank", "Lunges"],
"Day 3": ["Chair Dips", "Crunches"],
"Day 4": ["Push-ups", "Wall Sit"],
"Day 5": ["Squats", "Plank"],
"Day 6": ["Light Cardio", "Stretching"],
"Day 7": ["Rest Day"]
}
elif level == 2:
week_plan = {
"Day 1": ["Bench Press", "Push-ups"],
"Day 2": ["Squats", "Lunges"],
"Day 3": ["Pull-ups", "Plank"],
"Day 4": ["Deadlift", "Crunches"],
"Day 5": ["Shoulder Press", "Leg Raises"],
"Day 6": ["Light Cardio", "Stretching"],
"Day 7": ["Rest Day"]
}
else:
week_plan = {
"Day 1": ["Heavy Squats", "Bench Press"],
"Day 2": ["Deadlift", "Pull-ups"],
"Day 3": ["Shoulder Press", "Core"],
"Day 4": ["Chest Fly", "Lunges"],
"Day 5": ["Leg Press", "Plank"],
"Day 6": ["Active Recovery", "Stretching"],
"Day 7": ["Rest Day"]
}
# Display weekly plan
print("\nWEEKLY WORKOUT PLAN (Supervised Learning):")
for day, exercises in week_plan.items():
print(day, ":", exercises)
# REINFORCEMENT LEARNING
# Daily scoring system
print("\nDAILY PERFORMANCE TRACKING")
for day, exercises in week_plan.items():
if exercises == ["Rest Day"]:
print(day, ": Rest Day (No score)")
continue
print("\n", day)
score = 0
for ex in exercises:
done = input(f"Did you complete {ex}? (yes/no): ").lower()
if done == "yes":
score += 1
else:
score -= 1
print("Score for", day, ":", score)
_____________________________________________________________________
Enter body weight (kg): 56
Enter height (cm): 164
Enter gender (Male/Female): Female
Goal:
1. Weight Loss
2. Muscle Gain
Enter choice (1/2): 1
Level:
1. Beginner
2. Intermediate
3. Advanced
Enter choice (1/2/3): 3
WEEKLY WORKOUT PLAN (Supervised Learning):
Day 1 : ['HIIT', 'Sprints']
Day 2 : ['Burpees', 'Jump Lunges']
Day 3 : ['Mountain Climbers', 'Plank']
Day 4 : ['Jump Rope', 'Core']
Day 5 : ['Sprint Intervals', 'Crunches']
Day 6 : ['Cardio Mix', 'Stretching']
Day 7 : ['Rest Day']
DAILY PERFORMANCE TRACKING
Day 1
Did you complete HIIT? (yes/no): yes
Did you complete Sprints? (yes/no):
Score for Day 1 : 0
Day 2
Did you complete Burpees? (yes/no): yes
Did you complete Jump Lunges? (yes/no): yes
Score for Day 2 : 2
Day 3
Did you complete Mountain Climbers? (yes/no): yes
Did you complete Plank? (yes/no): yes
Score for Day 3 : 2
Day 4
Did you complete Jump Rope? (yes/no): yes
Did you complete Core? (yes/no): yes
Score for Day 4 : 2
Day 5
Did you complete Sprint Intervals? (yes/no): yes
Did you complete Crunches? (yes/no): yes
Score for Day 5 : 2
Day 6
Did you complete Cardio Mix? (yes/no): yes
Did you complete Stretching? (yes/no): yes
Score for Day 6 : 2
Day 7 : Rest Day (No score)
UNIT 2