G
8

I tried to make a simple number guessing game in Python and it guessed my number on the first try every time.

I wrote a loop that was supposed to pick a random number between 1 and 100, but I put the random number generator inside the loop. So it picked a new random number each time I guessed. After three tries where it 'guessed' my number instantly, I felt like a coding genius for about ten seconds. Then I saw my mistake. Has anyone else done something this silly with their first loops?
2 comments

Log in to join the discussion

Log In
2 Comments
river_rivera45
river_rivera4518d agoTop Commenter
Been there with that exact mistake lol.
2
avery629
avery62918d ago
Feel your pain, trust me.
5