Question

    What is polymorphism in Python?

    A When objects of different classes can be treated as objects of a common superclass Correct Answer Incorrect Answer
    B When objects of the same class can be treated as objects of different classes Correct Answer Incorrect Answer
    C When a class can only have one method with a given name Correct Answer Incorrect Answer
    D When a class can have multiple methods with the same name but different parameters Correct Answer Incorrect Answer
    E When a class cannot have any methods Correct Answer Incorrect Answer

    Solution

    Explanation: Polymorphism is the ability of objects of different classes to be treated as objects of a common superclass. This allows for more flexibility in programming and makes it easier to write code that can work with different types of objects.

    Practice Next