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 Demo: def __init__(self): self.x = 1 def change(self): self.x = 10 class Demo_derived(Demo): def change(self): self.x=self.x+1 return self.x def main(): obj = Demo_derived() print(obj.change()) main()

Select the correct option to test your answer:

More Computer Questions

In Java, which type of exceptions are checked at compile-time? The page count of a report can be determined by clicking the _______ button. The number of values that can be returned from a given stored function is . . . . . . . . Which of these methods is not a Locale class? Sqoop uses . . . . . . . . to fetch data from RDBMS and stores that on HDFS.