Instructions

  • 1. Your final score will reflect your grasp of the concepts—approach each question with precision.
  • 2. Thoroughly review each solution before proceeding to ensure full understanding.
  • 3. Final results will be available after submission to provide insights into areas for further improvement.
  • 4. Maintain academic integrity—plagiarism undermines learning and professional growth.
  • 5. Once submitted, responses are final, so ensure you’re confident in your answers.
  • 6. These challenges are designed to test practical knowledge; apply your skills as you would in real-world scenarios.

All Problems

Question

Action

What is inheritance in Python?

View

Which keyword is used to inherit a class?

View

What type of inheritance occurs if a class inherits from two or more classes?

View

How do you access the parent class constructor in a subclass?

View

What is the primary purpose of inheritance?

View

Which method is overridden during method overriding?

View

What will happen if a subclass does not override a method?

View

Which function is used to check if a class is a subclass of another class?

View

Which of the following is NOT true about inheritance?

View

What is the output of issubclass(int, object)?

View

What is inheritance in Python?

Creating private attributes in a class
Creating a class from a base class
Overriding a function
Using multiple __init__() methods

Which keyword is used to inherit a class?

inherit
subclass
extends
None of these

What type of inheritance occurs if a class inherits from two or more classes?

Single inheritance
Multi-level inheritance
Multiple inheritance
Hybrid inheritance

How do you access the parent class constructor in a subclass?

super().__init__()
self.__init__()
Parent.__init__()
Both a and c are correct

What is the primary purpose of inheritance?

To increase code size
To avoid repetition of code
To improve performance
To allow classes to store data

Which method is overridden during method overriding?

A private method
A parent class method
A static method
Only abstract methods

What will happen if a subclass does not override a method?

The program throws an error
The subclass uses the parent class method
It will generate a warning
The program terminates

Which function is used to check if a class is a subclass of another class?

issubclass()
isinstance()
type()
subclass()

Which of the following is NOT true about inheritance?

Inheritance promotes reusability
Private methods cannot be inherited
A class can inherit from multiple classes
A child class can only have one constructor

What is the output of issubclass(int, object)?

True
False
Error
None