n=20
attempt = 0
number_of_attempt_left = 9
while(attempt < 9):
print("Enter your number :- ")
type_no = int(input())
if type_no<n:
print("Lesser value please enter the above number :-")
attempt+=1
elif type_no > n:
print("Enter the less number")
attempt+=1
elif type_no == n:
print("you won")
print("Number of attempt :-",attempt)
break
print("Number of attempt left:-",number_of_attempt_left - attempt)
print("Game Over")
Thanks you for commenting your questions. I will see question and respond you.