Module 5: Introduction to Object-Oriented Programming (OOP)
Quiz: Quiz 5: Classes and Objects Fundamentals
1. What is the primary purpose of the `__init__` method in a Python class?
2. In a class method definition, what does the `self` parameter refer to?
3. How do you create an object (an instance) of a class named `MyClass`?
4. If `my_object` is an instance of a class that has a method `do_something()`, how do you call this method?
5. What is a class in Object-Oriented Programming?
6. What is a primary goal of Object-Oriented Programming (OOP)?
7. Can a Python class have multiple methods?
8. If `car1` is an object of a `Car` class and `brand` is an attribute, how do you access its value?