Conditional Statements in PictoBlox

Scratch Game
Lesson Details
How do the various conditional statements in PictoBlox – if, if-else, repeat, forever – function?

Activities:

  • Creating different scripts to understand the flow of execution of a program when using conditional statements.
Classroom Bundle Used: STEM Classroom Bundle, STEM Mini Classroom Bundle
Prerequisites: Arithmatic Operators
Download Resources

Lesson Overview

Students will learn the following things:

  • What are relational operators in PictoBlox?
  • What is a conditional statement and how it works in PictoBlox using various activities?

Material Required

1 set of the following material per group of 3-5 students:

Component Image Quantity Available in Bundle
PictoBlox Installed in Computer

Lesson Outline

Relational Operators - 10 minutes
  • What are relational operators in PictoBlox?
  • Relational operator blocks:
    • Greater Than >
    • Less Than <
    • Equals to =
Conditional Statements - 10 minutes
  • What are the conditional statements?
  • How do they work in PictoBlox?
Repeat Block - 15 minutes
  • What is the repeat block?
  • Making a program to make Tobi recite the table of a number input by the user.
Forever Block - 5 minutes
If then Block - 10 minutes
  • How if-then block works?
  • Make a program in which whenever we press the space key, Tobi will glide to a random position on the stage.
If () then else block - 10 minutes
  • How if then else block works?
  • Make a program in which whenever the mouse is clicked, Tobi moves toward the mouse and when not click it goes to its default position at center.

Download Lesson Resources

Next Lessons