7/11 What's wrong here?


#1

class Car(object):
condition = "novo"
def init(self, model, color, mpg):
self.model = model
self.color = color
self.mpg = mpg

def display_car(self):
    return ("Este e um %s cor %s com consumo de %s MPG." %(self.model, self.color, str(self.mpg)))

my_car = Car("DeLorean", "prata", 88)
print my_car.display_car()
print my_car.condition
print my_car.model
print my_car.color
print my_car.mpg

Oops, tente outra vez. Parece que voce nao exibiu "Este e um DeLorean cor prata com consumo de 88 MPG.".


#2

These lines need to be commented or removed.

Google translate:

Estas linhas têm de ser comentado ou removido.


#3

I removed it but didn´t work ´-´


#4

I used your code to pass. Don't know what to suggest besides refresh and/or reset.

class Car(object):
    condition = "novo"
    def __init__(self, model, color, mpg):
        self.model = model
        self.color = color
        self.mpg   = mpg
    def display_car(self):
        return ("Este e um %s cor %s que faz %s MPG." % (self.model,self.color,str(self.mpg)))
my_car = Car("DeLorean", "prata", 88)
#print my_car.model
#print my_car.color
#print my_car.mpg
print my_car.display_car()
print my_car.condition

#5

thanks man :grinning: !!!!!