What Will Be The Output Of The Following Code Snippet?
self.x = 1
self.__y = 1
val = Test()
val.x = 45
The program has an error because x is private and should not access it from outside the class.
The program has an error because you cannot name a variable using __y.
The program runs fine and prints 1.
The program runs fine and prints 45.
© 2017 QuizBucket.org