Untitled
unknown
python
2 years ago
587 B
6
Indexable
# Import modules # Tell the user to think of a number between 1-100 # Give the computer 5 guesses # The computer guesses a random number from that range # Loop until the computer is out of chances # The computer then asks if it was higher/lower/correct # If correct, the the computer says it wins # If it was higher/lower, the computer makes another guess # If they said something other than the expected answers, tell them they can't do that # Reduce the number of chances the computer has left # If it runs out of guesses, end the game
Editor is loading...