Question:

What Will Be The Output Of The Following Code Snippet?

class A:
     def __init__(self):
         self.__x = 1
         self.y = 10
 
     def print(self):
         print(self.__x, self.y)
 
class B(A):
     def __init__(self):
         super().__init__()
         self.__x = 2
         self.y = 20
         
c = B()
c.print()

 

Answers:


Keywords:

© 2017 QuizBucket.org