Lesson 16 Homework
Name: Ahmad Qais Jamili
3: A: To mock imperfections from the real world
4: B: Other aircraft
5: C: Situation considered
6: A: Simulation
7: A: Simulation
9: B: Experiment/calculation
import random
print("Welcome to the guessing numbers simulation!")
print("----------------------------------")
n = random.randrange(1,100)
guess = int(input("Enter a number (1-100): "))
while n!= guess:
if guess < n:
print("Try to guess a higher number.")
guess = int(input("Enter a number again: "))
elif guess > n:
print("Go lower.")
guess = int(input("Enter a number again: "))
else:
break
print("you guessed it right!!")