2.1.8

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

1Computational Thinking & Algorithms

2Programming

3Hardware & Software

4Data

5The Internet

6Online Safety & Security

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