Created
July 30, 2016 14:52
-
-
Save prakashgd/bcf8e483793abccb8d2410b3d3c6cc7a to your computer and use it in GitHub Desktop.
This program calculates at which year you will turn to 100
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##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