💻 TechnologyGrade 4Lesson 27
← Back🔒 PDF with full access

Code Simple Programs Using Visual Blocks

Lesson preview: the Mini Lesson and Vocabulary are open to everyone. Guided practice, exercises, the parent checklist and the printable PDF worksheet come with full access (free 7-day trial or membership).

Learning Objectives

  • 1Explain what visual block coding is and how it works
  • 2Identify the main types of code blocks and what each one does
  • 3Arrange programming steps in logical order to build a simple program
  • 4Match code block types to the actions they perform
📘

Mini Lesson

Visual block coding lets you create programs by snapping together colored blocks instead of typing lines of text code. Each block represents an instruction. When you connect blocks in sequence, the computer follows them in order. Tools like Scratch use this approach, making coding accessible for beginners.

Types of Code Blocks

  • Event blocks — trigger the program to start, e.g. "When flag clicked" or "When key pressed".
  • Motion blocks — move or rotate the character on screen, e.g. "Move 10 steps".
  • Control blocks — manage loops and conditions, e.g. "Repeat 10 times" or "If ... then ...".
  • Looks blocks — change appearance or speech, e.g. "Say Hello!" or "Change costume".
  • Sound blocks — play audio or music, e.g. "Play sound meow".

Logical Steps to Build a Program

  1. Define what the program should do — decide the goal before you start building.
  2. Choose and place the event block — this is the starting trigger for your program.
  3. Add motion or action blocks — make the character move or do something.
  4. Add control blocks — use loops or conditions to repeat or make decisions.
  5. Test and fix any errors — run the program, observe what happens, and adjust.
Types of Visual Code BlocksTypes of Visual Code BlocksEvent:When flag clickedMotion:Move 10 stepsControl:Repeat 10 timesLooks:Say "Hello!"Sound:Play sound meowSnap blocks together to build a program
Programming Steps in OrderProgramming Steps in Order1Define what the program should do2Choose and place the event block3Add motion or action blocks4Add control blocks5Test and fix any errorsFollow steps in order for a working program
💡

Tip: Always start with an event block — without it, your program has no trigger and will not run when you press the flag.

Vocabulary
visual block coding
A way to write programs by connecting colored blocks that each represent an instruction.
event block
A code block that triggers the program to start when something happens, like clicking a flag.
motion block
A code block that makes a character move, rotate, or change position on screen.
control block
A code block that manages loops and conditions within a program.
loop
A set of instructions that repeats a certain number of times or until a condition is met.
debug
To find and fix errors in a program so it runs correctly.
Free · 7 days · No credit card

Unlock the full HSEA system for 7 days.

Add your first kid profile and your 7 days start: every lesson in every grade, saved progress for each child. Nothing to set up, no card required, nothing to cancel.

  • ✓ All 1,680 lessons, Grades 1–6, every subject
  • ✓ Profiles + saved progress for every kid
  • ✓ Printable lessons with answer key
Start your 7-day free trial →
← Lesson 26: Plan Digital Infographics with AI AssistanceLesson 28: Create Multimedia Presentations Using AI →