0
Help me
Can someone explain what is wrong with this code ? It stops when I enter a wrong password. https://sololearn.com/compiler-playground/coE7P00c53PI/?ref=app
2 odpowiedzi
+ 1
this code just works, but... can be better:
if attempts == 5:
print("whatever")
move it into the while loop changing the `elif attempts == 0:` condition
and see the difference.
you don't need to check 2 times the same...
+ 2
Your code works fine, if you give *all* the input in the pop-up box, like:
abc
abc
abc
abc
abc
The playground is not interactive. If you only provide one input at the beginning and it does not match the while condition, an EOF error occurs.