1) What is the primary purpose of a "for" loop in Python? a) It defines a function b) It makes a decision c) To repeat a block of code a specified number of times d) It declares a variable 2) Which of the following is NOT a valid data type in Python? a) Integer b) String c) Boolean d) Float Point 3) What is the output of the following code? a) 2.5 b) 2 c) 2.0 d) 2.5 (as a string) 4) In Python, which operator is used for exponentiation? a) ^ b) ** c) * d) // 5) What does the "if" statement do in Python? a) Repeats a block of code a specific number of times b) Declare a variable c) Executes a block of code only if a condition is true d) Prints a message to the screen 6) What component of a computer is responsible for storing data and programs permanently? a) RAM b) CPU c) Hard Drive (HDD or SSD) d) Motherboard 7) Which of the following is not a type of computer memory? a) RAM b) ROM c) CPU d) Cache 8) What does CPU stand for in computer hardware? a) Central Processing Unit b) Computer Programming Unit c) Central Power Unit d) Central Program Unit 9) Which type of monitor technology generally provides the best color accuracy and viewing a) LCD b) OLED c) CRT d) LEDs 10) What is the function of a GPU (Graphics Processing Unit) in a computer? a) It store data permanently b) To perform calculations and control the overall computer operation c) To render graphics and accelerate video playback d) To provide power to the computer components

Python Programming / Computer Hardware 9A2

Leaderboard

Visual style

Options

Switch template

Continue editing: ?