levo

Programming

Sequence and selection

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

Overview

Sequence in a program, two selection constructs found in most programming languages and condition in a selection statement.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

Name the two selection constructs found in most programming languages.

Key term

Name four comparison operators used in conditions.

Key term

What is nested selection?

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    What is meant by sequence in a program?

    Model answer

    Sequence means that the statements of a program are carried out one after another in exactly the order in which they are written.

  2. 2

    Give an example showing that the order of statements matters.

    Model answer

    Reading a value into a variable and then doubling it gives the intended answer, but doubling before the value has been read works on whatever happened to be in the variable already, so the answer is wrong.

  3. 3

    What is meant by selection?

    Model answer

    Selection is a construct that chooses between two or more different sets of statements according to whether a stated condition is true or false.

  4. 4

    Name the two selection constructs found in most programming languages.

    Model answer

    Most languages provide the IF statement, in its IF THEN and IF THEN ELSE forms, and a CASE or SWITCH statement.

  5. 5

    What is a condition in a selection statement?

    Model answer

    A condition is an expression that works out to either true or false, most often a comparison between a variable and a value.

  6. 6

    Name four comparison operators used in conditions.

    Model answer

    Four comparison operators are equal to, not equal to, greater than and less than.

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.