I'm doing python programming and this is class unit of that. and the code is not printing the right answer.
class Car(object):
condition = "new"
def __init__(self, model, color, mpg):
self.model = model
self.color = color
self.mpg = mpg
def display_car(self):
print "This is a "+ self.color + self.model+ " with "+str(self.mpg)+"MPG"
my_car = Car("DeLorean", "silver", 88)
print my_car.display_car()
I'm trying to print This is a silver DeLorean with 88 MPG.