levo

Programming

Algorithms, pseudocode and syntax

  • 3 things to know
  • AS Unit 1

Overview

Dry run, term syntax as it applies to a programming language and syntax and the semantics of a statement.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

What is an algorithm?

Key term

Why must an algorithm come to an end?

Key term

Give three ways an algorithm can be set down before any code is written.

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    What is an algorithm?

    Model answer

    An algorithm is a finite sequence of precise, unambiguous steps that solves a particular problem or completes a particular task.

  2. 2

    Why must an algorithm come to an end?

    Model answer

    An algorithm exists to produce a result, so it must reach a stopping point after a finite number of steps; a set of steps that never finishes has solved nothing.

  3. 3

    Give three ways an algorithm can be set down before any code is written.

    Model answer

    An algorithm can be expressed as structured English, as pseudocode, or as a flowchart.

  4. 4

    What is pseudocode?

    Model answer

    Pseudocode is a way of setting out an algorithm using the keywords and structure of programming without obeying the exact rules of any one language, so that any programmer can read it.

  5. 5

    Give two reasons for designing an algorithm before writing code.

    Model answer

    Working the logic out first means a mistake in the design is found while it is still cheap to put right, and the algorithm can be checked by a colleague and then coded in whichever language is chosen.

  6. 6

    Why can the same algorithm be coded in several different languages?

    Model answer

    An algorithm states the logical steps only and names no language's commands, so a programmer is free to express those same steps using the statements of whichever language is being used.

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.

Systems Analysis and Development Approaches
Design, Development and Testing
Implementation and System Security
Programming

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.

A check requires a value.
presencerangeformat

Blank Blitz makes facts automatic

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

ANormal data is 12, which should be accepted.
BBoundary data is 1 and 50, which should be accepted.
C0 and 51, just outside the limits, should be rejected.

Build It gets the exam shape right

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

One byte is made up of 8 bits.
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 Programming, 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.