Created
January 2, 2018 07:44
-
-
Save guisea/7a055ccf59af482ed2935064555839f7 to your computer and use it in GitHub Desktop.
PracticePython Exercise 01
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
# excercise01.py | |
from datetime import datetime | |
name = input('What is your name? ') | |
age = int(input('What is your age {}? '.format(name))) | |
year = int(datetime.now().year) # Retrieve current year based on system time | |
copies = int(input('How many lines to print? [default: 1 - Enter to accept]') or 1) # Default lines printed to 1 | |
print(copies * "{0} you will be 100 years old in the year {1}\n".format(name, | |
((year - age) + 100) | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment