Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- Create a program that asks the user to enter their name and their age.
- Print out a message addressed to them that tells them the year that they
- will turn 100 years old.
- Extras:
- Add on to the previous program by asking the user for another number and
- printing out that many copies of the previous message. (Hint: order of
- operations exists in Python).
- Print out that many copies of the previous message on separate lines.
- """
- name = input("Enter your Name: ")
- age = int(input("Enter your age: "))
- copy = int(input("How many copies: "))
- for x in range(copy):
- print("Your name is %s, your age is %d, you will be 100 years old in %d years"
- % (name, age, 100-age))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement