Question: Write a program to calculate the total price for services at a car wash based on the following rules: The base car wash ( always

Write a program to calculate the total price for services at a car wash based on the following rules:
The base car wash (always applies) is $10
A dictionary of possible additional services (key) and their corresponding cost (value) has been provided in the template (do not
change the values in the dictionary).
Calculate the total cost of a car wash, including the base car wash and up to two additional services.
Output all selected services and their corresponding cost (the base wash and additional services in the order entered), then
output the total. See the examples below for the exact format to use.
Additional services should be entered using their name in the dictionary.
If a service is not selected, a '-' symbol (without the quotation marks) should be entered to indicate no service was selected. See
the second example where a first additional service was selected, but a second additional service was not.
There is never a second additional service is there was not a first additional service.
Examples:
If the input is:
Tire shine
Wax
The output is:
zyCar Wash
Base car wash - $10
Tire shine - $2
Wax - $3
Total price: $15
If the input is:
Rain repellent
The output is:
zyCar Wash
Base car wash - $10
Rain repellent - $2
Total price: $12
 Write a program to calculate the total price for services at

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!