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 Rain repellent ---- Total price: $12 1 def...(): BA 2 -- Troubleshooting • If you are getting a keyError, you might be trying to retrieve a cost for the service that was not selected and was marked with a -. Revise your if/elif statements to change when/how you are retrieving the values from the dictionary. 414136.2652726.qxzqy7 3 4 if -- LAB ACTIVITY 3.21.1: LAB: Car Wash 5 6 7 8 9 10 11 $10 $2 main.py service choice1=input() service_choice2=input() _name_ __main_": services = {'Air freshener': 1, 'Rain repellent': 2, 'Tire shine': 2, 'wax': 3, 'Vacuum' : 5 } base_wash= total e 0/14 Load default template...
Addition of Two Numbers
Adding two numbers in programming is essentially the same as adding two numbers in general arithmetic. A significant difference is that in programming, you need to pay attention to the data type of the variable that will hold the sum of two numbers.
C++
C++ is a general-purpose hybrid language, which supports both OOPs and procedural language designed and developed by Bjarne Stroustrup. It began in 1979 as “C with Classes” at Bell Labs and first appeared in the year 1985 as C++. It is the superset of C programming language, because it uses most of the C code syntax. Due to its hybrid functionality, it used to develop embedded systems, operating systems, web browser, GUI and video games.
![Example
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
LAB
ACTIVITY
Troubleshooting
• If you are getting a keyError, you might be trying to retrieve a cost for the service that was not selected and was marked with a -.
Revise your if/elif statements to change when/how you are retrieving the values from the dictionary.
414136.2652726.qx3zqy7
6
7
8
--
9
10
11
3.21.1: LAB: Car Wash
1 def...():
2
3
4 if name == _main__":
5
services = {'Air freshener': 1, 'Rain repellent': 2, 'Tire shine': 2, "wax': 3, "Vacuum' : 5 }
base_wash =
total = 0
main.py
service_choice1=input()
service_choice2 = input()
0/14
Load default template...](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F280dcd23-77f5-41db-b4b4-aa0365f7e9e1%2F6a869982-79b2-48ee-9075-c389578a964c%2F8bz9r9n_processed.png&w=3840&q=75)
![The function to compute the cost and print the receipt
Write a function to print the formatted output and return the total price for the selected car wash services.
Write a function car_wash_service() that takes the following parameters:
• a base price for a car wash,
• a dictionary that lists the services and their prices,
• two strings that contain the names of the services that were selected.
For example, if no services were selected and the provided base price is 10 dollars, the function prints the following:
ZyCar Wash
Base car wash
----
--
$10.00
Total price: $10.00
Notice that the output that you see above is produced from within the function.
1. In your function, you need to extract the cost of each service based on the provided values.
2. Calculate the total for the services: the base car wash and the two additional services.
3. Print the receipt of all selected services with their cost, then the total price.
Hint: Use the service name values to index the dictionary - this would get you the corresponding service cost.
See additional examples of the output below.
The main program
Your main program will need to process the user input and correctly call the car_wash_service () function.
1. Set the base car wash price to $10.
2. A dictionary with each additional service and the corresponding cost has been provided.
3. Get the user input:
3.1. The service name has to match the key in the dictionary.
3.2. Two additional services can be selected. If the user does not need additional service, they can use a
additional service.
4. Call the function to output all selected services along with the corresponding costs and then the total price for all car wash services.
as an input to reject an](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F280dcd23-77f5-41db-b4b4-aa0365f7e9e1%2F6a869982-79b2-48ee-9075-c389578a964c%2F5whfp37_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)