Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program 3: write the code in python Ticket prices to a holiday concert are determined by the age of the customer as described below: String

Program 3:

write the code in python

Ticket prices to a holiday concert are determined by the age of the customer as described below:

String Designator

Age Range

Ticket Price

Tot

Under 4 years of age

$0.00 (free!)

Child

5 to 12 years of age

$5.00

Teen

13 to 19 years of age

$7.50

Adult

20 to 64 years of age

$9.00

Senior

65 years of age and older

$7.00***(see note)

***Note: If a Senior presents a valid AARP card, that person is entitled to a $0.75 discount

Write Python code to determine the total price of for a group of attendees. The user is the cashier at the event.

  • First, the program will ask maximum for five people (five inputs). i.e. If the group is composed by three the user will start entering the designator for each three person of the group and after that the user will start entering 0 to not consider more inputs.
  • For each person in the group, the program should prompt the user to enter the appropriate String Designator from the table above for that person.
    • The program should determine the ticket price for that person (based on the table above), apply the Senior discount if needed, and add that price to the total price for the party.
  • The program should output the number of persons in the group and the total amount due.
    • Example output: The total for this group of 5 is $30.00

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions

Question

What advice would you provide to Jennifer?

Answered: 1 week ago

Question

What are the issues of concern for each of the affected parties?

Answered: 1 week ago