Abstract Properties

Medium Abstraction & Interfaces
Solve in Playground →

Problem Statement

Create an abstract class `Employee` with an abstract property `role`. Create a subclass `Manager` that provides the concrete property `role` returning ‘Team Lead’. Print the role of the Manager instance.

Input Format

None

Output Format

Print the role string.

Constraints

None

Sample Output

Team Lead

Explanation

You can combine @property and @abstractmethod to force subclasses to provide specific state/attributes.

Starter Code

import abc

class Employee(abc.ABC):
    # Define abstract property 'role'
    pass

class Manager(Employee):
    # Implement concrete property 'role'
    pass

if __name__ == '__main__':
    m = Manager()
    print(m.role)

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