Guest User

Untitled

a guest
Dec 17th, 2021
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. ##Rep Scheme Halfway Calculator
  2.  
  3. reps_a = []
  4. reps_b = []
  5. total_a = 0
  6. total_b = 0
  7.  
  8. start_round_a = int(input("What are the start reps for part A?"))
  9. decrease_per_round_a = int(input("How many reps does part A decrease by?"))
  10. start_round_b = int(input("What are the start reps for part B?"))
  11. decrease_per_round_b = int(input("How many reps does part B decrease by?"))
  12. counter = int(input("How many rounds is the workout split into?"))
  13. reps_a.append(start_round_a)
  14. reps_b.append(start_round_b)
  15. i = 1
  16. while counter != 0:
  17. reps_a.append(start_round_a - (decrease_per_round_a*i))
  18. reps_b.append(start_round_b - (decrease_per_round_b*i))
  19. i += 1
  20. counter -= 1
  21. total_a = sum(reps_a)
  22. total_b = sum(reps_b)
  23. r1 = reps_a[0] + reps_b[0]
  24. r2 = reps_a[1] + reps_b[1]
  25. r3 = reps_a[2] + reps_b[2]
  26. r4 = reps_a[3] + reps_b[3]
  27. r5 = reps_a[4] + reps_b[4]
  28. halfway = (total_a+total_b)/2
  29. halfway_round ="undefined"
  30.  
  31. if halfway <= r1:
  32. halfway_round = "Round 1"
  33. elif halfway <= r2:
  34. halfway_round = "Round 2"
  35. elif halfway <= r3:
  36. halfway_round = "Round 3"
  37. elif halfway <= r4:
  38. halfway_round = "Round 4"
  39. elif halfway <= r5:
  40. halfway_round = "Round 5"
  41.  
  42. ##want to add which round this falls into
  43.  
  44. print(f"The halfway point is at {halfway} reps which is in {halfway_round}")
  45.  
  46.  
Advertisement
Add Comment
Please, Sign In to add comment