Use strict composition. Build `CPU` (takes speed) and `RAM` (takes size) classes. Build a `Computer` class that takes both inputs and instantiates `CPU` and `RAM` internally. Add a `specs()` method that prints ‘CPU: [speed]GHz\nRAM: [size]GB’.
A float (CPU speed) and an integer (RAM size) separated by space.
Print the specs using strict formatting.
None
3.5 16
CPU: 3.5GHz
RAM: 16GB
A complete composition example. The computer manages the lifecycles of its internal hardware components.
class CPU:
pass
class RAM:
pass
class Computer:
pass
if __name__ == '__main__':
cpu_str, ram_str = input().split()
# Construct computer and show specs
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