qobjects = [
{
question: "How do you make a property private in Python?",
options: [
"Use a single underscore prefix: _property",
"Use a double underscore prefix: __property",
"Use the private keyword"
],
correct: 1
},
{
question: "What will be the result of the following code:class Person:",
options: [
"25",
"Error",
"None"
],
correct: 1
},
{
question: "What is the purpose of encapsulation?",
options: [
"To make all properties public",
"To protect data and control how it can be accessed",
"To increase code execution speed"
],
correct: 1
}
]
def __init__(self, age):
self.__age = age
p1 = Person(25)
print(p1.__age)