💎
Coding Cave

Step-by-Step Logic with Scratch

Win
🤖
Code Captain Badge

Coding is just giving a computer clear instructions in the right order. First you'll learn to write step-by-step instructions, then you'll snap colourful blocks together in Scratch to bring a cat to life — no typing needed!

🔵Algorithms — step by step

An algorithm is a set of step-by-step instructions to do a job. A computer follows the steps exactly, in order — so the order matters!

Here's an everyday algorithm for brushing your teeth:

  1. Pick up the toothbrush.
  2. Put toothpaste on it.
  3. Brush your teeth.
  4. Rinse your mouth.
Swap two steps and it goes wrong! If you 'rinse' before you 'brush', your teeth don't get clean. Computers are the same — give the steps in the right order.

🤖 Vidi's Key Points

  • An algorithm is a set of step-by-step instructions to do a job.
  • A computer follows the steps exactly, in order — so the order matters.
  • Putting steps in the wrong order gives the wrong result.

Quick Challenge: A set of step-by-step instructions to do a job is called an…

🟢The Scratch screen & moving a sprite

Scratch is a free tool where you build programs by snapping coloured blocks together. The main parts of the screen are:

PartWhat it is
StageThe big area where your program runs and you watch the action
SpriteThe character you control (the orange cat is the default)
Blocks PaletteThe coloured blocks you can use (Motion, Looks, Events…)
Script AreaWhere you drag blocks and snap them together

Moving the sprite

The blue Motion blocks move and turn the sprite across the Stage:

move 10 steps
turn 15 degrees
go to x: 0 y: 0

🤖 Vidi's Key Points

  • Scratch builds programs by snapping coloured blocks together — no typing needed.
  • Scratch parts: Stage (where it runs), Sprite (the character), Blocks Palette, Script Area.
  • Blue Motion blocks (move steps, turn degrees) move and turn the sprite.

Quick Challenge: In Scratch, the character you control is the…

🟣Costumes, backgrounds & the 'when clicked' trigger

A sprite can have different costumes — different looks. Switching costumes makes it seem to move, like a flip-book. The Stage can have different backgrounds (also called backdrops) — a park, a classroom, space.

Making a program start

A program needs a trigger to begin. The most common is the green flag:

when  green flag clicked
move  50 steps
next costume

The orange Events block when green flag clicked runs your script the moment you click the green flag. There is also when this sprite clicked, which starts the script when you click the sprite itself.

🤖 Vidi's Key Points

  • Costumes are a sprite's different looks; switching them makes it look like it's moving.
  • The Stage can have different backgrounds (backdrops) like a park or classroom.
  • An Events trigger such as 'when green flag clicked' starts a script.

Quick Challenge: Which block group MOVES and TURNS the sprite?

🟡The Repeat loop & speaking

What if you want the cat to move many times? You could stack lots of move blocks… but a loop is much smarter. The Repeat block does the same actions again and again, automatically:

when  green flag clicked
repeat 4
    move 50 steps
    turn 90 degrees

This runs the two blocks inside it 4 times — making the cat walk a square. Loops save you from repeating blocks by hand.

Making the sprite talk

The purple Looks blocks add speech bubbles: say "Hello!" shows a bubble, and say "Hi" for 2 seconds shows it for a short time.

🤖 Vidi's Key Points

  • A Repeat loop runs the blocks inside it again and again — so you don't repeat blocks by hand.
  • 'repeat 4' runs its inside blocks 4 times (e.g. to walk a square).
  • Purple Looks blocks like 'say' show speech bubbles.

Quick Challenge: Which block makes a set of actions happen again and again?

🛠️Practical: make the cat walk a square

In Scratch, build a script that:

  1. Starts with 'when green flag clicked'.
  2. Says 'Watch me walk a square!' for 2 seconds.
  3. Uses a 'repeat 4' loop with a move block and a turn 90 block inside.
  4. Switches the cat to its next costume at least once.

🎯 Mission Quiz

Answer a few questions to complete this mission and win the 🤖 Code Captain Badge!

Start the Mission Quiz →