136k views
11 votes
Create a Program that asks the user for their age. If their age is older than 65, print how old they are and tell them their ticket price is $5. If their age is between 25 & 65, print how old they are and tell them their ticket price is $10. Otherwise print their age and that their ticket price is $5. You should use elifs and concatenation

1 Answer

7 votes

age = int(input('Age: '))

if age >= 65:

print(f'You are {age} years old and your ticket is $5')

elif age >= 25 and age < 65:

print(f'You are {age} years old and your ticket is $10')

else:

print(f'You are {age} years old and your ticket is $5')

User Kowey
by
6.5k points