106k views
5 votes
An admission charge for The Little Rep Theater varies according to the age of the person. Develop a solution to print the ticket charge given the age of the person. The charges are as follows:

a. Over 55: $10.00
b. 21-54: $15.00
c. 13-20: $10.00
d. 3-12: $5.00
e. Under 3: Free

Use a Multiple Alternative IF Statement

1 Answer

2 votes

Answer:

age = int(input("Enter your age: "))

charge = 0

if age > 55:

charge = 10

if 21 <= age <= 54:

charge = 15

if 13 <= age <= 20:

charge = 10

if 3 <= age <= 12:

charge = 5

if 0 <= age < 3:

charge = 0

print(charge)

Step-by-step explanation:

*It is in Python.

Ask the user for the age

Check the each given range and set the charge accordingly using if statements

Print the charge

User Bucket
by
6.5k points