Save
Computer Science
Paper 2
Componet 2 School
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
Caylin Hindle
Visit profile
Cards (121)
What is an algorithm?
A set of steps to solve a
problem
View source
What does 'input' refer to in an algorithm?
Data given to the algorithm by the
user
View source
What are 'processes' in an algorithm?
Steps
taken
to
solve
the
problem
View source
What does 'output' refer to in an algorithm?
Data
given
back
to
the
user
View source
What is abstraction in computational thinking?
Making a
model
of a situation
Analyzing the model for insights
View source
What is decomposition in computational thinking?
Breaking down
complex
problems
Simplifying the problem-solving process
View source
What is algorithmic thinking?
Creating a
model
of a real-life situation
Defining a solution through
steps
View source
What do variables in a program represent?
Real
values
View source
What do functions in a program represent?
A group of actions producing a
result
View source
What are the advantages of decomposition in programming?
Work on individual parts
separately
Use a team for large problems
View source
What are examples of algorithms?
Flowcharts
Pseudocode
Trace Tables
Structure Diagrams
View source
What do flowcharts represent in algorithms?
The flow of data, processing, and
input/output
View source
What do standard flowchart symbols represent?
Line:
Flow of data
Process: Action performed
Input/Output: Data entry/exit
Decision:
Conditional branching
Terminal:
Start/End
of flowchart
View source
What is a trace table used for?
Tracking
variable
changes in an
algorithm
View source
How do you draw a trace table?
Create a column for each
variable
used
View source
What is pseudocode?
Not an actual
programming
language
Follows a similar structure to programming languages
Clearly shows
algorithm
steps
View source
What is the output of the pseudocode example with num and n?
9
View source
What is a linear search?
Looks at each item until the
target
is found
View source
What is a binary search?
Divides the
data list
in half repeatedly
View source
What is a bubble sort?
Compares pairs of
values
and swaps them
View source
What is the method of a bubble sort?
Compare pairs of values
Swap if different
Repeat until no swaps
View source
What is an insertion sort?
Inserts
each
item
into
the
correct
place
View source
What is the method of an insertion sort?
Split into
ordered
and
unordered
Insert each item into the correct place
Repeat until all items are sorted
View source
What is a merge sort?
A
two-stage
sorting algorithm
View source
What is the method of a merge sort?
Split data into
sublists
Merge sublists in
sorted
order
Repeat until one sorted list remains
View source
What is a variable in programming?
A label for a
memory location
View source
What is a constant in programming?
A
label
for an
unchangeable
value
View source
What is assignment in programming?
Setting a value to a
variable
or constant
View source
What is declaration in programming?
Identifying a
variable
or
constant
View source
What are the types of program structures?
Sequence
: Instructions in order
Selection
:
Conditional
paths (
IF
,
THEN
)
Iteration
: Repeating instructions
View source
What are comparison operators?
==
Equal To
<>
Not Equal To
<
Less Than
>
Greater Than
<=
Less Than or Equal To
>=
Greater Than or Equal To
View source
What are arithmetic operators?
+ Addition
- Subtraction
* Multiplication
/ Division
^
Exponentiation
DIV
Quotient
MOD
Modulus
View source
What are Boolean operators?
AND
: Both conditions true
OR
: Either condition true
NOT
: Reverses outcome
View source
What is a count-controlled loop?
Repeats a loop a
known
number of times
View source
What is a condition-controlled loop?
Repeats until a certain
condition
is met
View source
How would you write a For…Next loop to print "Hello World" 5 times?
for i=1 to 5 print("Hello World") next i
View source
How would you write a While…End While loop to print "Hello World" until counter reaches 5?
while
counter
<=
5
print("Hello World"
)
counter
=
counter
+
1
endwhile
View source
How would you write a Do…Until loop to print "Hello World" until counter reaches 5?
do print("Hello World")
counter
=
counter
+
1
until
counter
>
5
View source
What is required for the overall condition to be true in logical operations?
Both
conditions
must be true.
View source
What does the NOT operator do in comparisons?
It reverses the
outcome
of a comparison.
View source
See all 121 cards