0

I want this to print that the user got it wrong on each trial that the user gets wrong, until the user run out of guesses

https://code.sololearn.com/c1ST9vvaHyWe/?ref=app

27th Nov 2018, 3:00 AM
Joseph Ojo
Joseph Ojo - avatar
3 odpowiedzi
0
On Sololearn (and on most online Python compiler) we have to enter all the inputs at once at the beginning. So it won't work so well here. But the issue you mentioned is in line 15: you have a "<" in addition to a "-1" in the condition. Just change it to if (guess_count < guess_limit) and user_number != random_number:
27th Nov 2018, 3:11 AM
Kishalaya Saha
Kishalaya Saha - avatar
0
Thank you, can't say what was going through my mind when I used (...-1), thank you
27th Nov 2018, 3:15 AM
Joseph Ojo
Joseph Ojo - avatar
0
You're welcome, Femi Ojo 😊
27th Nov 2018, 3:28 AM
Kishalaya Saha
Kishalaya Saha - avatar