Direction: Choose the correct option
Q1.
What is encapsulation in OOP?
Direction: Choose the correct option
Q2.
How do you create a private attribute in Python?
Direction: Choose the correct option
Q3.
What is name mangling?
Direction: Choose the correct option
Q4.
What does a single underscore prefix `_var` conventionally indicate?
Direction: Choose the correct option
Q5.
How can you access a mangled attribute `__name` from outside the class?
Direction: Choose the correct option
Q6.
What is the purpose of getter and setter methods?
Direction: Choose the correct option
Q7.
How do you define a property using the `@property` decorator?
Direction: Choose the correct option
Q8.
What does `@property` achieve?
Direction: Choose the correct option
Q9.
What is the difference between `_var` and `__var`?
Direction: Choose the correct option
Q10.
Can we access `__var` from outside the class directly?
