The function return the value of the ticket price time the


Write a function called compute_discount_amount() that determines the total discount , in dollar, for a customer based on age and student /employment status. the function accept the ticket price (floating -point) and age (and integer) as input parameters and does the following to determine the discount.

a) prompts the user for the student status of customer. the user should enter "y" if they are currently a student ; "n" otherwise
b) prompt the user for employment status of customer. the user should type "y" if they are a WSU emlployee; "n" otherwise.

a customer may be student and an employee. a customer is consider a senior citizen if they are 65 year older. the following discount should be applied: 9% for employees, 10% for senior citizen, 11% for students, and 12% for student who are also employees. the function return the value of the ticket price time the discount percentage.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: The function return the value of the ticket price time the
Reference No:- TGS0925929

Now Priced at $20 (50% Discount)

Recommended (97%)

Rated (4.9/5)