r/pythonhelp • u/[deleted] • Dec 17 '21
Newbie Code Question
Hi, im a Crossfitter and always want to workout the halfway point of some workouts, so im trying to make something that does this for me as practice for python, which im very new to. the code works but it only prints halfway_round as the intial value of "undefined" and doesnt redefine it with the if statement. Why is this? As said, im very very new to coding so please dont trash this too much, im just trying to learn!
##Rep Scheme Halfway Calculatorreps_a = []reps_b = []total_a = 0total_ - Pastebin.com
3
Upvotes
1
u/[deleted] Dec 18 '21
Hmm im still not getting it. I printed each R value. All correct. So yes, the variable halway_round is not getting reassigned. I chose a rep number that meant the halfway_round would be r2 and it DID match this, however halfway_round was NOT reassigned despite meeting the <=r2 criteria