Created
February 16, 2019 03:17
-
-
Save TammyLaforest/49e3737650541c3613da6d80b66595b9 to your computer and use it in GitHub Desktop.
MotionlessGlossyComma created by TammyLaforest - https://repl.it/@TammyLaforest/MotionlessGlossyComma
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 | |
first = 1 | |
last = 10 | |
number = random.randint(first, last) | |
guess = int(input("Enter a number from " + str(first) + " to " + str(last) +": ")) | |
while number != guess: | |
if guess < number: | |
print("guess is low") | |
first=guess | |
guess = int(input("Enter a number from " + str(first) + " to " + str(last) +": ")) | |
elif guess > number: | |
print("guess is high") | |
last=guess | |
guess = int(input("Enter a number from " + str(first) + " to " + str(last) +": ")) | |
print("You guessed it!") | |
print("Click RUN to play again.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment