Now I am confused


I was allowed to pas to the next level. /But, I got some red letters saying:"Name error, self not defined"

Here is my code:
class Car(object):
def initself,model,color,mpg):
self.model = model
self.color = color
self.mpg = mpg
condition = "new"
my_car = Car(self,model.color,mpg)
self.model = "DeLorean"
self.color = silver
self.mpg = 88
print my_car.condition


That error means that that name does not exist in that context.

We can't read your code properly the way you've currently posted it.


Hi ionatan, I fixed the problem. I omitted the indented block underneath my_car and made some changes in the init class. I still have to learn how to copy my work and insert it to the Q & A page. Thanks for your insight.


Here's a short guide -

Just simply wrap your code like this:


and it would be formatted properly :slightly_smiling: