Questions and Answers
In Python, which method is used to create a constructor in a class?
def init(self):
What is the purpose of encapsulation in object-oriented programming?
To hide the internal state of an object and restrict access to it
What is the term for defining multiple methods in a class with the same name but different parameters?
Method overloading
How is a derived class created in Python?
Signup and view all the answers
What is the term for the ability of a method to take many forms based on the parameters passed to it?
Signup and view all the answers