Answer:
import random
arr=[]
for i in range(100):
arr.append(i)
while True:
answer=random.choice(arr)
guess=int(input("enter your guess number between 0-100: "))
if answer is guess:
print("right guess\\congratulations.....")
print("the answer was: "+str(answer))
break
elif guess < answer-20:
print("you guessed too low....\\try again")
print("the answer was: "+str(answer))
elif guess > answer+20:
print("you guessed too high....\\try again")
print("the answer was: "+str(answer))
else:
print("incorrect guess\\try again")
print("the answer was: "+str(answer))
Step-by-step explanation:
the program is in python programming language