Question: need help programming these python Description: For this function, you are tasked with determining the priority level of a patient based on the amount (a

need help programming these

python

need help programming these python Description: For this function, you are tasked

with determining the priority level of a patient based on the amount(a floating-point number) spent for their treatment. The function returns the priority

Description: For this function, you are tasked with determining the priority level of a patient based on the amount (a floating-point number) spent for their treatment. The function returns the priority level as an integer depending on the following conditions: 4 Parameters: amount (float, indicating the amount spent for treatment) Assumptions: amount is non-negative (>=0) Return value: An int, indicating the priority level of a patient Examples: f categorize(item_price, item_units): Description: For this function, you are tasked with categorizing the items sold by a store into 5 categories based on their price (a float) and the number of units sold (an integer). The function returns the name of the category (a string) for an item depending on the following conditions: Parameters: item_price (float, indicating the price of an item) item_units (int, indicating the number of units of item sold) Return value: A str, indicating the name of the category 5 Examples: categorize (5.8,5) 'Low-priced' categorize (10.0,10) 'Mid-priced' categorize(20.01, 25) 'High-priced' categorize(24.13, 30) 'Premium' categorize (9.99,10) 'Other' ticket_price(customer_age, day_of_week): Description: For this function, you are tasked with determining the price of a ticket based on the customer's age (an integer) and day of the week (a string) for a movie theater. The theater has the following pricing structure: - Children (under 10 years old): $5 - Teens (10-17 years old): $8 - Adults (18-59 years old): $10 - Seniors (60 and above): $7 In addition to these prices, the theater offers discounts on certain days of the week: - Mondays: 20% discount for all customers - Tuesdays: 25% discount for seniors - Wednesdays: 10% discount for children Using the above information, calculate the ticket price for the customer after discounts have been applied and return it as a floating-point number. Parameters: customer_age (int, indicating the customer's age) day_of_week (str, one of these possible values: "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday") Assumptions: customer_age is non-negative (>=0) Return value: A float, which represents the ticket price for the customer Examples: ticket_price(9, "Monday") 4.0 ticket_price(67, "Tuesday") 5.25 ticket_price(60, "Wednesday") 7.0 ticket_price(1, "Wednesday") 4.5 ticket_price(18, "Friday") 10.0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!