Strange error in 6


#1

I'm getting a strange error saying that the colour variable doesn't exist when I run this code.

class Car(object):
-condition = "new"
-def init(self, model, colour, mpg):
--self.model = model
--self.colour = colour
--self.mpg = mpg

my_car = Car("Delorean", "silver", 88)
print my_car.condition
print my_car.model
print my_car.colour
print my_car.mpg

Any ideas? (The init method is actually __ init __ (no spaces), codecademy just shows that as bold)


#2

Refresh the browser, because I don't see errors in your code


#3

I tried, i'm still getting errors. It insists that the colour variable does not exist, when it clearly does.


#4

Take a snapshot of the page


#5

#6

Strange, as you have passed the lesson (you have a green mark in the lesson). Try removing the print that the lesson doesn't tells you in the instructions.

If not, clear the browser cache and refresh the page, because he is telling you about a property that you do not have in the instance (color instead of colour).


#7

It must be the color/colour thing, then. I'm a little irritated that codecademy doesn't have a language setting to accommodate British users. I'm not going to purposefully misspell in my code.


#8

Yeah, you're right, it's color, I checked it.


#9


please go through the link and tell where is my fault. I am iired of being running this code.


#10

You need to have two underscores on either side of init


#11

Thank you very much...


#12

Your code is(&should be) working in codecademy labs...