2.2.4

Program Flow - Selection

Test yourself

Selection

Selection allows us to have decisions made in our program.

Illustrative background for SelectionIllustrative background for Selection ?? "content

Selection

  • Selection allows us to execute a section of code depending on whether a condition is met or not.
Illustrative background for If-statementsIllustrative background for If-statements ?? "content

If-statements

  • An if-statement is an easy way of checking if a condition is true.
Illustrative background for Switch-case statementIllustrative background for Switch-case statement ?? "content

Switch-case statement

  • A switch-case statement checks the value of a single variable.
Illustrative background for Flow diagramIllustrative background for Flow diagram ?? "content

Flow diagram

  • The diamond symbol is used to show selection in a flow diagram.

Jump to other topics

1Computer Systems

1.1Systems Architecture

1.2Memory & Storage

1.3Computer Networks, Connections & Protocols

1.4Network Security

1.5Systems Software

1.6Ethical, Legal, Cultural & Environmental Concern

2Computational Thinking, Algorithms and Programming

2.1Algorithms

2.2Programming Fundamentals

2.3Producing Robust Programs

2.4Boolean Logic

2.5Programming Languages & IDEs

Go student ad image

Unlock your full potential with GoStudent tutoring

  • Affordable 1:1 tutoring from the comfort of your home

  • Tutors are matched to your specific learning needs

  • 30+ school subjects covered

Book a free trial lesson