I dont know what I did wrong but I got 9/10. I need one more. Computer Sciencés Role in…
The following solution is suggested to handle the subject “I dont know what I did wrong but I got 9/10. I need one more. Computer Sciencés Role in…“. Let’s keep an eye on the content below!
Question “I dont know what I did wrong but I got 9/10. I need one more. Computer Sciencés Role in…”
I dont know what I did wrong but I got 9/10. I need
one more.
Computer Sciencés Role in Industry home > 4.10: Program Automobile service invoice (Python 3) E zyBooks catalo 4.10 Program: Automobile service invoice (Python 3) (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 Dl 8 4 0
ervi E zyBooks catalog Help/FAo My library > CS 200 Computer Sciences Role in Industry home 4.10: Program Automobile service invoice (Python 3) (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: 0il 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: 519 8 0
TY 4.10.1: Program Automobile service invoice (Python 3) 9/10 main.py Load default template 1 print(“Davy’s auto shop services”) 2 print(“oil change $35″) 3 print(Tire rotation $19”) 4 print(“Car wash $7”) 5 print(“car wax$12) 6 print() 7 service1 input (“Select first service: “) 8 print() 9 print() 10 service2 = input(“Select second service: “) 11 print () 12 print() 13 dic “oil change” “35”, “Tire rotation” “19”, “Car wash”:””, “car wax”: “12” 14 total 15 print 16 print(“Davy’ s auto shop invoice) 17 print) 18 #terate the dictionary values When done developing your program, press the Submit for grading button below This wil submit your program for auto-grading Develop mode Submit mode Submit for grading Total score: 9/10 Latest submission 5:30 AM on 05/29/19 all 8 0 0
× |围Third of Ma X | (E) Module Thi/Xj zy 4.10. Progr: X Home-) St X e 4.10 Progr. X + rary > CS 200 Computer Sciences Role n lndustry home > 4 10. Program Automobile service invoice (Python 9) ezyBookscatalog Oheb/FAQ θ Cheeting Yap 4.101: Program Automobile service invoice (Python 3) ACTNIY 9/10 main.py Load default template.. Run your program as often as you’d like before submitting for grading Below type any needed mput values in the first box then click Run program and observe the programs output in the second box. Develop mode Enter program input (optional) If your code requires input values provide them here 4:3 0 8 6 4 0
U.T. Progra ram hutorhoble Service voice (PythonS) main.py 16 print(“Davy’s auto shop invoice”) 17 print() 18 #Iterate the dictionary values 19 for key, value in dic.items(): 20 i if (servicel key): print (“Service 1:”, key+str(“) dic[key]) total total +int (dic[key]) if(service2 print(“Service 2:”,key+str(“, s”)+dic[key]) total-total int (dic[key]) 21 key ) : 23 24 25 26 #if the service2 value is – then it display No service 27 if (service2) 28 print( service 2: “No service”) 29 print() 30 print(“Total: s+str (total)) 31 32 When done developing your program, press the Submit for grading button submit your program for auto-grading. Develop mode Submit mode Submit for grading Latest submission 5:30 AM on 05/29/19 Total Only show failing tests (5 tests hidden) Download this □11
In PYT IN PYT d-8787548 https: learn zybooks.com/zybook/SNHUCS200AY16-17/chapter 4 section/10?content resource С E zyBook Books Mylibrary os 200 computer Scienceés Role in Industry home >4 10. Program Automobile service nvoice (Python 3) 6:Compare output Special charecter legend Output differs. See highlights below. Input Car Wax Davy’s auto shop services oil change $35 Tire rotation$19 Car wash7 Car wax$12 Select first service: Your output Select second service: Davy’s auto shop invoice Service 2: Car wax, $12 Total: $12 Davy’s auto shop services Oil change $35 Tire rotation$19 Car wash7 all 8,
In PYT IN PYT Sign ot IE) Theme l HUM2 a☆ e https:/learn.zybooks.com/zybook/SNHUCS200AY16-17/chapter/A/section/102content resource id-8787548 E zyBooks oks My brary- 05-200 computer Scenots Role inIndustry home 4 10 Program Automobie evice invoice P’ython:3) Select first service Your output Select second service: Davy’s auto shop invoice Service 2: Car wax, $12 Total: $12 Davy’s auto shop services Oil change $35 Tire rotation $19 Car wash$7 Car wax $12 Select first service: Expected output Select second service: Davy’s auto shop invoice Service 1: No serviceo Service 2: Car wax, $12 Total: $12 8 4
Answer
You have forgotten to compare services1
if(service2==”-“)
print(“Service 2:”,”No service”)
Other than if(service1 ==”-“)
print(“Service 1:”,”No service”)
Conclusion
Above is the solution for “I dont know what I did wrong but I got 9/10. I need one more. Computer Sciencés Role in…“. We hope that you find a good answer and gain the knowledge about this topic of engineering.