Algorithms and programming revision

not made for GCSE revision, just a small exam :)

?
  • Created by: mevan
  • Created on: 14-01-20 21:46

Flowchart symbols

▱ Input/output

 Start/end

 Decision

 Process 

1 of 6

Key concepts

Algorithm - a set of step by step instructions to solve a problem or complete a task.

Sequence - the spacific order in which instructions are performed in an algorithm.

Selection - the choice of which route to take through an algorithm or computer program.

Iteration - using repetition of a process to create a more efficient solution (loops).

2 of 6

Variables

Variables are used to store pieces of data that moght be needed later in the program.

In python ypu use an = sign to assign something to a variable, eg name = Billy.

The computer stores variables in RAM (Random Access Memory).

3 of 6

Pseudocode

Pseudocode uses a programming stayle layout but is not an actual programming language, it is half way between English and code.

It is used to plan out or write out algorithms.

4 of 6

Python terms

Definate iteration: repetition a set number of times.  for i in range (3): 

Array: a list.  names=["Billy","Alex","Emily"] 

Boolean flag: a variable that is either true or false guessed = false

Indefinate iteration: repetition forever or until a condition is met while guessed == false: 

Selection: Changes the flow of the program if then elif else

5 of 6

Trace tables

Trace tables help you locate the value of a variable at different stages. For example if the pseudocode looked like this:

a = 2    b = 3    x =1

while x ≤ b

output a * x

x = x + 1                               

Then the table would look like this:               x           output     

                                                                     1              2

                                                                     2              4

                                                                     3              6

                                                                     4              /

6 of 6

Comments

No comments have yet been made

Similar Computing resources:

See all Computing resources »See all Programming resources »