1.
age_of_oldboy = 56 count = 0 while True: if count == 3: break guess_age =int(input ("guess age:")) if guess_age == age_of_oldboy: print ("you got it") break elif guess_age > age_of_oldboy: print("think bigger!!!") else: print("think smaller!!") count +=1
2
age_of_oldboy = 56 count = 0 while count < 3: guess_age =int(input ("guess age:")) if guess_age == age_of_oldboy: print ("you got it") break elif guess_age > age_of_oldboy: print("think bigger!!!") else: print("think smaller!!") count +=1 else: print("you have tried many times...")
3
age_of_oldboy = 56 count = 0 while count < 3: guess_age =int(input ("guess age:")) if guess_age == age_of_oldboy: print ("you got it") break elif guess_age > age_of_oldboy: print("think bigger!!!") else: print("think smaller!!") count +=1 if count == 3: continue_confirm = input ("Do you want to cntinue keep trying..?") if continue_confirm != "n": count = 0