0% found this document useful (0 votes)
7 views10 pages

Y8!26!03-2024-Programming in Scratch Selection

Uploaded by

mike.saunders
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
0% found this document useful (0 votes)
7 views10 pages

Y8!26!03-2024-Programming in Scratch Selection

Uploaded by

mike.saunders
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 10

Computing

With: Mr Mike
Programming in Scratch Selection
Date: 26 March 2024

LO: How to use selection in scratch

Success criteria: Students can use selection to make


choices in scratch to create a small program.
Single condition selection

Selection is used to check a condition and then do one thing if the condition is
True and one thing if the condition is False.

In programming, this is done using if statements and if-else statements.

You may have come across the IF function in spreadsheets, if-else statements
work in exactly same way.

We are asking a question using the if statements, with a pre determined answer,
which gives us true or false.
If statement example - True

Here is an example of an if statement. An if statement does something if the


condition is True.
If else statement example

Here is an example of an if-else statement. An if-else statement performs one action if the
condition is True and another if it is False; it will not perform both actions.

We used these in python


Activity
Multiple condition selection

We have seen how you can use selection to check one condition. But what if
you need to check more than one condition? You can nest if-else statements
inside if-else statements, so that multiple conditions can be checked.
Multiple condition selection

Below is an example of how you can check multiple conditions. If the first
condition is True, the second condition check will not take place.
Pop Quiz
Thank you.

In our next session, I will discuss:


Selection.

You might also like