levo

Algorithms

Pseudo-code, flowcharts and trace tables

  • 3 things to know
  • Paper 1

Overview

Pseudo-code and why programmers design in it, the flowchart symbols for decisions, inputs, outputs and subroutines, trace tables, visual inspection, and short algorithms to trace by hand.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

What is output by the algorithm x ← 5, then WHILE x > 1, x ← x − 2, ENDWHILE, then OUTPUT x?

Key term

What is the purpose of the lines temp ← a, then a ← b, then b ← temp?

Key term

What is pseudo-code?

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    What is pseudo-code?

    Model answer

    Pseudo-code is a structured, English-like way of writing an algorithm. Pseudo-code is not a real programming language, so a computer cannot run it directly.

  2. 2

    Why do programmers design algorithms in pseudo-code?

    Model answer

    Pseudo-code lets a programmer concentrate on the logic without worrying about exact syntax. The design can then be coded in any programming language.

  3. 3

    What is a flowchart?

    Model answer

    A flowchart is a diagram of an algorithm made from standard symbols. Arrows between the symbols show the order in which the steps are carried out.

  4. 4

    Which flowchart symbol represents a decision?

    Model answer

    A diamond represents a decision. The diamond has two exits, one for a true answer and one for a false answer.

  5. 5

    Which flowchart symbol represents an input or an output?

    Model answer

    A parallelogram represents an input or an output. An example is reading a number typed by the user.

  6. 6

    What do a rounded rectangle and a plain rectangle show in a flowchart?

    Model answer

    A rounded rectangle, called a terminal, marks the start or the end. A plain rectangle shows a process such as a calculation.

Other ways to work this

The same content, four other ways.

What is inside Levo

Six ways to work the same material.

1Closed book
2Open book
3Closed book

The 3-step method, run for you

Answer cold, learn it, then prove it stuck. Levo tracks the jump between your first attempt and your last.

Algorithms
Programming
Data Representation
Computer Systems

Cram a whole paper in one sitting

Sort every topic into what you know and what you do not, then drill only the weak ones.

The table one extra row.
gainslosescopies

Blank Blitz makes facts automatic

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

AThe algorithm outputs 1.
BThe variable x falls from 5 to 3 to 1.
CThe loop stops because 1 is not greater than 1.

Build It gets the exam shape right

Assemble a full-mark answer from its marking points, in the order an examiner wants them.

ASC means sorting from smallest to largest, or A to Z.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The traps are the mistakes students actually make.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

Every question in Algorithms, on a schedule.

Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.