0
0
Operating Systemsknowledge~30 mins

I/O hardware basics in Operating Systems - Mini Project: Build & Apply

Choose your learning style9 modes available
I/O Hardware Basics
📖 Scenario: You are learning about the basic components of input/output (I/O) hardware in a computer system. Understanding these components helps you see how computers communicate with the outside world.
🎯 Goal: Build a simple list of common I/O hardware devices, add a category filter, then select devices by category, and finally label the list with a descriptive title.
📋 What You'll Learn
Create a dictionary named io_devices with exact device names as keys and their categories as values.
Create a variable named filter_category to hold the category to filter devices by.
Use a dictionary comprehension named filtered_devices to select devices matching the filter_category.
Add a variable named list_title with the exact string describing the list.
💡 Why This Matters
🌍 Real World
Understanding I/O hardware categories helps in managing computer resources and troubleshooting device connections.
💼 Career
Knowledge of I/O hardware basics is essential for roles in IT support, system administration, and computer hardware maintenance.
Progress0 / 4 steps
1
Create the I/O devices dictionary
Create a dictionary called io_devices with these exact entries: 'Keyboard': 'Input', 'Monitor': 'Output', 'Printer': 'Output', 'Mouse': 'Input', 'Speaker': 'Output'.
Operating Systems
Need a hint?

Use curly braces {} to create a dictionary with keys and values separated by colons.

2
Set the filter category
Create a variable called filter_category and set it to the string 'Input' to filter input devices.
Operating Systems
Need a hint?

Assign the string 'Input' to the variable filter_category.

3
Filter devices by category
Use a dictionary comprehension to create a new dictionary called filtered_devices that includes only the devices from io_devices where the category matches filter_category. Use device and category as the loop variables.
Operating Systems
Need a hint?

Use {device: category for device, category in io_devices.items() if category == filter_category} to filter the dictionary.

4
Add a descriptive title
Create a variable called list_title and set it to the string 'List of Input Devices' to describe the filtered list.
Operating Systems
Need a hint?

Assign the exact string 'List of Input Devices' to the variable list_title.