qobjects = [
{
question: "What is the purpose of the __init__() method in Python classes?",
options: [
"To delete an object",
"To assign initial values to object properties",
"To print object information"
],
correct: 1
},
{
question: "What will be the result of the following code:class Person:",
options: [
"0",
"18",
"None",
"Error"
],
correct: 1
},
{
question: "When is the
def __init__(self, name, age=18):
self.name = name
self.age = age
p1 = Person(\"Emil\")
print(p1.age)__init__() method called?",
options: [
"When you delete an object",
"When you print an object",
"Automatically when creating a new object"
],
correct: 2
},
{
fillintheblanks: "exercise_classes4.htm"
}
]