What is the default return type of input() function in Python?
What will this output? 2 Marks
Which Python feature supports multiple forms of a function name? 2 Marks
What does self represent in Python classes? 2 Marks
What will be printed? 5 Marks
What will be the output? 2 Marks
What will type(3.0) return?
What does is operator check in Python?
Python – Global Interpreter Lock (GIL)
Which special method is used to represent an object as a string? 2 Marks
What is the output of bool("")?
What will print("Data"[::-1]) return? 2 Marks
What is the output of print(2**3)?
Which operator is used for floor division in Python?
Which function returns the length of a list?
What will this print? 5 Marks
Which of the following is true about Python memory management?
Which of these allows creating private attributes in Python? 2 Marks
Which of the following best describes Pickling in Python? 2 Marks
What will this code output? 2 Marks
Which of the following defines a constructor in Python?
What will be the output of this program? 5 Marks
Which method is automatically called when an object is deleted? 2 Marks
Which OOP concept allows multiple methods with the same name but different behavior? 2 Marks
Which decorator defines a method that does not take self or cls? 2 Marks
In multiple inheritance, the “diamond problem” arises when: 2 Marks
Which OOP concept is used in method overriding? 2 Marks
Which of the following statements about Python modules is correct?
Which statement is correct regarding Python exceptions?
Which of the following collections in Python is immutable?
Which of the following is not a valid Python keyword?
Which OOP principle hides implementation details from the user?
Which function converts a list into a set?
Which of the following is a valid Python data type?
Which method in OOP is automatically called when an object is created? 2 Marks
What is the correct way to define a function in Python?
Which keyword is used to inherit from a parent class? 2 Marks
What will this output? 5 Marks