0
0
Intro to Computingfundamentals~10 mins

Memory management basics in Intro to Computing - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to show where data is stored temporarily during program execution.

Intro to Computing
memory_location = [1]
Drag options to blanks, or click blank then click option'
AHardDrive
BCPU
CMonitor
DRAM
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing RAM with permanent storage like HardDrive.
Thinking CPU is where data is stored temporarily.
2fill in blank
medium

Complete the sentence to explain what happens when memory is full.

Intro to Computing
When memory is full, the system may use [1] to store data temporarily.
Drag options to blanks, or click blank then click option'
Acache
Bvirtual memory
Cregisters
Dgraphics card
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing cache with virtual memory.
Thinking registers or graphics card are used for this purpose.
3fill in blank
hard

Fix the error in the statement about memory allocation.

Intro to Computing
Memory allocation is the process of [1] memory to programs when they need it.
Drag options to blanks, or click blank then click option'
Afreeing
Bignoring
Callocating
Ddeleting
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing freeing or deleting instead of allocating.
Not understanding the meaning of allocation.
4fill in blank
hard

Fill both blanks to complete the dictionary comprehension that maps variable names to their {{BLANK_1}} in bytes if size {{BLANK_2}} 4.

Intro to Computing
{var: size for var, size in variables.items() if size {{BLANK_2}} 4}
Drag options to blanks, or click blank then click option'
Amemory size
B>
C<
Dvariable type
Attempts:
3 left
💡 Hint
Common Mistakes
Using variable type instead of memory size.
Using '<' instead of '>' in the condition.
5fill in blank
hard

Fill both blanks to create a dictionary of variables with uppercase names, their sizes, and only if size {{BLANK_2}} 8.

Intro to Computing
{var[1]: size for var, size in variables.items() if size [2] 8}
Drag options to blanks, or click blank then click option'
A.upper()
B<
C>
D.lower()
Attempts:
3 left
💡 Hint
Common Mistakes
Using .lower() instead of .upper() for variable names.
Mixing up '<' and '>' operators in the condition.