Introduction To Scratch Basic 5 Computer Studies Lesson Note

Lesson Notes

Topic: Introduction To Scratch

Learning Objectives: By the end of the lesson, pupils should be able to:

  • Understand what Scratch is and its purpose
  • Navigate the Scratch interface
  • Create simple animations and programs
  • Use basic Scratch blocks and commands

What is Scratch?

Scratch is a visual programming language designed especially for children and beginners to learn coding concepts. It was developed by MIT (Massachusetts Institute of Technology) to make programming fun, easy, and accessible.

Key features of Scratch:

  • Visual programming – Uses colorful blocks instead of typing code
  • Drag and drop – Simply drag blocks to create programs
  • No typing errors – Blocks fit together like puzzle pieces
  • Immediate feedback – See results instantly as you build
  • Free to use – Available online at scratch.mit.edu

Why learn Scratch?

  • Introduction to programming – Teaches fundamental coding concepts
  • Creative expression – Create games, stories, and animations
  • Problem-solving skills – Learn to think logically and systematically
  • Builds confidence – Success with simple projects encourages further learning

Scratch Interface:

Main Areas of Scratch:

  1. Stage Area (Top Right)
  • Display area – Where your animations and games appear
  • Size: 480 x 360 pixels
  • Background – Can change colors, add images, or create scenes
  • Sprites appear here – Characters and objects move on the stage
  1. Sprite Area (Bottom Right)
  • Sprite list – Shows all characters and objects in your project
  • Default sprite – Orange cat (Scratch Cat) appears automatically
  • Add sprites – Can add more characters, objects, or draw your own
  • Sprite information – Shows name, position, and size of selected sprite
  1. Blocks Palette (Left Side)
  • Block categories – Different colored groups of programming blocks
  • Motion blocks (blue) – Move sprites around
  • Looks blocks (purple) – Change appearance, show speech bubbles
  • Sound blocks (pink) – Play sounds and music
  • Events blocks (yellow) – Start programs when something happens
  • Control blocks (orange) – Loops, conditionals, and program flow
  • Sensing blocks (light blue) – Detect touches, key presses, etc.
  1. Scripts Area (Center)
  • Programming workspace – Where you drag and connect blocks
  • Build scripts – Stack blocks together to create programs
  • Multiple scripts – Can have several separate programs for one sprite
  • Color-coded – Blocks maintain their category colors
  1. Menu Bar (Top)
  • File menu – Save, load, and share projects
  • Language – Change interface language
  • Account – Sign in to save projects online

Basic Scratch Concepts:

SPRITES:

  • Characters or objects in your project
  • Can be animated – Move, change appearance, interact
  • Default sprite – Scratch Cat comes with every new project
  • Add sprites – Choose from library, upload images, or draw your own
  • Sprite properties – Position, size, direction, visibility

BLOCKS:

  • Programming commands represented as colorful puzzle pieces
  • Snap together – Connect blocks to create scripts
  • Different shapes – Different block shapes serve different purposes
  • Color-coded – Each category has its own color

SCRIPTS:

  • Series of connected blocks that tell sprites what to do
  • Run top to bottom – Blocks execute in order from top to bottom
  • Multiple scripts – Sprites can have many different scripts
  • Event-driven – Scripts start when specific events occur

STAGE:

  • Background area where action takes place
  • Coordinate system – Uses X (horizontal) and Y (vertical) positions
  • Center is (0,0) – Middle of stage is position (0,0)

Basic Scratch Blocks:

MOTION BLOCKS (Blue):

move (10) steps

  • Makes sprite move forward by specified number of steps
  • Positive numbers move right, negative numbers move left

turn right (15) degrees / turn left (15) degrees

  • Rotates sprite clockwise or counterclockwise
  • 90 degrees = quarter turn, 180 degrees = half turn

go to x: (0) y: (0)

  • Moves sprite to specific position on stage
  • X controls left-right position, Y controls up-down position

glide (1) secs to x: (0) y: (0)

  • Smoothly moves sprite to position over specified time
  • Creates smooth animation instead of instant movement

LOOKS BLOCKS (Purple):

say [Hello!] for (2) seconds

  • Shows speech bubble with message above sprite
  • Bubble disappears after specified time

show / hide

  • Makes sprite visible or invisible on stage
  • Useful for making sprites appear and disappear

