1.

What is the output of the following piece of code? class A: def __init__(self, x= 1): self.x = x class der(A): def __init__(self,y = 2): super().__init__() self.y = y def main(): obj = der() print(obj.x, obj.y) main()

A. Error, the syntax of the invoking method is wrong
B. The program runs fine but nothing is printed
C. 1 0
D. 1 2
Answer» E.


Discussion

No Comment Found