0
Input function keeps giving me an EOFError in python in Sololearn but doesn't in other IDEs.
If somebody knows what am doing wrong please point it out.Here is my code. https://code.sololearn.com/c6888Wa0HwUj/?ref=app
2 Antworten
+ 1
it's a limitation of SoloLearn playground.
the issue is the while loop, playground is not a real terminal, your code gets executed on SoloLearn servers and returns the output it does not wait for the while loop to finish in this context.
remove this part and keep the function check_password() only.
password_trials = 1
while password_trials <= 3:
try:
check_password()
except IndexError:
print('password can\'t be blank')
password_trials += 1
0
It works that way though I wanted it to recur.Thanks.