Skip to content

Instantly share code, notes, and snippets.

@prakashgd
Created July 30, 2016 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prakashgd/bcf8e483793abccb8d2410b3d3c6cc7a to your computer and use it in GitHub Desktop.
Save prakashgd/bcf8e483793abccb8d2410b3d3c6cc7a to your computer and use it in GitHub Desktop.
This program calculates at which year you will turn to 100
##Century Calculator
import datetime
name = raw_input("Enter your name:")
age = int(input("Enter your age:"))
times = int(input("How many times you want to print this message"))
now = datetime.datetime.now()
century = int((100 - age) + now.year)
print "\nHello \"%s\" you will attain 100th age in %sth year." % (name, century) * times
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment