Advertisement
WONGDEEM

Untitled

Aug 31st, 2019
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  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
Add Comment
Please, Sign In to add comment
Advertisement