Topic 1: Problem Solving Flashcards

1
Q

What is an algorithm?

A

A set of instructions that perform a specific task
Or
A precise method for solving a problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the purpose of algorithm?

A

To visualise the logical steps of a task

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Key term:

Unambiguous

A

This means that the instructions cannot be misunderstood. Simply saying ‘turn’ would be ambiguous because you could turn left or right

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Key term:

Sequence

A

An ordered set of instructions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Key term:

High-level programming language

A

A programming language that resembles natural human language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Key term:

Flowchart

A

A graphical representation of an algorithm.
Each step in the algorithm is represented by a symbol.
Symbols are linked together with arrows showing the order in which steps are executed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Written descriptions

A
The simplest way of expressing an algorithm.
E.g an algorithm for making a cup of instant coffee:
Fill kettle with water.
Turn on kettle.
Place coffee in cup.
Wait for water to boil.
Pour water into cup.
Add milk and sugar.
Stir.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Key term:

Pseudo-code

A

A structured, code-like language that can be used to describe an algorithm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Pseudo-code

Algorithm for adding two numbers

A

SEND ‘please enter the first number.’ TO DISPLAY

RECEIVE firstNumber FROM KEYBOARD

SEND ‘please enter the second number.’ TO DISPLAY

RECEIVE secondNumber FROM KEYBOARD

SET total TO firstNumber + secondNumber

SEND total TO DISPLAY

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Key term:

Variable

A

A ‘container’ used to store data. The data stored in a variable is referred to as a value. The value stored in a variable is not fixed. The same variable can store different values during the course of a program and each time a program is run

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Key term:

Identifier

A

A unique name given to a variable or a constant. Using descriptive names for variables makes code much easier to read

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Key term:

Arithmetic operator

A

An operator that performs a calculation on two numbers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Arithmetic operator:

+

A

Addition: add the values together

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Arithmetic operator:

-

A

Subtraction: subtract the second value from the first

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Arithmetic operator:

*

A

Multiplication: multiply the values together

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Arithmetic operator:

/

A

Real division: divide the first value by the second value and return the result including decimal places

17
Q

Arithmetic operator:

DIV

A

Quotient: like division, but it only returns the whole number or integer

18
Q

Arithmetic operator:

MOD

A

Modulus/modulo: this will return the remainder of a division.
E.g 13/4=3 remainder 1. Therefore 13 MOD 4=1

19
Q

Arithmetic operator:

^

A

Exponentiation: this is for ‘to the power of’

20
Q

Key term:

Constant

A

A ‘container’ that holds a value that never changes. Like variables, constants have unique identifiers

21
Q

Key term:

Construct

A

A component from which something is built. Letters and numbers (I.e. A to Z and 0 to 9) are the constructs we use to build our language and convey meaning.