B2.3 Programming constructsB2.3.2
Selection structures
Construct programs utilizing appropriate selection structures
SL + HL≈ 60 minCommand term: ConstructPremium
In this lesson
- Writing if, if–else and else-if (elif) chains, nested selection and switch/match statements
- Using comparison operators, including comparing strings in Java and Python
- Combining conditions with AND, OR and NOT
- Choosing the order of conditions and testing the boundaries
This lesson is part of Premium
Every topic has one free lesson. Premium unlocks every interactive lesson, the exam-style questions at the end of each one, and the rest of Praxis IB.
What's inside
- LearnMaking decisions
- CodeAn else-if chain
- LearnComparison and logical operators
- CodeCombining conditions
- CodeComparing strings
- LabTicket prices
- CodeNested selection
- Codeswitch (Java) and match (Python)
- CheckTrue or false?
- CheckQuick check
- CodeTry it: a password rule
- ExamWorked exam answer
- ReviewMistakes examiners see
- Exam practiceExam-style questions
Ends with 4 exam-style questions worth 13 marks, with a self-marking markscheme.