Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##Rep Scheme Halfway Calculator
- reps_a = []
- reps_b = []
- total_a = 0
- total_b = 0
- start_round_a = int(input("What are the start reps for part A?"))
- decrease_per_round_a = int(input("How many reps does part A decrease by?"))
- start_round_b = int(input("What are the start reps for part B?"))
- decrease_per_round_b = int(input("How many reps does part B decrease by?"))
- counter = int(input("How many rounds is the workout split into?"))
- reps_a.append(start_round_a)
- reps_b.append(start_round_b)
- i = 1
- while counter != 0:
- reps_a.append(start_round_a - (decrease_per_round_a*i))
- reps_b.append(start_round_b - (decrease_per_round_b*i))
- i += 1
- counter -= 1
- total_a = sum(reps_a)
- total_b = sum(reps_b)
- r1 = reps_a[0] + reps_b[0]
- r2 = reps_a[1] + reps_b[1]
- r3 = reps_a[2] + reps_b[2]
- r4 = reps_a[3] + reps_b[3]
- r5 = reps_a[4] + reps_b[4]
- halfway = (total_a+total_b)/2
- halfway_round ="undefined"
- if halfway <= r1:
- halfway_round = "Round 1"
- elif halfway <= r2:
- halfway_round = "Round 2"
- elif halfway <= r3:
- halfway_round = "Round 3"
- elif halfway <= r4:
- halfway_round = "Round 4"
- elif halfway <= r5:
- halfway_round = "Round 5"
- ##want to add which round this falls into
- print(f"The halfway point is at {halfway} reps which is in {halfway_round}")
Advertisement
Add Comment
Please, Sign In to add comment