1 of 16

Upper Elementary

Computer Science

Conditionals: Changing Effects

2 of 16

Objective

Students will be able to create a program using conditionals.

3 of 16

Vocabulary

Conditional: A command that tells a program how to make a decision if something is true or false

?

4 of 16

Vocabulary

Boolean: A value that can only be true or false

5 of 16

This conditional is either…

True: Touching this color.

OR

False: Not touching this color.

6 of 16

What is the difference between these two code blocks?

7 of 16

What is the difference between these two code blocks?

This block only runs once, when the green flag is clicked.

This block will run over and over again, until the program ends.

This is commonly used to check a condition throughout a game.

8 of 16

You will create a program where the sprites are flying, changing effects.

9 of 16

Add a cat, a parrot, and a cloud.

10 of 16

Program the cat to fly.

11 of 16

Program the parrot to fly.

12 of 16

Program the cloud to glide across the page.

13 of 16

Program the cat to check for the parrot using a conditional.

14 of 16

Program the parrot to check for the cat using a conditional.

15 of 16

Continue programming.

Program more reactions among the sprites using conditionals.

16 of 16

Add and program other sprites.

  • Add or change sprite reactions when the conditions are true.
  • Add another cloud gliding across the page, and program the cat and parrot to check for it.