Skip to content

Instantly share code, notes, and snippets.

@sirishaditya
Created June 27, 2016 05:17
Show Gist options
  • Save sirishaditya/dfed2fc01ed5bd58ad89452c475f3052 to your computer and use it in GitHub Desktop.
Save sirishaditya/dfed2fc01ed5bd58ad89452c475f3052 to your computer and use it in GitHub Desktop.
PracticePython.Org- 01CharacterInput
import datetime
name = input("Enter your name: ")
age = int(input("Enter your age: "))
now = datetime.datetime.now()
this_year = now.year
year_100 = this_year+(100-age)
repeat = int(input("Enter the number of times you want the message to be repeated: "))
for i in range(repeat):
print (name+" will be 100 years old in "+str(year_100))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment