8.11 LAB: Car wash Write a program to calculate the total price for car wash services. A base car wash is $10. A dictionary with each additional service and the corresponding cost has been provided. Two additional services can be selected. A '-' signifies an additional service was not selected. Output all selected services, according to the input order, along with the corresponding costs and then the total price for all car wash services. Ex: If the input is: Tire shine Wax the output is: ZyCar Base car wash -- $10 Tire shine -- $2 Wax -- $3 ---- Total price: $15 Ex: If the input is: Rain repellent - the output is: ZyCar Wash Base car wash -- $10 Rain repellent -- $2 ---- Total price: $12 what i have so far ( services = { 'Air freshener' : 1 , 'Rain repellent': 2, 'Tire shine' : 2, 'Wax' : 3, 'Vacuum' : 5 } base_wash = 10 total = 0 service_choice1 = input() service_choice2 = input() ''' Type your code here ''') but i dont know what else i need to add .
8.11 LAB: Car wash
Write a
Ex: If the input is:
Tire shine Waxthe output is:
ZyCarEx: If the input is:
Rain repellent -the output is:
ZyCar Wash Base car wash -- $10 Rain repellent -- $2 ---- Total price: $12what i have so far (
services = { 'Air freshener' : 1 , 'Rain repellent': 2, 'Tire shine' : 2, 'Wax' : 3, 'Vacuum' : 5 }
base_wash = 10
total = 0
service_choice1 = input()
service_choice2 = input()
''' Type your code here ''')
but i dont know what else i need to add .
9.3 LAB: Exception handling to detect input string vs. integer
Ex: If the input is:
Lee 18 Lua 21 Mary Beth 19 Stu 33 -1then the output is:
Lee 19 Lua 22 Mary 0 Stu 34Trending now
This is a popular solution!
Step by step
Solved in 3 steps