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 $
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 $
Tire shine $
Wax $
Total price: $
If the input is:
Rain repellent
The output is:
zyCar Wash
Base car wash $
Rain repellent $
Total price: $
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
