Selection

Computer Science: KS3, topic 2.1.8

Selection

Selection allows us to have decisions made in our program.

Selection

Selection

  • Selection allows us to execute a section of code depending on whether a condition is met or not.
If-statements

If-statements

  • An if-statement is an easy way of checking if a condition is true.
Switch-case statement

Switch-case statement

  • A switch case statement checks the value of a single variable.
Flow diagram

Flow diagram

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

Test yourself on Selection

  • Which shape is used to show selection in a flow diagram?

Practise this topic for free