2.2.7

Controlling 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.1Data Representation

1.2Data Transmission

1.3Hardware

1.4Software

1.5The Internet & its Uses

1.6Cyber Security

1.7Automated & Emerging Technologies

2Algorithms, Programming & Logic

Unlock your full potential with Seneca Premium

  • Unlimited access to 10,000+ open-ended exam questions

  • Mini-mock exams based on your study history

  • Unlock 800+ premium courses & e-books

Get started with Seneca Premium