Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("This program will tell you the year you turn 100 years old.")
- name = input('Enter your name:')
- age = input('Enter your age:')
- current_year = input('Enter the current year:')
- option = input('Choose between option number 1 or 2:')
- multiplied_by = input('Enter a random number:')
- age_to_100 = 100 - int(age)
- year_100 = int(current_year) + age_to_100
- if option is '1':
- if multiplied_by > '1':
- print((name + ', ' + str(year_100) + '. ' + '\n') * int(multiplied_by))
- else:
- print(name + ', ' + str(year_100))
- elif option is '2':
- if multiplied_by > '1':
- print((name + ', ' + 'you will turn 100 years old in the year ' + str(year_100) + '. ' + '\n') * int(multiplied_by))
- else:
- print(name + ', ' + 'you will turn 100 years old in the year ' + str(year_100))
Add Comment
Please, Sign In to add comment