Save
computer science
cs paper 2
2.1 algorithm
Save
Share
Learn
Content
Leaderboard
Learn
Created by
anisah
Visit profile
Cards (62)
What is the definition of an algorithm?
An algorithm is a set of
instructions
presented in a
logical sequence
.
View source
What are the three key components of computational thinking?
Abstraction
,
Decomposition
,
Algorithmic thinking
View source
Why do programmers create algorithm designs?
To plan a program before writing any
code
and consider potential problems.
View source
What does abstraction involve in computational thinking?
Ignoring unnecessary information and focusing on
important
facts
View source
What are the two main methods of defining algorithms?
Pseudocode
and
flowcharts
.
View source
Why is abstraction important in problem-solving?
It simplifies a problem to make it less
complex
View source
In what language will OCR display algorithms in exams?
OCR Exam Reference Language.
View source
What is decomposition in computational thinking?
Breaking a problem down into smaller
tasks
View source
Why is decomposition important in problem-solving?
It makes it easier to solve problems and allows for
separate
testing
View source
What is the purpose of the 'constant' keyword in programming?
To
define
a
constant value
that
cannot
be
changed.
View source
What is the exam board and specification for the study material?
OCR
Specification:
J277
View source
How do you write a comment in OCR Exam Reference Language?
Using
two slashes
(//).
View source
What is algorithmic thinking?
Following
logical steps
to solve a problem
View source
What does algorithmic thinking involve?
Breaking down the problem using
decomposition
and considering
required
data
View source
What command would you use to get user input in OCR Exam Reference Language?
name
= input("Enter your name")
View source
What are the key features of a bubble sort?
Uses an
outer while loop
(condition controlled) to check for swaps
Uses an inner for loop (
count controlled
) to iterate through the data set
Uses a flag (
Boolean value
) to track swaps
Uses a
temporary value
to swap elements
View source
What are the steps involved in computational thinking?
Abstraction: Focus on important facts
Decomposition: Break down into smaller tasks
Algorithmic thinking: Follow logical steps to solve the problem
View source
What does the 'print' command do in programming?
It outputs text to the console.
View source
What is a linear search?
A linear search is the simplest search
algorithm
that checks each data item in order.
View source
What is the purpose of the 'if - then - else' selection structure?
To execute different code based on a
condition
.
View source
Why is a linear search also known as a sequential search?
Because it searches through the list in a sequence from
start
to
end
.
View source
What exam board and specification is mentioned for computational thinking?
OCR Specification:
J277
View source
What is the source of the written, video, and visual content mentioned in the study material?
CSNewbs
View source
What does the 'for loop' structure do?
It repeats a block of code a
specified
number of times.
View source
What is a limitation of a linear search for large lists?
It is not very
efficient
for large lists.
View source
What is the purpose of a flowchart?
To visually represent an
algorithm
.
View source
What is a binary search?
A binary search is a more efficient searching
algorithm
that searches through fewer data.
View source
What year is the copyright for CSNewbs noted as?
2024
View source
How does a flowchart differ from a structure diagram?
A flowchart shows how data is
processed
, while a structure diagram shows the
organization
of a problem.
View source
What is the purpose of computational thinking?
To provide smart
problem-solving
techniques
View source
What is the prerequisite for using a binary search?
The list of data must already be
sorted
.
View source
What is a trace table used for?
To track the value of
variables
as a
program
runs.
View source
How do abstraction and decomposition work together in computational thinking?
Abstraction
simplifies
the problem while decomposition
breaks
it down into
manageable
parts
View source
How does a binary search work?
Selects the
middle point
of the data
Compares the midpoint to the
target value
If the midpoint matches the target, the search stops
If not, the
upper
or lower half of the data is ignored
View source
What does the 'next i' command do in a loop?
It moves the loop to the next
iteration
.
View source
What is merge sort based on?
The idea of
'divide and conquer'
Divides a list into
halves
until each item is
separate
Combines items in the
correct order
View source
What is the stopping condition for a bubble sort?
The algorithm stops when a complete iteration is made with no swaps.
View source
If the input for 'maxvalue' is 5, what outputs will the algorithm produce?
Outputs:
1, 4, 9, 16, 25
, program
finished
.
View source
What is the purpose of a structure diagram?
To display the
organization
of a problem in a visual format.
View source
What is the process of an insertion sort?
It splits the list into
sorted
and
unsorted
values, inserting unsorted values into the correct position in the sorted part.
View source
See all 62 cards