What is the output of the following code?
 

Loading

Choose the correct option.

What is the output of the following code?
 class ParentClass:
     def __init__(self):
         self.__x = 1
         self.y = 10
 
     def print(self):
         print(self.__x, self.y)
 class ChildClass(ParentClass):
     def __init__(self):
         super().__init__()
         self.__x = 2
         self.y = 20
         
 c = ChildClass()
 c.print()

A. 44835
B. 1 20
C. 44836
D. 2 20

Leave a Comment