Last active
May 2, 2019 12:10
-
-
Save Coolfield/99bda5b078bacd41cb8b5325bd32537a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
the_number = random.randint(0, 10) | |
guess = -1 | |
while guess != the_number: | |
guess_text = input('Guess a number between 0 and 10: ') | |
guess = int(guess_text) | |
if guess is the_number: | |
print('You won, it was {}!'.format(guess)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment