Build a FlyingAmphibiousCar

Medium Advanced Inheritance & MRO PRO
🔒 Login to Unlock

Problem Statement

Create three classes: `Car` with method `drive()` printing ‘Driving…’, `Boat` with method `swim()` printing ‘Swimming…’, and `Plane` with method `fly()` printing ‘Flying…’. Create a `FlyingAmphibiousCar` class inheriting from all three. Instantiate it and call `drive()`, `swim()`, and `fly()` in that exact order.

Input Format

None

Output Format

Print the three actions on separate lines.

Constraints

None

Sample Output

Driving...
Swimming...
Flying...

Explanation

Combining behaviors from multiple disparate parent classes represents the core utility of multiple inheritance.

Starter Code

class Car:
    def drive(self): print('Driving...')

class Boat:
    def swim(self): print('Swimming...')

class Plane:
    def fly(self): print('Flying...')

class FlyingAmphibiousCar(Car, Boat, Plane):
    pass

if __name__ == '__main__':
    # Instantiate and call all three 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