0
0
Intro to Computingfundamentals~10 mins

GPU and graphics processing 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 print the main purpose of a GPU.

Intro to Computing
print("The GPU is mainly used for [1] processing.")
Drag options to blanks, or click blank then click option'
Agraphics
Btext
Caudio
Dnetwork
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing CPU tasks like text or network processing.
2fill in blank
medium

Complete the sentence to explain why GPUs are faster for graphics.

Intro to Computing
GPUs have many [1] that work together to process graphics quickly.
Drag options to blanks, or click blank then click option'
Acores
Bdisks
Cfans
Dbatteries
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing cores with storage or cooling parts.
3fill in blank
hard

Fix the error in the code that calculates total GPU cores.

Intro to Computing
total_cores = gpu_units [1] cores_per_unit
Drag options to blanks, or click blank then click option'
A-
B/
C+
D*
Attempts:
3 left
💡 Hint
Common Mistakes
Using + or - instead of * for multiplication.
4fill in blank
hard

Fill both blanks to create a dictionary of GPU names and their core counts.

Intro to Computing
gpu_cores = { [1]: [2] for [1], [2] in gpu_list }
Drag options to blanks, or click blank then click option'
Agpu
Bcores
Cgpu_name
Dcore_count
Attempts:
3 left
💡 Hint
Common Mistakes
Using the same variable for key and value.
5fill in blank
hard

Fill all three blanks to filter GPUs with more than 2000 cores.

Intro to Computing
filtered_gpus = { [1]: [2] for [1], [2] in gpu_data.items() if [2] > 2000 }
Drag options to blanks, or click blank then click option'
Aname
Bcores
Dgpu_data
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up keys and values in the loop.