services
I am not able to complete the 3rd and 4th step. 3) Output an invoice for the services selected. Output the cost for each service and the total cost. (3 pts)
Davy's auto shop invoice Service 1: Oil change, $35 Service 2: Car wax, $12 Total: $47
(4) Extend the program to allow the user to enter a dash (-), which indicates no service. (3 pts)
Ex:
Select first service: Tire rotation Select second service: - Davy's auto shop invoice Service 1: Tire rotation, $19 Service 2: No service Total: $19 @@@@@@@ here is my code@@@@ services = {'Oil change':35, 'Tire rotation':19, 'Car wash':7,'Car wax':12,'-':'No service'} print("Davy's auto shop services") print('Oil change -- $35') print('Tire rotation -- $19') print('Car wash -- $7') print('Car wax -- $12') total = 0 firstService = str(input('nSelect first service: n')) secondService = str(input ('nSelect second service: n')) print("nnDavy's auto shop invoicen") if firstService == 'Car wash': print('Service 1: %s, $7'% firstService) total +=7 elif firstService == 'Car wax': print('Service 1: %s, $12'% firstService) total +=12 elif firstService == 'Tire rotation': print('Service 1: %s, $19'% firstService) total +=19 elif firstService == 'Oil change': print('Service 1: %s, $35'% firstService) total =+35 elif firstService == 'No service': print('Service 1: No service') total if secondService == 'Car wash': print('Service 2: %s, $7'% secondService) total +=7 elif secondService == 'Car wax': print('Service 2: %s, $12'% secondService) total +=12 elif secondService == 'Tire rotation': print('Service 2: %s, $19'% secondService) total +=19 elif secondService == 'Oil change': print('Service 2: %s, $35'% secondService) total =+35 elif secondService == 'No service': print('Service 2: No service') total print('') print('Total: $'+str(total))
The complete program.
1) Output a menu of automotive services and the corresponding cost of each service. (2 pts)
Ex:
Davy's auto shop services Oil change -- $35 Tire rotation -- $19 Car wash -- $7 Car wax -- $12
(2) Prompt the user for two services from the menu. (2 pts)
Ex:
Select first service: Oil change Select second service: Car wax
(3) Output an invoice for the services selected. Output the cost for each service and the total cost. (3 pts)
Davy's auto shop invoice Service 1: Oil change, $35 Service 2: Car wax, $12 Total: $47
(4) Extend the program to allow the user to enter a dash (-), which indicates no service. (3 pts)
Ex:
Select first service: Tire rotation Select second service: - Davy's auto shop invoice Service 1: Tire rotation, $19 Service 2: No service Total: $19
Top Answer
"Looking for a Similar Assignment? Order now and Get 10% Discount! Use Code "Newclient"
