Creating a class method



Of course , I'm a new user of Python code and I obtain the following message "Oops, try again. It looks like you didn't print "This is a silver DeLorean with 88 MPG." but I really obtain the message. I don't know what is wrong.

Could you help me ? (sorry for my bad english I'm french)

Replace this line with your code.


Your 7th line of code.

You should be doing:

def display_car(self, model, color, mpg):


Thanks for your help
When I added these arguments without any other modification I had an error message.

When I added 3 arguments int the print function like :

The print worked well but I have this message


@chrisdum, @bayoishola20 suggestions doesn't make it better. You have access to model (self.model), color (self.color) and mpg (self.mpg) thanks to self and __init__

reverse the change you made, the problem is that at the end of your string (after MPG) there should be a full stop (.), that is what causing the error (strings returned should be an exact match.


Thanks a lot stetim94. Effectively it miss the full stop (as we say in french "Devil is in details").
Thanks also to bayoishola20 who have tried to help me.