Untitled2.ipynb - Colab
Untitled2.ipynb - Colab
ipynb - Colab
import random
from getpass import getpass
num1 = int(input('Enter the lowest number you would like to play with: '))
num2 = int(input('Enter the highest number you would like to play with: '))
print('I am thinking of a number between ' + str(num1) + ' and ' + str(num2) + ', inclusive. Guess the number!')
guess= int(getpass('enter your guess here: '))
actualnum = random.randint(num1,num2)
guesslist = []
def play(guess):
else:
low = True
print('too low')
if low or high:
guess = int(getpass('try again: '))
if guess == actualnum:
print('you got it! the number was '+str(actualnum)+'!')
play(guess)
https://colab.research.google.com/drive/1wHuRwvaFYpwYUXYJds_f94n1okb8bas9 1/1