change size by (10) / set size to (100) %

  • Makes sprite bigger or smaller
  • 100% = normal size, 200% = double size, 50% = half size

change color effect by (25)

  • Changes sprite’s color appearance
  • Creates rainbow-like color shifting effects

SOUND BLOCKS (Pink):

play sound [meow] until done

  • Plays complete sound before continuing to next block
  • Waits for sound to finish

play sound [meow]

  • Starts playing sound but continues immediately to next block
  • Multiple sounds can play at same time

EVENT BLOCKS (Yellow):

when green flag clicked

  • Starts script when green flag (start button) is clicked
  • Most common way to begin programs

when [space] key pressed

  • Starts script when specific key is pressed
  • Can detect any keyboard key

when this sprite clicked

  • Starts script when user clicks on the sprite
  • Makes sprites interactive

CONTROL BLOCKS (Orange):

wait (1) seconds

  • Pauses script for specified amount of time
  • Useful for timing in animations

repeat (10)

  • Repeats blocks inside specified number of times
  • Creates loops for repetitive actions

forever

  • Repeats blocks inside continuously
  • Loop never stops (until program ends)

if <> then

  • Only runs blocks inside if condition is true
  • Makes programs make decisions

Simple Scratch Projects:

Project 1: Moving Cat

when green flag clicked

forever

    move (10) steps

    if on edge, bounce

 

This makes the cat move across the stage and bounce off edges.

Project 2: Color-Changing Cat

when green flag clicked

forever

    change color effect by (10)

    wait (0.1) seconds

 

This makes the cat continuously change colors.

Project 3: Interactive Cat

when this sprite clicked

say [Hello! You clicked me!] for (2) seconds

change size by (20)

play sound [meow] until done

 

This makes the cat respond when clicked.

Project 4: Keyboard Control

when [right arrow] key pressed

move (10) steps

 

when [left arrow] key pressed

move (-10) steps

 

when [up arrow] key pressed

change y by (10)

 

when [down arrow] key pressed

change y by (-10)

 

This lets you control the cat with arrow keys.

Getting Started with Scratch:

Step 1: Access Scratch

  • Go to scratch.mit.edu in web browser
  • Click “Create” to start new project
  • No download required – works in browser

Step 2: Explore the Interface

  • Look at the orange cat sprite
  • Notice the different colored block categories
  • Try dragging a block to the scripts area

Step 3: Create Your First Script

  • Drag “when green flag clicked” block to scripts area
  • Add “say Hello for 2 seconds” block underneath
  • Click green flag to test your program

Step 4: Experiment

  • Try different motion blocks
  • Change numbers in blocks to see what happens
  • Add sound blocks to make noise
  • Connect multiple blocks together

Step 5: Save Your Work

  • Click “File” then “Save to your computer”
  • Or create account to save online
  • Give your project a meaningful name

Scratch Programming Concepts:

Sequencing:

  • Blocks run in order from top to bottom
  • Each block waits for previous block to finish
  • Order matters for correct program behavior

Loops:

  • Repeat blocks allow actions to happen multiple times
  • “Forever” loops continue until program stops
  • “Repeat (n)” loops run specific number of times

Events:

  • Programs start when events occur (flag clicked, key pressed)
  • Different events can trigger different scripts
  • Makes programs interactive and responsive

Variables:

  • Can create variables to store information
  • Useful for keeping score, tracking positions
  • Variables can change during program execution

Conditionals:

  • “If” blocks make decisions based on conditions
  • Programs can react differently to different situations
  • Creates more complex and interesting behaviors

Tips for Success with Scratch:

Start Simple:

  • Begin with basic movement and sound
  • Add complexity gradually
  • Don’t try to create complex projects immediately

Experiment:

  • Try changing numbers in blocks
  • See what happens with different combinations
  • Learn through trial and error

Use the Help:

  • Scratch has built-in tutorials and help
  • Click on blocks to see what they do
  • Explore example projects for inspiration

Be Creative:

  • Create stories, games, and animations
  • Express your ideas through programming
  • Share projects with friends and family

Debug Problems:

  • If something doesn’t work, check block connections
  • Make sure events blocks are at the top of scripts
  • Test small parts of your program at a time

Lesson Notes for Other Classes