Year 11

Programming 2: Selection

Lessons (6)

    In this lesson, we will be introduced to the concept of random numbers using Python documentation. We will determine what the random module is capable of, and how random numbers can be generated in Python. In computer science, random numbers are something that you are likely to use regularly. They are also used in areas such as cryptography, while pseudorandom numbers are used in video games, modelling, and simulations.
    1 Slide deck
    1 Worksheet
    1 Quiz
    1 Video
    In this lesson, we will understand the rules of operator precedence when evaluating arithmetic expressions. We will be reminded of BIDMAS, before investigating code that uses various arithmetic expressions. This lesson will prepare us for the next lesson, where we will begin to use conditions in programming.
    1 Slide deck
    1 Worksheet
    2 Quizzes
    1 Video
    In this lesson, we will move on to the next big programming construct: selection. We will be introduced to it initially through a flowchart that demonstrates how a condition can be used to control the flow of execution in a program. We will then learn about definitions for logical expressions and conditions. A short activity has been included to allow us to grasp how logical expressions evaluate. Next, we will complete a PRIMM activity where we investigate and modify a chatterbot.
    1 Slide deck
    1 Worksheet
    2 Quizzes
    1 Video
    In this lesson, we will complete the 'make' part of PRIMM. We will complete an activity to create a joke machine. This will allow us to apply our new knowledge to a new, but similar scenario.
    1 Slide deck
    1 Worksheet
    2 Quizzes
    1 Video
    In this lesson, we will deepen our understanding of logical expressions by introducing the operators AND and OR. It will begin with a Parson's Problem to check our understanding of selection. It will then move on to an unplugged activity that introduces AND and OR. We will walk through code, and investigate it before writing our own logical expressions.
    1 Slide deck
    1 Worksheet
    2 Quizzes
    1 Video
    In this lesson, we will be introduced to the concept of nesting 'if statements'. We will walk through some basic nested statements to check our understanding. We will then follow the PRIMM approach and investigate a 'guess the animal' game. We will then modify the game to improve the functionality of it.
    1 Slide deck
    1 Worksheet
    2 Quizzes
    1 Video