levo

Programming

Algorithms, pseudocode and syntax

  • 3 things to know
  • AS Unit 1
Start revising · £5/month

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.

Everything in your subscription

Runs, plus a mode for every other kind of session.

1Flash
2Imposter
3Fade
4Brain dump

Learn every subtopic in runs of four questions

Facts flash and fade, a wrong word hides in some of them, and a brain dump decides which questions are locked in.

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

Cram the night before, weakest topic first

A quick scan finds your weakest topics. Recall each fact you missed three times in a row.

A check requires a value.
presencerangeformat

Blank Blitz consolidates the facts

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

✓What it iscovered
~Why it happenspartly there
How long it lastsnot there yet

Explain It tests your understanding

Explain a concept in your own words and see which of its points you covered.

One byte is made up of 8 bits.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The faults are the mistakes students make most often.

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.

Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.

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