Skip to content

Instantly share code, notes, and snippets.

@mr-karan
Last active August 29, 2015 14:14
Show Gist options
  • Save mr-karan/9a8aacda53cf70c96965 to your computer and use it in GitHub Desktop.
Save mr-karan/9a8aacda53cf70c96965 to your computer and use it in GitHub Desktop.
import datetime
current =datetime.datetime.today().year #Current year
userchoice=1
name=input("Enter your name")
while(userchoice==1):
age=int(input("Enter your age"))
hundredthYear=current+(100-age)
print ("You will turn 100 in" + str(hundredthYear))
print("Press 1 to continue and 0 to abort:")
userchoice=int(input())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment