Created
June 23, 2020 10:15
-
-
Save martin-martin/d2f0bf7a6187a4e05d847b06e2bcee1d to your computer and use it in GitHub Desktop.
This file contains 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 | |
num = random.randint(1, 10) | |
guess = None | |
while guess != num: | |
guess = input("guess a number between 1 and 10: ") | |
guess = int(guess) | |
if guess == num: | |
print("congratulations! you won!") | |
break | |
else: | |
print("nope, sorry. try again!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks so much