1) What is the main purpose of abstraction in computer science? a) A) Hide details and focus on essentials  b) (B) Increase complexity c) (C) Store raw data d) (D) Debug code 2) Which of the following is an example of high-level abstraction? a) (A) Binary machine code b) (B) Assembly instructions c) (C) Python print("Hello") d) (D) CPU registers 3) Which of the following represents low-level abstraction? a) (A) Java code b) (B) HTML web design c) (C) Assembly language d) (D) SQL query 4) Abstraction helps programmers by: a) (A) Reducing unnecessary details b) (B) Exposing hardware complexity c) (C) Making programs longer d) (D) Eliminating APIs 5) Which pair correctly shows the difference? a) (A) High abstraction = machine code, Low abstraction = SQL b) (B) High abstraction = user interface, Low abstraction = machine code  c) (C) High abstraction = assembly, Low abstraction = Python d) (D) High abstraction = hardware, Low abstraction = application 6) What does procedural abstraction focus on? a) (A) Hiding how a procedure works, showing only inputs & outputs b) (B) Writing all steps explicitly c) (C) Hardware details d) (D) Data storage 7) Which is an example of procedural abstraction? a) (A) Writing an algorithm line by line b) (B) Using a function like sqrt(x) without knowing how it calculates c) (C) Running assembly instructions d) (D) Debugging a program 8) Why is procedural abstraction useful? a) (A) Makes programs longer b) (B) Avoids duplication & increases reusability c) (C) Exposes low-level details d) (D) Eliminates modularity 9) Which of the following is NOT procedural abstraction? a) (A) Using sort() to arrange a list b) (B) Writing raw sorting steps in assembly c) (C) Calling len() for length of a list d) (D) Using print() to display output 10) A student writes a function area_circle(r) that uses πr² inside. The user only gives r. This is: a) (A) No abstraction b) (B) Procedural abstraction c) (C) Data abstraction d) (D) Hardware abstraction 11) What does API stand for? a) (A) Application Programming Interface b) (B) Automated Program Instruction c) (C) Advanced Processing Integration d) (D) Abstracted Program Interaction 12) How does an API relate to abstraction? a) (A) Shows only how to use functions, not their implementation ✅ b) (B) Gives access to raw machine code c) (C) Increases hardware complexity d) (D) Forces low-level coding 13) Which is an example of using an API? a) (A) Writing assembly to print text b) (B) Calling requests.get("url") in Python c) (C) Writing your own networking protocol d) (D) Writing a full compiler 14) APIs are important because they: a) (A) Hide implementation details b) (B) Replace all programming languages c) (C) Remove the need for hardware d) (D) Limit programmer creativity 15) When you use Google Maps API to embed a map, you are using: a) (A) Low-level abstraction b) (B) Procedural abstraction c) (C) API abstraction d) (D) Machine code 16) What is a function in programming? a) (A) A block of reusable code b) (B) A hardware device c) (C) A type of variable d) (D) A debugging tool 17) Why do programmers use functions? a) (A) To repeat code multiple times b) (B) To organize, reuse, and simplify code c) (C) To increase complexity d) (D) To avoid abstraction 18) Which of these is a correct Python function definition? a) (A) def add(x, y): return x + y  b) (B) function add(x, y) = x + y c) (C) add(x, y) { return x + y } d) (D) create add(x, y): return x + y 19) What is a parameter in a function? a) (A) A value passed into the function b) (B) The function name c) (C) A variable stored inside the CPU d) (D) The program’s output 20) Calling a function means: a) (A) Writing the code of the function b) (B) Giving inputs and executing it c) (C) Creating a new variable

Leaderboard

Visual style

Options

Switch template

Continue editing: ?