Question:

Which of the following is the output of the below Python code?

class A:
    def __init__(self):
        self.x = 1
        self.__y = 1
 
    def getY(self):
        return self.__y
a = A()
a.x = 45
print(a.x)

Answers:


Keywords:

© 2017 QuizBucket.org