Skip to content

Instantly share code, notes, and snippets.

@th3-r0n1n
Created December 19, 2016 03:23
Show Gist options
  • Select an option

  • Save th3-r0n1n/fda752e0b8a3125c443003669d4a4a82 to your computer and use it in GitHub Desktop.

Select an option

Save th3-r0n1n/fda752e0b8a3125c443003669d4a4a82 to your computer and use it in GitHub Desktop.
exercise1
print("welcome to the 'When will I turn 100' app...")
prompt = '---->'
print()
print("How old are you?")
age = input(prompt)
years_until = 100 - int(age)
print("How many times do you want to hear what I have to say?")
repeat = int(input(prompt))
print("you are {} years old".format(age))
for i in range(repeat):
print("You will be 100 years old in {} years".format(years_until))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment