Computing
Computer Science LearnITWithMrC ⛯ Year 7 Year 8 Year 9 GCSE
Responsive image

Lesson Video

15

Lesson Tasks

  • Watch the Lesson video
    Make notes if needed.
  • Open your Learning Journal
    Complete Task 1 in your Learning Journal
  • Complete the learning activities
    Make sure you complete the book tasks in your Unit Booklet
  • Complete End of Task Assessment
    Update your learning objectives

What do I need to Learn?

0 results forGuest
I need to learn how to understand and know how to use selection in a computer program.
I am familiar with and able to use the operators: equal to, not equal to, less than, greater than, less than or equal to, greater than or equal to in a computer program.

Key Terms

Boolean Boolean operators Selection Condition Branch If Statement Evaluate

Task 1 - Getting organised Click to see more


Task: Learning Journal

Open your Learning Journal by clicking on the image below

Good notes will help you organise and process data and information

Task 1: Fill out your learning Journal.

Open your Learning Journal and complete the task below .


Task 2 - What if? Click to see more

In Python The 'if' statement is used to conditionally execute a statement. In other words we look at a statement(conditional) and decide if that conditional statement is true or false, we then do one thing when the condition is true and something else when the condition is false.

Conditional statements

A conditional statement is any statement that can be determined to be True or False. To make a statement conditional we use comparison operators

Look at the conditional statement in the diamond below, should we DO THIS or DO THAT?

Comparison operators are used to compare values. It either returns True or False according to the condition.

Learning selection in Python

Writing an IF statement

Look at the text below in Python, when we run it you can see that the if statement condition is true.



  • Open PYTHON either IDLE or THONNY
  • In your New File
  • Add in this comment at the top of your page: #An if statement helps us make decisions in our code

  • Type in the code from the image above :
    1. Assign a value to a variable
    2. add in the If Statement with a condition
    3. print out something if the condition is true

    Save your file as 'if_statements'



  • When you are finished screenshot your code into your powerpoint



  • Can you change your code so that the variable comes from a user input?

    Don't forget when we are getting a number from a user input to use int(input("Please enter a number: "))


  • When you are finished screenshot your commented code into your powerpoint

  • Task 3 - What else Click to see more

    Writing an IF ELSE statement



    1. Add in the else code from the image above and rerun your code so that it prints out the else condition:

  • When you are finished screenshot your code into your powerpoint




  • Lets see if we can create a version of the above flowchart in python.


    Writing an ELIF statement

    Sometimes we want to have more that two otions when we make a choice we can do that in python by using an elif statement.



    1. Add in the the elif statements above into your Python file and run it to see what happens:

  • When you are finished screenshot your code into your powerpoint



    1. Can you change the code so that the user inputs a number and you then print out whether it is small medium big or huge?
    2. Can you develop the code so that the user can input their favourite colour and you then print out something about the colour they chose?


  • When you are finished screenshot your commented code into your powerpoint

  • Task 4 - Selection Book Task Click to see more

    Task: Selection

    Open your student workbook at page 20 read through the notes and then complete Task 10 on page 21.


    Task: Selection 2

    Open your student workbook at page 26 and then complete Task 14 .

    Task 5 - Lesson Review Click to see more


    Summing it all up

    Lets look at the learning outcomes and decide which one best describes our current level of understanding :

    Tick the one you feel is closest to your level

    Learning Outcomes I need to learn how to understand and know how to use selection in a computer program.

    • I have a basic understanding of how I can understand and know how to use selection in a computer program. with a little help from my teacher
    • I can show my teacher that I can understand and know how to use selection in a computer program. without their help.
    • I can understand and know how to use selection in a computer program. independently and I can also explain it to others and can complete any extension tasks I am given.

    🠜 Now update your learning objectivesClick on the Assessment image

    Task 6 - End of Task Assessment Click to see more