Build a Vehicle and Car Hierarchy

Hard Single Inheritance Fundamentals PRO
🔒 Login to Unlock

Problem Statement

Build a `Vehicle` class with a `make` attribute and a `start()` method printing ‘Vehicle starting’. Build a `Car` class inheriting from `Vehicle`, adding a `model` attribute using `super()`, and overriding `start()` to print ‘Car [make] [model] starting’. Read make and model as inputs.

Input Format

Two space-separated strings.

Output Format

Print the formatted starting message.

Constraints

None

Sample Input

Toyota Corolla

Sample Output

Car Toyota Corolla starting

Explanation

A complete example of single inheritance combining `super()` initialization and method overriding.

Starter Code

class Vehicle:
    # Define __init__ and start
    pass

class Car(Vehicle):
    # Define __init__ and overridden start
    pass

if __name__ == '__main__':
    m, mdl = input().split()
    # Instantiate Car and call start
    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