Multiple Inheritance: Syntax and usage

Easy Advanced Inheritance & MRO
Solve in Playground →

Problem Statement

Create two classes: `Mother` with a method `traits(self)` printing ‘Mother genes’, and `Father` with a method `skills(self)` printing ‘Father skills’. Create a `Child` class that inherits from both. Instantiate `Child` and call both methods.

Input Format

None

Output Format

Print the traits and skills on separate lines.

Constraints

None

Sample Output

Mother genes
Father skills

Explanation

Python supports multiple inheritance, allowing a class to inherit attributes and methods from more than one parent class.

Starter Code

class Mother:
    def traits(self):
        print('Mother genes')

class Father:
    def skills(self):
        print('Father skills')

# Define Child class inheriting from Mother and Father
class Child:
    pass

if __name__ == '__main__':
    # Instantiate and call methods
    pass

Limits

  • Time Limit: 1s
  • Memory Limit: 256MB

Embedded C Programming

Updated: March 15, 2026
Intermediate

Embedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used