Classes


#1

So, the code prints what's supposed to but the interpreter says it doesn't.

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 "This is a %s  %s with %s MPG." %(self.model, self.color, self.mpg) 
my_car = Car("DeLorean", "silver", 88)
print my_car.display_car()

Please help me out i'm clueless.


#2

Hi @mig49 ,

There needs to be an exact match between your output and what is specified in the instructions.

Compare them carefully.


#3

Oh man, thanks and sorry for the dummy question, I'm kind of slow.


#4