Created
June 27, 2016 05:17
-
-
Save sirishaditya/dfed2fc01ed5bd58ad89452c475f3052 to your computer and use it in GitHub Desktop.
PracticePython.Org- 01CharacterInput
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
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