Teacher Boen Resource Library · Kenya CBC/CBE
Grade 8 · Pre-Technical Studies

2.4 Visual Programming

Strand 2.0 Communication in pretechnical studies

2.4.1 What is Visual Programming?

Visual programming is a way of creating computer programs by dragging and dropping graphical blocks (like puzzle pieces) instead of typing text code. It is easier for beginners.

2.4.2 Types of Visual Programming Applications

Type

Purpose

Examples

Educational

Teach programming concepts

Scratch, Microsoft MakeCode, SpriteBox

Multimedia

Create animations, games, stories

Scratch, Adobe Animate

Video games

Design and code games

Scratch, Unity (with visual scripting)

2.4.3 Features of Visual Programming Applications

  • Input – receiving data (mouse click, key press, microphone).
  • Processing – the code blocks determine what happens.
  • Output – displaying results (text, animation, sound).
  • Effects – sound, animations, background changes, movement.

2.4.4 Terminologies Used in Visual Programming

Term

Meaning

Syntax

The rules for writing instructions (visual blocks avoid syntax errors).

Variables

Containers for storing data (e.g., score, name).

Input statement

Code that gets data from the user (e.g., “ask and wait” in Scratch).

Output statement

Code that displays something (e.g., “say” block).

Coding blocks

The graphical puzzle pieces that represent commands.

Sequence statement

Blocks that run one after another in order.

Repeating statement (loop)

Blocks that repeat a set of instructions (e.g., “repeat 10 times”).

Selection statement

Decision‑making blocks (e.g., “if … then … else”).

Variable declaration

Creating a variable (e.g., “set score to 0”).

2.4.5 Creating Sequential Instructions

Example in Scratch (sequence):

text

When green flag clicked

Say “Hello!” for 2 seconds

Move 10 steps

Play sound “pop” until done

Example with selection:

text

If [score] > 10 then

Say “You win!”

Else

Say “Try again!”

2.4.6 Activity

  • Launch Scratch or Microsoft MakeCode. Identify the different categories of blocks (motion, looks, sound, events, control, sensing, variables).
  • Create a simple animation: a cat moves across the screen, says “I love programming”, and meows.
  • Add a loop to make the cat move 10 times.

2.4.7 Key Inquiry Question

How are computer programs used in day‑to‑day life?