Question: need help taking the base of code and making it into something usable. (in python) 4.17 LAB: Program: Automobile service invoice (edited) Produce an invoice
need help taking the base of code and making it into something usable. (in python)



4.17 LAB: Program: Automobile service invoice (edited) Produce an invoice for these available auto services (all costs are integers): Tune up -- $65 Brake service -- $79 oil change -- $35 Tire rotation -- $29 Car wash -- $9 Car wax -- $20 Prompt the user to select a first service and a second service, and then print an invoice for the selected services. In the event an invalid service is selected (not one of the available services), then print an error message "Invalid entry instead of printing an invoice. The user can enter "None" for the second service, in which case the invoice will only be for the first service. Provide a $ 10 discount when the total cost is $ 100 or more. Ex 1: Select first service: Car Wash Select second service: Car wax $ 7 INVOICE Car wash Car wax Total $ 20 19 $ Ex 2 Select first service: Detail Invalid entry Ex 3: Select first service: Tire rotation Select second service: None INVOICE Tire rotation Total $ 29 29 $ main.py Load default template... 1 total_cost = 0; 2 3 # FIXME make sure to add all services and the associated cost to this dictionary 4 services { "Tune up" : 65, "Brake service" : 79, "Oil change" : 35 } 5 6 service_choice1 input('Select first service: ') 7 # Type your code here 8 9 # The following code will print the service and cost for service 1 10 # FIXME It may need to be indented inside if statements 11 print('{:15} {:3d}'.format(service_choice1, services[service_choice1]))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
