Created
February 17, 2021 15:15
-
-
Save AreRex14/a94ac4c0ebf3abcca7604c7b988dfb28 to your computer and use it in GitHub Desktop.
A program that will tell you the year where you will be 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
import datetime | |
print('This program will tell you the year where you will be 100 years old.') | |
name = input("Enter your name: ") | |
age = int(input("Enter your age: ")) | |
now = datetime.datetime.now() | |
year = str((now.year - age) + 100) | |
rand_num = int(input("Please enter any number: ")) | |
print(str(rand_num * name), "\n", "will be 100 years old in {}".format(year)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment