Guest User

Untitled

a guest
Oct 17th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. print("This program will tell you the year you turn 100 years old.")
  2. name = input('Enter your name:')
  3. age = input('Enter your age:')
  4. current_year = input('Enter the current year:')
  5. option = input('Choose between option number 1 or 2:')
  6. multiplied_by = input('Enter a random number:')
  7.  
  8. age_to_100 = 100 - int(age)
  9.  
  10. year_100 = int(current_year) + age_to_100
  11.  
  12. if option is '1':
  13. if multiplied_by > '1':
  14. print((name + ', ' + str(year_100) + '. ' + '\n') * int(multiplied_by))
  15. else:
  16. print(name + ', ' + str(year_100))
  17. elif option is '2':
  18. if multiplied_by > '1':
  19. print((name + ', ' + 'you will turn 100 years old in the year ' + str(year_100) + '. ' + '\n') * int(multiplied_by))
  20. else:
  21. print(name + ', ' + 'you will turn 100 years old in the year ' + str(year_100))
Add Comment
Please, Sign In to add comment