Ask coding questions

← Back to all posts
While loop Help
VivaanChugh (0)

Can you please help, the game never ends I don't know what's wrong. Also I am new to python so please don't judge me. I think there is a problem with the initial while loop. Thanks! https://repl.it/@VivaanChugh/2-player-hangman

Commentshotnewtop
nmakry (2)

Correct line for outer while loop:

while player1_points <15 or player2_points < 15:

VivaanChugh (0)

But it still lets only player1 win no matter what

nmakry (2)

@VivaanChugh
There are plenty of errors. I just answered to your specific question. Try to trace program flow using print statements at various places, in order to understand it.