Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to print the main role of an operating system.
Intro to Computing
print('The main role of an operating system is to manage [1].')
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing software or applications instead of hardware.
✗ Incorrect
The operating system manages the hardware resources of a computer, such as CPU, memory, and devices.
2fill in blank
mediumComplete the code to list an example of an operating system.
Intro to Computing
example_os = '[1]' print(f'An example of an operating system is {example_os}.')
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing application software instead of an OS.
✗ Incorrect
Windows is a widely used operating system. The others are applications.
3fill in blank
hardFix the error in the code to show the OS managing memory.
Intro to Computing
def manage_memory(): print('Operating system manages [1] allocation.') manage_memory()
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing memory with files or networks.
✗ Incorrect
The operating system manages memory allocation to programs and processes.
4fill in blank
hardFill both blanks to create a dictionary of OS examples and their types.
Intro to Computing
os_examples = {'Windows': '[1]', 'Linux': '[2]'}
print(os_examples) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing application or hardware terms with OS types.
✗ Incorrect
Windows is a proprietary OS, while Linux is open-source.
5fill in blank
hardFill the blank to create a dictionary comprehension filtering OS names starting with 'W'.
Intro to Computing
filtered_os = {name: type_ for name, type_ in os_examples.items() if name.[1]('W')}
print(filtered_os) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using equality operators instead of string methods.
✗ Incorrect
The startswith() method checks if the OS name begins with 'W'.