pythan error

class Car(object):
condition = “new”
def init(self, model, color, mpg):
self.model = model
self.color = color
self.mpg = mpg

def display_car(self):
    s="This is a "+self.color+" "+self.model+" with "+str(self.mpg)+" MPG."
    return s
def drive_car(self):
    self.condition="used"

class ElectricCar(Car):

def __init__(self,model,color,mpg,battery_type):
    self.battery_type=battery_type
    self.model = model
    self.color = color
    self.mpg   = mpg
def drive_car(self):
    self.conditon="like new"

my_car=ElectricCar(“a”,“h”,54,“molten salt”)
print my_car.condition
my_car.drive_car()
print my_car.condition

its working now @ankit777…check below

check here (updated code)

class Car(object):
	condition = "new"
	def __init__(self, model, color, mpg):
		self.model = model
		self.color = color
		self.mpg   = mpg
		
	def display_car(self):
		return self.condition
		
	def drive_car(self):
		self.condition='used'
		return self.condition
    	
mycar = Car("Honda","white",120)

print mycar.condition
print mycar.drive_car()

what’s the error? It is running perfectly in script mode of python.

plz post your code in proper blocks

nop,sorry but this is not invoking the derived class function which is overided

i thought your program was giving runtime error… sry