Instance Variables: Object-specific state

Easy State Management (Variables)
Solve in Playground →

Problem Statement

Create a `Car` class. In its `__init__` method, set `color` and `speed` as instance variables. Read two space-separated words, instantiate the car, and print ‘Color: [color], Speed: [speed]’.

Input Format

Two space-separated strings (color and speed).

Output Format

Print the formatted instance state.

Constraints

None

Sample Input

Red 100

Sample Output

Color: Red, Speed: 100

Explanation

Instance variables belong to a specific object, meaning every Car can have a different color and speed.

Starter Code

class Car:
    # Define __init__ and instance variables
    pass

if __name__ == '__main__':
    # Read inputs, instantiate, and print
    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