20/1 what is wrong?


#1

class Car(object):

why mistake ?


#2

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.

Thanks,


#3
 Noope.....

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 ?


#4

all done
check stm wanted:

class Car(object):
"""blablabla"""


#5

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

class Car(object):
pass


#6

this for some reason works


#7

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.