Skip to content
Lesson 1 of 9 Free Preview
Duration: 15 min

Yes-or-No Questions

Learn it

A condition is a yes-or-no question, also called true or false. In Scratch, condition blocks have pointy ends, like <touching [edge]?> or <(score) > (5)>.

Conditions fit inside if, if-else, wait until and repeat until.

๐Ÿงฐ Tool: free Scratch online editor (no account needed to try; a parent can create one to save projects) or the free ScratchJr app for tablets.

Code examples

Blocks (Scratch)

when green flag clicked
forever
    if <touching [edge]?> then
        say [Ouch, the edge!] for (1) seconds
    end
    move (5) steps
end

Project: True or false game

  1. Say 5 statements to a friend (‘Dogs can fly’). They shout true or false.
  2. In Scratch, find 3 blocks with pointy ends.
  3. Use one inside an if block.

Challenge: Make a sprite say ‘I’m near the top!’ when y position > 100.

Enjoying this lesson?

Enroll in the full course to access all lessons, track your progress, and earn a certificate.

Enroll in Full Course