20/1 what is wrong?


class Car(object):

why mistake ?


I'm assuming you're having a problem with creating a class and then using it?

class MyClass:
    """A simple example class"""
    i = 123
    def f(self):
        return 'hello world'

The above, is an example, the way we would create a new instance of it would be x = MyClass()

Let me know if that makes sense.



The task 20/1 (Define a new class named "Car". For now, since we have to put something inside the class, use the pass keyword.)

my code:
class Car(object):

and why it is wrong ?


all done
check stm wanted:

class Car(object):


Please try out the below one. Hopefully it'll work for you as well.

class Car(object):


this for some reason works


Yes, it works because of if it doesn't include pass, it does nothing but the program doesn't understand that reason of the class is, that it does nothing.
But now you use "Pass", so it just passes and everything is alright, so Pass is like "Everything is fine"- command to the computer.