vendredi 9 novembre 2018

why is the content of my if statement not running ? (python)

This is an odd thing that I haven's seen before, when I run the code below, the if statement will get up to the if statement but it wont do anything it just stays running indefinitely, the weird specifics of this issue means I have not been able to find a solution.

scores = Get_top_scores()
print('The if statement should now run')
new_scores = []
player_1_placement = True
place = 0
placed = False
while player_1_placement == True:
    for item in scores:
        if int(item[1]) < player_1_score:
            player_1_place = place
            placed = True
            break

This screenshot the interpreter and the code itself in pyscripter shows the issue. the screenshot . score is a list with lists inside for instance [['person', '1'], ['person1', '2']]

I do apologise if I am being dumb but I am baffled as to why this is happening

Aucun commentaire:

Enregistrer un commentaire