May I know whether when we declare a variable argument=self.argument in a class method, isn’t argument the same as self.argument then?
condition = "new"
def init(self, model, color, mpg):
self.model = model
self.color = color
self.mpg = mpg
print “This is a %s %s with %s MPG.” % (self.color, self.model, str(self.mpg))
Instead of typing self.color, self.model, … , I tried to just type color, model, str(mpg) bcs I thought they were equivalent, but it doesn’t work, at least in the Codecademy environment. May I know why is that so? Thank you!