Create a `Subject` class that allows `Observer` objects to `attach()`. When `Subject.set_state(state)` is called, it triggers `update(state)` on all attached observers. Read a state string, attach two observers (Obs 1 and Obs 2), update the subject, and print the notifications.
A single string representing the state.
Print the observer notifications.
None
Ready
Obs 1: Ready
Obs 2: Ready
The Observer pattern lets you define a subscription mechanism to notify multiple objects about any events that happen to the object they're observing.
class Subject:
pass
class Observer:
pass
if __name__ == '__main__':
state_input = input().strip()
# Implement observer logic
passEmbedded 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