Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def check_age(age):
- done = False
- attempts = 0
- while not done:
- age = int(input("Enter age: "))
- if 1<=age<=100:
- print("Your age is {}".format(age))
- count += 1
- print("Number of attempts = " + str(attempts))
- done = True
- else:
- count += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement