Skip to content

Instantly share code, notes, and snippets.

@srahuliitb
Created September 6, 2017 12:04
Show Gist options
  • Select an option

  • Save srahuliitb/ebe0c15acf691b89c871c674628a0c70 to your computer and use it in GitHub Desktop.

Select an option

Save srahuliitb/ebe0c15acf691b89c871c674628a0c70 to your computer and use it in GitHub Desktop.
Create a program that asks the user to enter their name and their age. Print out a message addressed to them that tells them the year that they will turn 100 years old.
name = raw_input("Enter your name: ")
age = int(raw_input("Enter your age in numerals: "))
hundred_years = 2017 + 100 - age
print "Hello %s! You will turn 100 years old in the year %s." %(name, hundred_years)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment