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 polymorphism?

View

Which of these demonstrates polymorphism?

View

Can Python natively support method overloading?

View

How does Python implement polymorphism?

View

Which of the following operators can be overloaded?

View

Which method is used to overload the == operator?

View

What is the output of this code?

View

Which of the following shows runtime polymorphism?

View

How do you overload the + operator in Python?

View

What does super() do in polymorphism?

View

What is polymorphism?

Defining multiple classes
A method taking multiple forms
Inheriting from multiple classes
None of the above

Which of these demonstrates polymorphism?

A class with only one method
A method overridden in a child class
Multiple objects with identical attributes
A single inheritance structure

Can Python natively support method overloading?

Yes
No
Only in built-in libraries
Only with decorators

How does Python implement polymorphism?

Using function overloading
Using method overriding
By overloading constructors
Using built-in libraries

Which of the following operators can be overloaded?

==
&&
++
?:

Which method is used to overload the == operator?

__eq__()
__equals__()
__cmp__()
__compare__()

What is the output of this code?

class Animal: def sound(self): print("Some sound") class Dog(Animal): def sound(self): print("Bark") a = Dog() a.sound()

Some sound
Bark
Error
None

Which of the following shows runtime polymorphism?

A class with multiple methods
Overloading the constructor
Method overriding in a subclass
A static method in a class

How do you overload the + operator in Python?

Using __add__() method
Using __plus__() method
Overloading is not supported
By defining a new operator

What does super() do in polymorphism?

Calls a child class method
Calls a parent class method
Prevents method overriding
Prevents polymorphism