Home / MCQ Bank / Computer
Computer Concept Of Object Oriented Programs In Python Difficulty: Medium

What will be the output of the following Python 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()

Select the correct option to test your answer:

More Computer Questions

Which is the correct syntax of declaring a namespace? What is the role of the robots.txt file in relation to web scraping? . . . . . . . . is the node responsible for all reads and writes for the given partition. In HBase, what is the purpose of the HBase Cell? In Java, can a method declare both "throws" and "throw" statements?