Why doesn't current_score update in the while loop? First time posting, couldn't find the answer online. I guess it's a scoping issue halp
def main():
player_1 = input("Player one: ")
player_1_score = 0
player_2 = input("Player two: ")
player_2_score = 0
num_sets = int(input("Points for a win: "))
current_score = "%s (%i : %i) %s" % (player_1, player_1_score, player_2_score, player_2)
while player_1_score < num_sets > player_2_score:
round = int(input("Who won this round? (type 1 for player one; type 2 for player two"))
if round == 1:
player_1_score += 1
else:
player_2_score += 1
print(current_score)
pass
if __name__ == '__main__':
main()
...%...is evaluated once...