Last active
April 30, 2017 12:28
-
-
Save ehedaoo/529ce6c1482a8e33893cca1b622e9d3a to your computer and use it in GitHub Desktop.
Create a program that asks the user to enter their name and their age. Print out a message addressed to them that tells them the year that they will turn 100 years old.
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
# Create a program that asks the user to enter their name and their age. Print out a message addressed to them | |
# that tells them the year that they will turn 100 years old. | |
# | |
import datetime | |
name = input("Hello! Please enter your name: ") | |
print("Hello " + name) | |
age = int(input("Enter your age: ")) | |
year_now = datetime.datetime.now() | |
#print(year_now.year) | |
print("You will turn 100 in " + str(int(100-age) + int(year_now.year))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment