Preparing your workspace...
Loading latest data

Start with the basics: define a class, add attributes and methods, and create objects to store and use data.
Question1.
What keyword is used to define a class?
Question2.
What method is automatically called to initialize an object?
Question3.
What keyword refers to the current instance of a class?
Question4.
How do you check if a given object (e.g., obj) is an instance of a specific class (e.g., ClassName) in Python?
Question5.
Can a class exist with no attributes or methods?
Question6.
What will be the output?

Question7.
Predict the Output:

Question8.
What will be the output?

Learn how to add methods that perform actions, and how object state (attributes) can change through interaction.
Question1.
What do you call a function defined inside a class?
Question2.
What is the required first parameter in every instance method?
Question3.
Can methods modify object attributes?
Question4.
What error occurs if you define an instance method without including self as the first parameter?
Question5.
What’s the result?

Question6.
What’s the result?

Question7.
Predict the Output:

Question8.
Predict the Output:

Use inheritance to reuse code across classes. Learn how to override behavior and extend functionality in child classes.
Question1.
What is the syntax to make class Child inherit from Parent?
Question2.
What is it called when a child class changes a method from the parent?
Question3.
What’s the result?

Question4.
What’s the result?

Question5.
What’s the result?

Question6.
What’s the result?
