Have you ever wanted your Scratch characters to make decisions and repeat actions? In this blog, we’ll dive into interesting Scratch blocks that let you do just that: Conditionals and Loops. Let’s explore how these blocks helps us control the program and make the projects more interactive and fun!
What are Conditionals?
Imagine you’re playing a game and there’s a door in front of you. If you have a key, you can open it. If not, you can’t. This is a perfect example of a conditional! It’s like asking a question: “Do I have a key?” and then taking an action based on the answer.
In Scratch, we use conditionals to tell our sprites what to do if something happens.
Example: Let’s say, we want our sprite to jump if the space key is pressed at the start of the program. To achieve this, we’ll use the “if” block:

- The condition here is checking if the space key is pressed.
- If it is, then our sprite will jump 100 steps!
What are Loops?
Have you ever sung the “Happy Birthday” song? You repeat the same lines again and again! This is called repeating or looping.
Loops in Scratch let your sprite repeat an action multiple times or forever. They’re super useful when you want something to keep happening, like a character running, flying, or moving around in circles.
Types of Loops in Scratch:
- Forever Loop: As the name says, it keeps going for ever until you stop the program.
- Repeat Loop: With this loop, you decide how many times you want the action to repeat.
This loop will make your sprite go to random position 10 times—perfect for creating shapes!

This makes your sprite keep moving forward endlessly.
Combining Conditionals and Loops:
The real magic happens when we use conditionals inside loops! This way, your sprite can check conditions again and again, and take different actions based on what’s happening.
Example: Let’s say we want our sprite to move forward forever, but only place it at the left corner if it touches the edge. We can use a forever loop with an if block inside:

Now, our sprite will keep moving until it reaches the edge —then it will be placed at the left corner of the screen and it starts moving to the right.
Try It Out!
- Create a game where your sprite needs to collect stars. Use a forever loop to keep the game running, and use if blocks to make the sprite say “Yay!” every time it touches a star.
- Make a dance animation! Use a repeat loop to make your sprite turn and jump multiple times.
Tip:
Whenever you want your sprite to make choices or do something repeatedly, think: Conditionals and Loops!
With these two tools, you’re ready to create smarter and more exciting Scratch projects. Keep experimenting, and have fun coding!