Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import datetime
- print("Write the month in number form! Thank You. Example, When May, type 5. ")
- b = int(input("What year are you born in? "))
- now = datetime.datetime.now()
- current = now.year
- currentM = now.month
- while b:
- if b > current:
- print("Stop Lying!")
- b = int(input("What year are you born in? "))
- elif b == current:
- m = int(input("What month are you born in? "))
- if m > currentM:
- print("Stop Lying!")
- m = int(input("What month are you born in? "))
- else:
- print("You are " + str(current-b) + " years old")
- break
- else:
- m = int(input("What month are you born in? "))
- if m > currentM:
- print("You are " + str(current-b-1) + " years old")
- else:
- print("You are " + str(current-b) + " years old")
- break
Add Comment
Please, Sign In to add comment