

JC2 09-19-25
Presentation
•
Computers
•
9th - 12th Grade
•
Hard
Casielyn Miraflores Capistrano
FREE Resource
41 Slides • 112 Questions
1
Revision 9618
By Casielyn Capistrano
2
Computational Thinking Skills: ABSTRACTION
Abstraction is the process of removing unnecessary details from a problem to focus on the important features for implementing a solution.
Abstraction is the process of extracting information that is essential, while ignoring what is not relevant, for the provision of a solution.
Exam Tip: Remember the mnemonic
AIR - Abstraction Is Reduction.
* You reduce the complexity by hiding irrelevant details.
* Focus on the core idea, essential steps, structures or patterns.
3
Computational Thinking Skills: ABSTRACTION
Abstraction, think of it as an Abstract Art, artist simplify reality into essential shapes and colours just like programmers they simplify problems into key steps and data.
4
Computational Thinking Skills: ABSTRACTION
Examples of abstraction include modelling a:
1. Real-life object
Example is a car in a video game, we don’t need to model every screw, wire, or mechanical detail. Instead, we abstract it into features we care about speed, color, movement. This is abstraction because we’re focusing only on relevant properties and ignoring unnecessary details.
2. Environment
Example a 3D simulation of a city or a forest. Instead of modelling every blade of grass or grain of sand, we use simplified shapes/textures that still give the idea of the environment. The abstraction makes it manageable and understandable while still serving the purpose e.g., navigation, gameplay, training.
3. Action
Example, pressing a button to open a door in software. In reality, pressing a button might involve electrical signals, sensors, and logic circuits. But we abstract it as just one “action”: open the door. Abstraction hides the complexity of the real mechanism.
5
Computational Thinking Skills: ABSTRACTION
4. Sequence of actions
Example, logging into a website. The real process involves encryption, server communication, database checks, and session tokens. But to the user, it’s abstracted as just enter username, enter password, click login. The whole sequence is treated as a higher-level process instead of exposing every technical step.
5. Concept
Example is democracy or gravity. These are abstract ideas that don’t physically exist as objects. We build simplified models rules, formulas, diagrams to represent them. This is abstraction because we represent a complex, broad concept in a simplified, structured way for reasoning and communication.
6
Computational Thinking Skills: ABSTRACTION
Implementations of these include:
- a computer game that simulates playing a sport
- a simulator such as a car or flight simulator,
- a map of a bus or train route in a city
Implementations of abstractions mean real systems or tools that use abstract models to represent reality
So, when creating a program, developers must identify important features that will contribute to solving the problem or have a role to play in the solution.
7
Computer games
A computer game that simulates playing a sport.
The real-life sport e.g., football, basketball, tennis is abstracted into rules, graphics, and actions. The computer game implements this abstraction. Players can pass, shoot, or score without worrying about real physics, fatigue, or stadium logistics. The game doesn’t capture every detail of the sport like weather, player injuries, crowd noise in full realism, but it captures enough to simulate the experience.
8
A simulator such as a car or flight simulator
The abstraction here is driving a car or flying an aircraft is highly complex, involving many systems engine, aerodynamics, instruments. The simulator implements this abstraction by providing a virtual environment where the essential aspects steering, speed, navigation, cockpit controls are recreated.
Non-essential details are ignored or simplified e.g., the exact wear of tires or every microscopic airflow over a wing.
9
A map of a bus or train route in a city
The real city environment is full of buildings, roads, traffic, and people. The transport map implements an abstraction of just the important details: bus or train routes, stops, and connections. It leaves out unnecessary information like building heights or exact street widths, because the purpose is to navigate the transport system, not the entire city.
10
TYPES OF ABSTRACTION
1. DATA ABSTRACTION
- representing complex data structures in a simplified way e.g., using an array instead of raw memory addresses. It applies in DBMS to hide the underlying complexities of how data is stored and managed while in OOP to hide the low-level details of programming constructs that define underlying logic.
Example: When storing student records, instead of manually managing raw memory addresses, we use an array or record structure like: DECLARE StudentRecord : ARRAY[1:30] OF STRING we don’t care how the computer maps each string into memory, only that StudentRecord[5] gives us the 5th student’s name.
11
TYPES OF ABSTRACTION
2. PROCEDURAL ABSTRACTION
- using functions/procedures without worrying about how they work inside. It is a programming concept where complex processes are encapsulated into procedures or functions with a name, allowing programmer to focus on what a procedure does rather than how it works internally. In other words, Procedural Abstraction is using a procedure or function without needing to know how it works internally.
Example:
Calling a library procedure like Sort(Array) or OpenFile("data.txt").
The programmer doesn’t know or need to know whether the sort is bubble sort, quicksort, or merge sort, only that the array will come back sorted.
12
TYPES OF ABSTRACTION
3. PROBLEM ABSTRACTION
- stripping away details to form a general model of the problem. Problem Abstraction means removing unnecessary details from a real-world problem to focus on its essential features.
Example:
To plan a traffic light control system, we don’t model the color of the poles, pedestrians’ clothes, or car brands.
Instead, we only model:
Traffic lights have 3 states: Red, Amber, Green
Cars stop on Red, go on Green.
Timing of light changes.
13
TYPES OF ABSTRACTION
4. FUNCTIONAL ABSTRACTION
- is a programming technique where repeated or complex processes are extracted into reusable functions, hiding their internal workings on implementation details and exposing only their purpose. It focusing on what a function does, not how it achieves it.
Example:
A function CalculateTax(income), we only care that it outputs the correct tax value.
We don’t need to know if it uses if…else, lookup tables, or switch statements inside.
14
TYPES OF ABSTRACTION
5. DECOMPOSITION or Stepwise Refinement
- Breaking a complex problem into smaller, manageable sub-problems.
Example:
Problem: Write a program to simulate a vending machine.
1. Break down into parts:
2. Display menu of items
3. Take user input (choice + payment)
4. Check if payment is sufficient
5. Dispense item and change
6. Update stock
Each part can then be solved separately and coded as a procedure.
15
During exam, when asked about abstraction, always give a definition and simple example. Usually it has 4 to 6 marks.
16
Open Ended
Define abstraction in computer science. (2 marks)
17
Abstraction is the process of removing unnecessary details and focusing only on the essential features of a problem.
Common Mistake in answering this question:
You only say “simplifying a problem” which is too vague or just saying “removing details” without mentioning essential features.
18
Open Ended
Explain, with an example, how abstraction is used in programming. (3–4 marks)
19
Abstraction is the process of removing unnecessary details and focusing only on the important features. In programming, this makes it easier to solve complex problems . For example, when a programmer calls the sortList() procedure, they do not need to know how the sorting algorithm works internally, they only need to know that it returns a sorted list.
Common Mistake in answering this question:
Giving too brief answer without mention removing unnecessary details or focusing on essentials.
You just explain how abstraction used in everyday life but forget to tie it back to programming context which is required in the question.
No example given or giving generic example like abstraction is when you use variables or misconception like abstraction is when you delete details in your code
20
Open Ended
Identify the type of abstraction when a programmer uses a pre-written library function like sqrt(). (2 marks)
21
This is an example of functional abstraction because the programmer only cares that sqrt() returns the square root, not the steps used to calculate it.
Common Mistake in answering this question:
Some common mistakes include writing “Data abstraction”, which confuses data storage with the use of functions; saying “Problem abstraction”, which incorrectly focuses on real-world simplification instead of code use; only stating the term without providing an explanation for example, just writing “Functional abstraction”, which would only gain 1 mark; and describing the algorithm inside sqrt() such as Newton’s method, which is irrelevant and would lose the explanation mark.
22
Open Ended
Describe the role of abstraction when designing an algorithm to simulate traffic lights. (4 marks)
23
Model Answer:
Abstraction removes unnecessary details and focuses only on the essential features of the traffic light system. For example, the simulation only needs to represent the lights as having three states, Red, Yellow, and Green and the rules for changing between them. It does not need to include details such as the colour of the traffic light poles, the type of light bulbs, or the make of the cars. This reduction in complexity makes the algorithm easier to design and understand.
Common Mistake in answering this question:
Writing only “Abstraction makes it simpler” without context. Just saying “Breaks the traffic system into smaller steps” that’s decomposition, not abstraction. Or writing about making the traffic lights automatic instead of simplifying the model. And not mentioning what details are kept vs ignored.
24
Open Ended
Explain the difference between problem abstraction and data abstraction, with examples. (6 marks)
25
Model Answer:
Problem abstraction is the process of removing unnecessary real-world details to create a simplified model of the problem. Example: In a traffic light simulation, only the red, amber, and green states are represented, not the design of the poles or brands of cars. Data abstraction is the process of hiding how data is stored in memory and representing it in a logical structure instead. Example: Using an array to store student names rather than handling raw memory addresses. The difference is that problem abstraction simplifies what aspects of reality are modelled, while data abstraction simplifies how data is represented in a program.
Common Mistake in answering this question:
Giving two definitions but no examples, mixing them up, e.g., saying problem abstraction is using an array which confuses with data abstraction. Giving two unrelated examples without explaining the difference. Writing only one-word differences like problem = real world, data = data without elaboration. And not linking the examples to the abstraction type.
26
Open Ended
Evaluate how abstraction helps in the development of complex software systems. (8 marks)
27
Model Answer:
Abstraction helps in the development of complex software systems by reducing unnecessary detail, which makes problems easier to manage and understand. Large problems can be broken down into smaller, simpler components through decomposition, and each part can be solved independently. Using procedural and functional abstraction, programmers can reuse modules and functions without knowing their internal code, saving development time. Data abstraction allows the program to handle complex structures logically without worrying about low-level memory management. Overall, abstraction reduces complexity, improves maintainability, and supports teamwork, since different developers can work on separate modules. It also makes software more scalable and easier to debug or extend in the future.
Common Mistake in answering this question:
Just defining abstraction without evaluating its role in software development, only giving one type of abstraction e.g., just problem abstraction instead of showing a range. Confusing abstraction with encapsulation or generalisation. Writing vague benefits like abstraction makes programs better without linking to complexity, maintainability, or teamwork. Not using software development context students sometimes give real-world analogies like Google Maps, which won’t earn high marks here.
28
Multiple Choice
A programmer uses a procedure sortList() without knowing its algorithm. Which type of abstraction is this?
Data abstraction
Procedural abstraction
Functional abstraction
Problem abstraction
29
Q. A programmer uses a procedure sortList() without knowing the underlying algorithm. Which type of abstraction is this?
A. Procedural Abstraction
Because the programmer is making use of a procedure without worrying about how it works internally. The programmer is using a procedure (sortList) without caring if it’s bubble sort, quicksort, or merge sort. That’s procedural abstraction.
30
Multiple Choice
A library management system stores books in an array of records rather than tracking raw memory addresses. Which type of abstraction is applied here?
Data abstraction
Procedural abstraction
Functional abstraction
Problem abstraction
31
Q. A library management system stores books in an array of records rather than tracking raw memory addresses. Which type of abstraction is applied here?
A. Data Abstraction
In data abstraction, the raw memory management is hidden, and the array provides a simplified logical structure for storing and accessing data.
32
Multiple Choice
A program models a traffic light system by only representing Red, Yellow, and Green states, ignoring details such as pole design or light bulb brand. What type of abstraction is used?
Data abstraction
Procedural abstraction
Functional abstraction
Problem abstraction
33
Q. A program models a traffic light system by only representing Red, Yellow, and Green states, ignoring details such as pole design or light bulb brand. What type of abstraction is used?
A. Problem Abstraction
This is about simplifying a real-world problem to its essential details, which is known as problem abstraction. if we are designing a program to simulate a traffic light system, we do not need to model the shape of the pole, the brand of the bulbs, or the colour of the paint. These details are irrelevant to the problem being solved. Instead, we only keep the essential details: the traffic light has three states (Red, Yellow, Green), cars stop when the light is Red, and cars go when the light is Green. By abstracting away the irrelevant information, the programmer can focus on the core logic of the problem and design an algorithm that is simpler, clearer, and more efficient. This makes it easier to implement and reduces the risk of being distracted by unnecessary complexity.
34
Multiple Choice
A complex program to simulate a vending machine is divided into smaller parts: display menu, take payment, check stock, dispense item, give change. This is an example of:
Decomposition
Procedural abstraction
Functional abstraction
Problem abstraction
35
Q. The vending machine program is broken down into smaller sub-problems such as displaying the menu, taking payment, checking stock, dispensing the item, and giving change.
A. Decomposition
Decomposition means splitting a large, complex task into manageable modules. Each sub-problem can be solved and tested separately, making the overall system easier to design, code, and debug.
36
Multiple Choice
Using LENGTH(string) in pseudocode without needing to know how the system counts characters is an example of:
Decomposition
Procedural abstraction
Functional abstraction
Problem abstraction
37
Q. Using LENGTH(string) in pseudocode without needing to know how the system counts characters is an example of
A. Procedural Abstraction
LENGTH(string) is a predefined procedure. The user doesn’t care how characters are counted.
38
Multiple Choice
A programmer decides to represent a chess board as an 8×8 2D array, rather than modelling each square’s memory location individually. Which abstraction is used?
Decomposition
Procedural abstraction
Functional abstraction
Data abstraction
39
Q. A programmer decides to represent a chess board as an 8×8 2D array, rather than modelling each square’s memory location individually. Which abstraction is used?
A. DATA Abstraction
The 2D array hides low-level memory allocation and gives a logical structure
40
Multiple Choice
In designing a school timetable system, the programmer ignores students’ hair colour, hobbies, and breakfast details. Which type of abstraction is applied?
Data abstraction
Procedural abstraction
Functional abstraction
Problem abstraction
41
Q. In designing a school timetable system, the programmer ignores students’ hair colour, hobbies, and breakfast details. Which type of abstraction is applied?
A. Problem Abstraction
Problem abstraction means removing unnecessary real-world details and focusing only on the essential aspects needed to solve the problem. In this case, the only relevant details are subjects, teachers, times, and rooms, extra personal information is not needed.
42
DECOMPOSITION
Decomposition is breaking down a big problem into smaller problems so that they can be solved independently. Decomposition is the process of breaking down a complex problem or system into smaller, more manageable sub-problems that can be solved independently and then combined to produce the overall solution.
Think of Decomposition as Divide to Conquer
43
Benefits of DECOMPOSITION
Programmers use decomposition to (BIIS):
Break problems down
Identify the steps, parts or processes involved in a problem
Identify reusable components
Split tasks between programmers
Remember the acronym "PETM" (Pet-Me)
Planning where the problems are break into sub-tasks
Easier debugging
Testing individually
Maintenance simpler
44
DECOMPOSITION
Why it matters?
Design
- Decomposition makes programs easier to design because the solution can be built step by step.
WRITE
- It makes them easier to write since the program is divided into smaller chunks of code.
Test
- It simplifies testing because errors can be located more easily.
Maintain
- It improves maintenance as changes can be made in one module without affecting the whole system.
Reuse
- it supports reuse since sub-problems written as functions or procedures can be reused in other programs.
45
DECOMPOSITION
In the case of slow appointment booking, you could decompose the problem into issues such as server limitations during peak hours, inefficient backend algorithms, and user interface delays
Process of decomposition to break problems down
46
Using abstraction to design a solution
Before we start to break problems down, it is often useful to apply the rules of abstraction to the problem
Applying abstraction will remove non-essential elements and that programmers can focus on critical aspects for problem-solving
When addressing a slow booking system, a programmer could ignore elements like the system's colour scheme or graphics and focus on critical performance metrics such as server response time and database query efficiency
47
Decomposing slow response times problem
48
Open Ended
What is decomposition in problem-solving?
49
Model Answer: Decomposition is the process of breaking a large problem into smaller, more manageable parts that can be solved independently.
Decomposition means breaking a large or complex problem into smaller, more manageable sub-problems that can be solved independently and then combined to form the complete solution.
Common Mistake in answering this question:
When just say breaking down without mentioning that the parts should be manageable or solvable on their own.
50
Open Ended
Explain how decomposition helps when designing a large program.
51
Model Answer: Decomposition helps because tasks can be allocated to different programmers, modules can be reused in other programs, testing and debugging are easier on smaller sections, and it supports structured programming.
Decomposition helps by making it easier to divide tasks among programmers, reuse modules in other programs, test and debug smaller sections, and keep the program structured and easier to maintain.
Common Mistake in answering this question:
When you only mention it makes it easier without giving specific benefits like reuse, testing, maintenance.
52
Open Ended
A school system needs to manage students, teachers, and classes. Show how decomposition could be applied
53
Model Answer: The main system can be decomposed into Student Management, Teacher Management, and Class Scheduling. Student Management can then be further broken down into Add Student, Update Student, and Search Student modules.
complex system like a school database is divided into major sub-systems students, teachers, classes, and each sub-system is further broken down into smaller functions e.g., add, update, search.
Common Mistake in answering this question:
When you give vague answers like divide the school system without showing sub-level breakdown.
54
Open Ended
Explain how decomposition is used in pseudocode/programming.
55
Model Answer: Decomposition is shown in pseudocode by using functions or procedures to represent sub-problems. For example:
PROCEDURE Main
CALL InputMarks
CALL CalculateGrades
CALL PrintReport
ENDPROCEDURE
In programming, decomposition is applied through the use of functions and procedures, where each module represents one sub-problem. The main program calls these modules to form the complete solution.
Common Mistake in answering this question:
When you just list procedures without explaining that they represent sub-problems.
56
Open Ended
Distinguish between decomposition and abstraction
57
Model Answer: Decomposition means breaking a problem into smaller sub-problems. Abstraction means hiding unnecessary details and focusing only on the essential features.
Decomposition focuses on splitting the problem into smaller parts, while abstraction removes unnecessary details so we can focus on what’s important.
Common Mistake in answering this question:
When you confuse the two by writing only one definition or saying they are the same.
58
Pattern recognition is used to identify those parts that are similar and could use the same solution. This leads to the development of reusable program code in the form of subroutines, procedures and functions. When writing a computer program, each final part is defined as a separate program module that can be written and tested as a separate procedure or function, as shown in Figure 9.2. Program modules already written and tested can also be identified and reused, thus saving development time.
59
Try to Answer the following:
60
Multiple Choice
What is abstraction?
Removal of certain details, keeping relevant the information
Stores data in a program for retrieval
Freedom from representing art
Detects errors while program is running
61
Multiple Choice
What is an algorithm?
A very complicated thing.
A series of step by step instructions to do a task.
A long story.
A game.
62
Multiple Choice
Can you skip a step while making an algorithm?
Yes
No
63
Multiple Select
The steps of an algorithm can be followed in any order to produce the same result.
True
False
64
Multiple Select
A complete algorithm helps in performing a specific task.
True
False
65
Multiple Choice
An _______________ is a precise,step by step set of instructions to perform a specific task.
task
sequence
sub-tasks
algorithm
66
Multiple Choice
What is Debugging?
A problem in the program.
A way to find the bug.
A way to find the problem and fix it.
67
Multiple Choice
What is a bug?
A problem in the algorithm.
A way to fix the problem.
A list of steps.
68
Multiple Choice
What is Sequence?
A set of instructions for computer.
An order of events.
69
Multiple Choice
To sequence means to ____________.
put things in order
to tell what it's mostly about
to figure out what is happening
70
Multiple Choice
What is an algorithm?
A sequence of steps used to solve a problem, which presents a unique method of addressing this situation.
A sequence used only to represent mathematical concepts.
An sequence which is never finite, well-defined. or effective.
71
Multiple Choice
What does DSA stand for?
Dynamic Systems Analysis
Data Structures and Algorithms
Data Storage and Access
Dynamic Software Architecture
72
Multiple Select
What will the following are not logical operators?
AND
<
OR
==
73
Multiple Choice
Which pseudocode correctly asks the user to input their name and outputs a greeting?
OUTPUT "Hello"
INPUT name
OUTPUT "Enter your name:"
INPUT name; OUTPUT "Hello, " + name
74
Multiple Choice
What is the primary purpose of assembly language?
To create high-level programming languages.
To directly execute programs without compilation.
The primary purpose of assembly language is to provide a human-readable representation of machine code for programming and controlling computer hardware.
To simplify the use of graphical user interfaces.
75
Multiple Choice
What is the purpose of a function in Python?
The purpose of a function in Python is to encapsulate code for reuse and organization.
To define variables in Python
To handle exceptions in Python
To create classes in Python
76
Multiple Choice
What is the primary role of a computer programmer?
To create user interfaces
To design hardware components
To write, modify, and test code
To manage network systems
77
Multiple Choice
What is the mother tongue of computers?
English
French
Machine code
Python
78
Multiple Choice
The first generation of programming language is
Machine code
Assembly language
High Level language
Python
79
Multiple Choice
Python and Java are examples of
Machine Code
Assembly language
High level language
Low level language
80
Multiple Choice
An example of a second generation language is
Machine code
Assembly language
High level language
Python
81
Multiple Choice
Instructions in machine code are in
English
French
Python
Binary
82
Multiple Choice
Assembly language makes use of
English words
Commands
Mnemonics
SQL commands
83
Multiple Choice
High level language makes use of
English words
Python commands
Mnemonics
Binary codes
84
Multiple Choice
Programs in machine code are
Machine oriented
Mnemonics
Problem oriented
Letter codes
85
Multiple Choice
Programs in HLL are
Machine oriented
Mnemonics
Memory Oriented
Problem oriented
86
Multiple Choice
Machine code and Assembly language are examples of
High level languages
Machine language
Low level languages
SQL Commands
87
Fill in the Blanks
88
Fill in the Blanks
89
Fill in the Blanks
90
Fill in the Blanks
91
Fill in the Blanks
92
Multiple Choice
How do you define a function in Python?
def function_name(parameters):
function_name(parameters) =>
create function_name(parameters)
function_name: parameters()
93
Multiple Choice
What is the difference between a function and a method in Python?
A function can only return a value, while a method cannot.
Methods are defined outside of classes, while functions are defined inside classes.
A function is independent, while a method is associated with an object.
A method is a type of function that cannot take parameters.
94
Multiple Choice
How can you return multiple values from a function?
Use a list to return values.
Return a single value only.
Return values through global variables.
Use a tuple to return multiple values from a function.
95
Multiple Choice
What is a common debugging technique in Python?
Using a debugger tool
Using print statements for debugging
Writing unit tests
Ignoring error messages
96
Multiple Choice
How can you use print statements for debugging?
Insert print statements to display variable values and program flow at key points in the code.
Insert print statements only at the beginning of the code.
Remove all print statements to avoid clutter in the output.
Use print statements to write comments in the code.
97
Multiple Choice
What is the purpose of the assert statement in debugging?
To optimize code performance during execution.
To verify assumptions and catch errors during debugging.
To automatically fix errors in the code.
To enhance the user interface of the application.
98
Multiple Choice
What tools can be used for debugging in Python?
pdb, logging, IDEs (PyCharm, VS Code), ipdb, PySnooper
assertions
try-except blocks
print statements
99
Multiple Choice
What is the syntax for a for loop in Python?
for variable in sequence[]
for (variable : sequence)
for each variable in sequence:
for variable in sequence:
100
Multiple Choice
How do you iterate over a list using a for loop?
for item in my_list: print(item)
for item in range(len(my_list)): print(my_list[item])
for item in my_list: print(item, end='')
for item in my_list: item.print()
101
Multiple Choice
What is the difference between a for loop and a while loop?
A for loop iterates a known number of times, while a while loop continues until a condition is false.
A for loop runs indefinitely, while a while loop stops after a set number of iterations.
A for loop is used for conditional statements, while a while loop is used for iteration.
A for loop requires a condition, while a while loop does not need any conditions.
102
Multiple Choice
How can you use the range() function in a for loop?
You can use range() to generate random numbers in a for loop.
You can use range() to create a list of strings.
You can use range() in a for loop to iterate over a sequence of numbers.
range() is used to define the number of iterations in a while loop.
103
Multiple Choice
What is the syntax for a while loop in Python?
for condition: code to execute
repeat condition: code to execute
do while condition: code to execute
while condition: # code to execute
104
Multiple Choice
What is the purpose of the break statement in loops?
The break statement continues to the next loop iteration.
The break statement terminates the loop execution.
The break statement skips the current iteration of the loop.
The break statement pauses the loop execution.
105
Multiple Choice
How can you use the continue statement in a loop?
The continue statement is used to exit the loop completely.
You can use the continue statement in a loop to skip the current iteration and continue with the next one.
You can use the continue statement to restart the loop from the beginning.
The continue statement ends the loop immediately.
106
Multiple Choice
Which of the following is an example of an assembly language instruction?
IF
MOV
FOR
107
Multiple Choice
An assembler is a software tool that:
compiles high-level code into assembly language
optimizes machine code for performance
translates assembly language into machine code
debugs machine code for errors
108
Multiple Choice
An algorithm is a:
A step-by-step procedure for solving a problem.
A method for storing information
A type of programming language
A random collection of data
109
Multiple Choice
Which of the following is a simple algorithm?
Finding the median in a dataset
Sorting a list of numbers
Finding the maximum number in a list
Calculating the average of a set of values
110
Multiple Choice
Why are algorithms important in computer science?
Algorithms are crucial for problem-solving, efficiency, and data management in computer science.
Algorithms are primarily for graphic design in computer science.
Algorithms are only used for sorting data.
Algorithms are irrelevant in modern programming languages.
111
Multiple Choice
Pseudocode is used to:
Describe an algorithm in a human-readable format
Write actual code
Create flowcharts
Debug programs
112
Multiple Choice
Which of the following is a common pseudocode keyword?
IF
FOR
All of the above.
113
Multiple Choice
A compiler translates:
High-level code into machine code
Assembly code into machine code
Machine code into assembly code
114
Multiple Choice
An interpreter:
Executes machine code directly
Converts assembly code into machine code
Creates executable files
Translates and executes code line by line
115
Multiple Choice
Which of the following is a compiled language?
Python
Java
JavaScript
Ruby
116
Multiple Choice
Which of the following is an interpreted language?
C++
C#
Python
Pascal
117
Multiple Select
What is the main differences between a compiler and an interpreter?
Compilers are faster, while interpreters are slower
Compilers create executable files, while interpreters do not
Compilers are used for high-level languages, while interpreters are used for low-level languages
Compilers translate code once, while interpreters translate code line by line
118
Open Ended
Write Pseudocode to this problem :Calculate the Area of a Rectangle
119
Open Ended
Write Pseudocode to this problem : Find the Largest Number Between Two Numbers
120
Open Ended
Write a Pseudocode to this problem : Eat a Fruit
Imagine you're hungry, and you want to eat a fruit. However, before eating it, you need to check whether the fruit is clean (washed). If it's already washed, you can eat it right away. If not, you need to wash it first. Once you've eaten the fruit, you'll decide whether you want to eat more.
121
Multiple Choice
What does the following pseudocode do?
Outputs 5
Outputs 3
Outputs 8
Outputs 15
122
Multiple Choice
What is the output of this pseudocode if age = 20?
Adult
Minor
18
No output
123
Multiple Choice
How many times does the following loop run?
4
5
6
Infinite
124
Multiple Choice
What is the condition to stop the following loop?
When x < 10
When x = 10
When x > 10
When x = 0
125
Multiple Choice
What is the output of this pseudocode?
Success
Fail
Error
No output
126
Multiple Choice
What does the following pseudocode calculate?
A) The sum of numbers from 1 to 5
B) The product of numbers from 1 to 5
C) The sum of even numbers from 1 to 5
D) The sum of odd numbers from 1 to 5
127
Multiple Choice
What will the following boolean expression evaluate to?
5 <= 5
FALSE
TRUE
128
Multiple Choice
What will the following pseudocode output? Assume all variables have been declared.
x ← 3
IF x < 5
THEN
OUTPUT "A"
ELSE
OUTPUT "B"
ENDIF
A
B
<No output>
129
Multiple Choice
What will the following pseudocode output? Assume all variables have been declared.
x ← 3
y ← 4
IF x < 5 AND y > 5
THEN
OUTPUT "A"
ELSE
OUTPUT "B"
ENDIF
A
B
<No output>
130
Multiple Choice
What will the following pseudocode output? Assume all variables have been declared.
x ← 3
y ← 4
IF x < 5
THEN
OUTPUT y * 5
ELSE
OUTPUT y * 2
ENDIF
15
8
20
6
131
Multiple Choice
What will the following pseudocode output? Assume all variables have been declared.
x ← 3
y ← 4
z ← 5
IF x == 5
THEN
OUTPUT "A"
ELSE
IF y <> z
THEN
OUTPUT "B"
ELSE
OUTPUT "C"
ENDIF
ENDIF
A
B
C
132
Multiple Choice
What will the following pseudocode output? Assume all variables have been declared.
x ← 3
CASE OF x
1: OUTPUT x * 1
2: OUTPUT x * 1 + 1
3: OUTPUT x * 2
4: OUTPUT x * 2 + 1
ENDCASE
3
4
6
7
133
Multiple Choice
What will the following pseudocode output? Assume all variables have been declared.
w ← 2
x ← 2 * w
CASE OF x
1: OUTPUT w * 1
2: OUTPUT w * 1 + 1
3: OUTPUT w * 2
4: OUTPUT w * 2 + 1
OTHERWISE OUTPUT x
ENDCASE
2
3
4
5
134
Multiple Choice
Which data structure follows the Last In, First Out (LIFO) principle?
Linked List
Array
Stack
Queue
135
Multiple Choice
What is the primary purpose of sorting algorithms?
To store data efficiently
To arrange elements in a specific order
To analyze algorithm performance
To search for specific data
136
Multiple Choice
Which algorithm is used to find the shortest path in a graph?
Bubble Sort
Dijkstra's Algorithm
Binary Search
Merge Sort
137
Multiple Choice
What is a characteristic of a queue data structure?
Elements are accessed in a random order
Elements are added and removed from the same end
Elements are stored in a non-linear fashion
Elements are added at one end and removed from the other
138
Multiple Choice
Which of the following is a non-linear data structure?
Stack
Array
Queue
Tree
139
Multiple Choice
What is the main advantage of using dynamic programming?
It requires less time complexity
It avoids redundant computations
It uses more memory
It is easier to implement
140
Multiple Choice
Which of the following is NOT a type of searching algorithm?
Linear Search
Binary Search
Heap Sort
Depth First Search
141
Multiple Choice
What would be a first step to make a toast?
When toast pops up add butter
Turn on and set temperature/timer
Remove toaster from drawer
142
Open Ended
Short algorithm to prepare a sandwich (from Activity 2)
143
Multiple Choice
To write an algorithm for every arithmetical operation, you must use the following.
Pseudocode
Flowchart
You may use both
144
Multiple Choice
Symbol used in a flowchart to ask for a number to a user.
Oval.
Paralelogram
Rectangle
145
Multiple Choice
Symbol used in a flowchart to do an arithmetical operation.
Oval.
Paralelogram
Rectangle
146
Multiple Choice
First step for an algorithm to calculate an average of two numbers
Start.
Ask number1 to the user.
Declare variables: number1, number2, sum, average.
147
Open Ended
Short algorithm for a geometric shapes area (Activity 4)
148
Multiple Choice
What is one of the three requirements for an algorithm?
Infinite
Well-defined
Ineffective
149
Multiple Choice
Which of the following is NOT true about procedural abstraction?
Procedural abstraction improves code readability
Procedural abstraction manages complexity by allowing for code reuse
Procedural abstraction improves the speed at which a program executes
Procedural abstraction allows a solution to a large problem to be based on the solution of smaller subproblems
150
Multiple Choice
151
Multiple Choice
152
Multiple Choice
________ is wrapping of data into a single unit called class.
Abstraction
Polymorphism
Encapsulation
Inheritance
153
Multiple Choice
What is packet encapsulation in networking?
The process of stripping headers and trailers from a packet
The process of adding an IP address to a packet
The process of adding headers and trailers to data
The process of checking for errors in network transmission
Revision 9618
By Casielyn Capistrano
Show answer
Auto Play
Slide 1 / 153
SLIDE
Similar Resources on Wayground
147 questions
untitled
Presentation
•
KG - University
144 questions
Science Chemistry Chapter 4 Chemical Bonding
Presentation
•
9th - 12th Grade
139 questions
Farang Farang
Presentation
•
9th - 12th Grade
150 questions
BIO 101 Lab Final Practical Review Session
Presentation
•
9th Grade - University
142 questions
FSA Review Foundation #7: 3D Geometry
Presentation
•
9th - 12th Grade
149 questions
Art Acadeca
Presentation
•
9th - 12th Grade
146 questions
WHS Basketball Dictionary Slides
Presentation
•
9th - 12th Grade
Popular Resources on Wayground
20 questions
STAAR Review Quiz #3
Quiz
•
8th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
6 questions
Marshmallow Farm Quiz
Quiz
•
2nd - 5th Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
19 questions
Classifying Quadrilaterals
Quiz
•
3rd Grade
12 questions
What makes Nebraska's government unique?
Quiz
•
4th - 5th Grade
Discover more resources for Computers
7 questions
Warm Up 04.01.2026
Quiz
•
9th Grade
50 questions
STAAR English 2 Review
Quiz
•
10th Grade
20 questions
Graphing Inequalities on a Number Line
Quiz
•
6th - 9th Grade
20 questions
Figurative Language Review
Quiz
•
10th Grade
20 questions
Linear Functions Review
Quiz
•
9th Grade
30 questions
English 1 STAAR Review
Quiz
•
9th Grade
10 questions
Pythagorean Theorem and its Converse
Quiz
•
7th - 9th Grade
14 questions
Ecological Succession: Primary and Secondary
Quiz
•
9th Grade