Skip to content

Instantly share code, notes, and snippets.

@zacbir
Created March 26, 2020 18:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zacbir/27569476a58dfcaa09edef403741ebb9 to your computer and use it in GitHub Desktop.
Save zacbir/27569476a58dfcaa09edef403741ebb9 to your computer and use it in GitHub Desktop.
"""
When a local brewery, Strangeways, posted this on their Instagram
(https://www.instagram.com/p/B-K53XWH77G/?igshid=14k3jx3o5bpfe),
I thought it was cool, but would be limiting. What it needed was a
way to shuffle up the exercises day-to-day.
"""
import random
import string
letters = list(string.ascii_uppercase)
exercises = [
"50 jumping jacks",
"20 crunches",
"30 squats",
"15 pushups",
"1 min. wall sit",
"10 burpees",
"20 plyo lunges",
"20 jump squats",
"30 jumping jacks",
"1 min. plank",
"10 pushups",
"20 tricep dips",
"20 burpees",
"25 burpees",
"40 jumping jacks",
"15 plyo lunges",
"30 crunches",
"15 pushups",
"30 jump squats",
"15 burpees",
"30 tricep dips",
"2 min. wall sit",
"50 calf raises",
"60 jumping jacks",
"2 min. plank",
"20 pushups"
]
full_name = input("Full name: ")
starting_pos = random.randint(0, len(letters))
custom_exercises = []
for letter in full_name.replace(" ", "").upper():
exercise_idx = (letters.index(letter) + starting_pos) % len(letters)
custom_exercises.append(exercises[exercise_idx])
print("Your custom workout: ",)
print("\n".join([f" * {exercise}" for exercise in custom_exercises]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment