Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi, I need help troubleshooting this program, the error message syas that my program has produced no output! #Implementation of automativeService class class automativeService(): #Implementation

Hi, I need help troubleshooting this program, the error message syas that my program has produced no output!

#Implementation of automativeService class

class automativeService():

#Implementation of displayInvoice method

def displayInvoice(self):

#Display statements

print()

print("Davy's auto shop services")

print("Oil Change -- $35")

print("Tire rotation -- $19")

print("Car wash -- $7")

print("Car wax -- $12")

print()

#Get the input

print()

service1 = input("Select first service:\t")

service2 = input("Select second service:\t")

#Declare the dictionary and initailize it

dic ={"Oil Change":"35","Tire rotation":"19","Car wash":"7","Car wax":"12"}

#Declare the total and assign zero

total = 0

#Display statements

print()

print("Davy's auto shop invoice")

print()

#Iterate the dictionary values

for key,value in dic.items():

if(service1 == key):

print ("Service 1: ",key,dic[key])

total = total + int(dic[key])

if(service2 == key):

print("Service 2: ",key,dic[key])

total = total + int(dic[key])

#if the service2 value is - then it display No service

if(service2 == "-"):

print("Service 2: ","No service")

print()

#Display the total

print("Total :$",total)

print()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Application Development And Design

Authors: Michael V. Mannino

1st Edition

0072463678, 978-0072463675

More Books

Students also viewed these Databases questions