Created
May 12, 2017 07:00
-
-
Save odanga94/7309a6137d18ba20b09325d89a210e99 to your computer and use it in GitHub Desktop.
PracticePython/Exercise1
This file contains hidden or 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
import datetime | |
name = raw_input("Enter your name:") | |
age = int(input("Enter your age:")) | |
now = datetime.datetime.now() | |
year = now.year + (100 - age) | |
message = "Hey %s you will turn 100 years old in the year %d" %(name, year) | |
number = int(input("How many times would you like to print the message?")) | |
for i in range(number): | |
print message |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment