Parameterized Constructors

Easy Object Lifecycle & Constructors
Solve in Playground →

Problem Statement

Create a `Rectangle` class with an `__init__` method that accepts `width` and `height` parameters. The constructor should print ‘Width: [width], Height: [height]’.

Input Format

Two space-separated integers representing width and height.

Output Format

Print the formatted dimensions.

Constraints

1 <= width, height <= 100

Sample Input

5 10

Sample Output

Width: 5, Height: 10

Explanation

Constructors can take arguments to initialize an object with specific data.

Starter Code

class Rectangle:
    # Write your parameterized __init__ here
    pass

if __name__ == '__main__':
    w, h = map(int, input().split())
    # Instantiate Rectangle with w and h
    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