0% found this document useful (0 votes)
25 views

Scratch Nested Condition

ICT activity

Uploaded by

puppythuy
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Scratch Nested Condition

ICT activity

Uploaded by

puppythuy
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Computational

Thinking:
Nested Conditions

1
2
Let’s take a look at the examples:

● If the color is red: ● If the color is green:


Stop Go!

3
Let’s evaluate: Guess who?

If “the character has a hat” is


true:

Remove from game

Else:

Keep in game

4
Let’s evaluate: Guess who?

5
Let’s evaluate: Guess who?

6
Let’s evaluate: Guess who?

7
Investigate answers
What will happen if:
● Explain what the following
block of code does?
The user has responded “yes”
to the question

The user has responded “no” to the


question

8
Investigate answers

● What happens if you say “No”


when asked if it is your
birthday?

● What happens if you say “Yes”


when asked if it’s your
birthday?
9
Investigate answers: If statements

As we have discovered, an If
block allows us to check a
condition and perform an
operation if the condition
evaluates to ‘true’.

If the condition evaluates to


‘false’, the operation will not be
carried out.

1
0
Investigate answers: ‘if/else’ statements

An If block with an Else allows us


to perform a different operation
should the condition evaluate
to ‘false’, before the program
continues.

1
1
Activity 2

Investigate answers

● From which menu on the left-


hand side of your Scratch
window would you find the If
blocks?

1
2
Activity 2

Investigate answers

● From which menu on the left-


hand side of the screen would
you find the following blocks?

1
3

You might also like