Created
October 5, 2018 08:38
-
-
Save KatiGithub/3c2d5e12dccbe4f843a01c60b3862d1c to your computer and use it in GitHub Desktop.
Guess numbers 1 to 9 until you get it correct!
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 sys | |
import random | |
randint = random.randint(1, 9) | |
x = int(input("What is your first guess between 1 to 9: ")) | |
if x == randint: | |
print("Correct!") | |
while x != randint: | |
x = int(input("Wrong!: ")) | |
if x == randint: | |
print("Correct!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment