Advertisement
WONGDEEM

Untitled

Aug 31st, 2019
132
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def check_age(age):
  2.     done = False
  3.     attempts = 0
  4.     while not done:
  5.         age = int(input("Enter age: "))
  6.         if 1<=age<=100:
  7.             print("Your age is {}".format(age))
  8.             count += 1
  9.             print("Number of attempts = " + str(attempts))
  10.             done = True
  11.         else:
  12.             count += 1
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement