Answer:
import random
print("Hello! I have a random number from 1 to 100! It is your job to try and guess it!")
number = random.randint(1,101)
guess = int(input("start to guess: "))
num_guesses = 1
while guess != number:
if guess > number:
print("lower")
guess = int(input("try again: "))
num_guesses +=1
elif guess < number:
print ("higher")
guess = int(input("start to guess: "))
num_guesses +=1
print("congrats it took you", num_guesses, "tries")
Explanation:
CTRL - (select sentence) - ALT
The privacy policy will tell you what the site will do with your information.
Ignoring distractions like hyperlinks and advertisements
Ump will be assigned to word2
word1[0:3] gets all of the letters from index 0 to index 3 exclusive (that means index 3 is not included)