Courseiva
Object-Oriented ProgramminghardMultiple SelectObjective-mapped

How Method Overriding Works in Python: super() and Same Method Name

Which THREE of the following are true about method overriding in Python?

Quick Answer

The answer is that the subclass method can have a different return type. This is true because method overriding in Python using super focuses on the method name and signature, not the return type; Python is dynamically typed, so the interpreter does not enforce return type consistency between parent and child methods. On the Certified Associate Python Programmer PCAP exam, this concept tests your understanding that overriding is about replacing behavior, not matching return annotations, and a common trap is assuming that a different return type breaks the override relationship. Remember, in Python, the same method name in the child class always overrides the parent’s version, regardless of what the child returns. For a quick memory tip: “Same name, any return — Python won’t spurn.”

⚠ Common exam trap

Python Institute often tests the misconception that Python requires an `@override` decorator (like Java or C#) or that changing the parameter list is allowed in overriding, when in fact Python uses implicit overriding based solely on method name and expects the same signature for correct polymorphic behavior.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The subclass method must have the same name.

Method overriding in Python requires the subclass method to have the same name as the parent class method. This is the fundamental rule of overriding — without the same name, the method is not overriding but rather defining a new method. The subclass method replaces the inherited method when called on an instance of the subclass.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The subclass method must have the same name.

    Why this is correct

    Method overriding is based on the same method name as in the parent class.

  • The parent method can be called using `super()`.

    Why this is correct

    `super()` is the standard way to invoke the overridden parent method.

  • The `@override` decorator is required.

    Why it's wrong here

    Python has no built-in `@override` decorator; it is not required for overriding.

  • The subclass method can have a different return type.

    Why this is correct

    Python does not enforce return type, so a different return type is allowed.

  • The subclass method can have a different number of parameters.

    Why it's wrong here

    For proper overriding, the signature should match; otherwise, it's not considered overriding (though Python does not enforce it).

About these practice questions

Courseiva writes every PCAP question from scratch — 169 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on PCAP

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Which TWO statements about method overriding in Python are correct?

medium
  • A.The overriding method can call the parent method using super()
  • B.The overriding method must have the same name
  • C.The overriding method requires explicit use of the @override decorator
  • D.The overriding method must have the exact same parameter list
  • E.Overriding is resolved at compile time

Why A: The overriding method can call the parent class's version of the method using the built-in `super()` function, which returns a proxy object that delegates method calls to the parent class. This is a fundamental feature of Python's inheritance mechanism, allowing the child method to extend or modify the parent's behavior while still invoking it.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PCAP practice question is part of Courseiva's free Python Institute certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCAP exam.