This lesson introduces selection and randomness. These are two features that will allow learners to develop programs with a very diverse range of behaviours.
Learners will revisit some of the programs that they have encountered in previous lessons and extend them into more versatile programs that use selection. They will develop a simple number guessing game, which will eventually include randomness.
- Use relational operators to form logical expressions
- Use binary selection (if, else statements) to control the flow of program execution
- Generate and use random integers