Q66
What will be the output of the following Python code? class test: def __init__(self,a="Hello World"): self.a=a def display(self): print(self.a) obj=test() obj.display()
A.
The program has an error because constructor can't have default arguments
B.
Nothing is displayed
C.
"Hello World" is displayed
AnswerD.
The program has an error display function doesn't have parameters
Answer: Option C
Solution
Answer: Option C
No explanation is given for this question Let's Discuss on Board