Save
comp sci aqa
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
lure
Visit profile
Cards (60)
Algorithm
A
sequence of steps that can be followed to complete
a
task
View source
Pseudocode
A fairly
relaxed
version of program code that should be understood by any programmer
AQA
has its own version of
pseudocode
View source
Flowchart
symbols
Start/
end
Process
box
Input
/
output
Choice
(for if statements and loops)
View source
Abstraction
The process of
removing unnecessary
detail from a problem,
simplifying
it
View source
Decomposition
Breaking a problem down into many
sub-problems
that each represent a
specific
task
View source
Trace
table
A
table
that shows how
values
change when an algorithm is carried out, going through every line of code
View source
Trace
tables do not correspond one-to-one with lines of code, there may be
multiple
lines of code in one row of the table
View source
Linear
search
A searching algorithm that compares each item in the list one by one until the target item is found or
not
found
View source
Binary
search
A more
efficient
searching algorithm that compares the
middle
item in the list to the target, and discards half the list that cannot contain the target
View source
Binary
search
Requires the list to be
sorted
More time-efficient than
linear
search as the list grows
larger
View source
Bubble
sort
A
sorting
algorithm that goes through the list in 'passes',
swapping
pairs of items to put the list in order
View source
Merge
sort
A more efficient sorting algorithm that works by repeatedly dividing the list in half and
merging
the sorted sub-lists
View source
Merge
sort
More time-efficient than
bubble
sort, especially as the list grows
larger
Uses more
memory
overall due to the
sub-lists
View source
Data
type
Determines how data is stored on a computer and the
operations
it can do
View source
Arithmetic
operators
Division
(/, div),
modulus
(mod)
View source
Relational
and Boolean operators
Used in conditions for
if statements
and
loops
(=, >, <, and, or)
View source
String
handling operations
Substring,
concatenation
View source
Variable
An identifier that holds a value that can be
changed
View source
Constant
An identifier that holds a
value
that cannot be
changed
after it is set
View source
Constants
Help with
readability
Make
updating
values easier in the
future
Reduce
risk
of
accidental
changes
View source
Input/output
How to get user
input
and display
output
View source
Sequence
Two
or more lines of code that run
one
by one
View source
Selection (if statements)
Deviate the
path
of
execution
depending on a condition
View source
Iteration
(loops)
Repeat
a block of code
multiple
times
View source
If statements are always
checked
, whereas
else-if
statements are only checked if previous conditions were false</b>
View source
Common mistakes with if statements include adding
conditions
to else blocks and forgetting about
else-if
View source
If it's always checked if you've got an if part this will always be checked
no matter
if you have
several back to back
View source
If
price is greater than 30 and if price is greater than or equal to 20
Both premium and
standard
would be outputted because both are
checked
View source
Else ifs or e-
lifts
sit below an if statement
The
else
if is only checked if previous conditions were false
View source
You can have
several
else ifs if you want to, just make sure they come after the if
View source
Mistakes
in
exams
are people adding conditions to else's and also forgetting about else if
View source
Definite
iteration
A set number of times the
loop
will
repeat
View source
Indefinite
iteration
The
loop
will repeat until a condition is
broken
or met
View source
For
loop
1.
Repeats
a set number of times
2.
Counter variable
starts at a set number and goes to another set number
View source
While
loop
1.
Repeats
until a
condition
is broken
2. Asks user for
password
and keeps asking until they get it
right
View source
Repeat
until loop
1. Repeats until a condition is
met
2. Condition comes after the loop, so it always runs at least
once
View source
Array
An
organised
collection of items of the
same
data type
View source
Indexing
Specifying a particular item within an array, starting from
0
View source
Iterating
through an array
Using a for
loop
, starting at 0 and going to size of
array
- 1
View source
2D
array
An
array
of
arrays
View source
See all 60 cards