Modifying Class Variables globally

Easy State Management (Variables)
Solve in Playground →

Problem Statement

Given a `Settings` class with a class variable `theme = ‘Light’`. Before instantiating, change `Settings.theme` globally based on user input. Create an instance and print ‘Current Theme: [theme]’.

Input Format

A single string representing the new theme.

Output Format

Print the formatted theme string.

Constraints

None

Sample Input

Dark

Sample Output

Current Theme: Dark

Explanation

Updating a class variable directly on the class updates the shared state for all current and future instances.

Starter Code

class Settings:
    theme = 'Light'

if __name__ == '__main__':
    new_theme = input().strip()
    # Modify the class variable globally, then 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