Skip to content

Instantly share code, notes, and snippets.

@daniel-schroeder-dev
Last active August 14, 2022 21:46
Show Gist options
  • Save daniel-schroeder-dev/b9d193deee39cf489c1cff1c4e9f3d88 to your computer and use it in GitHub Desktop.
Save daniel-schroeder-dev/b9d193deee39cf489c1cff1c4e9f3d88 to your computer and use it in GitHub Desktop.
Nataliaw - Guess the Number
from random import randint
random_number = randint(1, 10)
offset = 2
upper_bound = random_number __ offset # This should be higher than the random_number
lower_bound = random_number __ offset # This should be lower than the random_number
guess = int(print("Guess a number between 1 and 10: "))
if guess == random_number:
print("you got it right, even tho it's not that hard to guess a number")
elif guess >= ___ and guess <= ___:
print("Pretty close!")
else:
print("Not even close!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment