Skip to content

Instantly share code, notes, and snippets.

@timotheos
Last active February 18, 2021 14:41
Show Gist options
  • Save timotheos/5ce4eead5591d4a2cb45d2526325953f to your computer and use it in GitHub Desktop.
Save timotheos/5ce4eead5591d4a2cb45d2526325953f to your computer and use it in GitHub Desktop.
Exercise 1 practicepython.org
def age_to_year(age):
year = 2021 + 100 - int(age)
return year
name = str(input("name?"))
age = int(input("age?"))
multiplier = int(input("How many times?"))
for multiply in range(multiplier):
print(name + " will turn 100 years old in " + str(age_to_year(age)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment