Scratch Programming I Basic 6 Basic Technology Lesson Note

Download Lesson Note
Lesson Notes

Topic: Scratch Programming I

Learning Objectives

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

  1. Apply Scratch programming to draw basic shapes

Content

Introduction to Scratch

What is Scratch?

  • Visual programming language
  • Developed by MIT Media Lab
  • Designed for children and beginners
  • Uses drag-and-drop blocks
  • Creates animations, games, stories

Features:

  • User-friendly interface
  • No typing of code required
  • Immediate visual results
  • Large online community
  • Free to use

Accessing Scratch:

  • Website: scratch.mit.edu
  • Create free account
  • Can work online or download offline editor

Scratch Interface

Main Components:

  1. Stage (Upper Right)
  • Where your project runs
  • Shows sprites and backgrounds
  • Default size: 480 × 360 pixels
  • Coordinate system: center is (0,0)
  1. Sprite List (Lower Right)
  • Shows all sprites in project
  • Can add, delete, or select sprites
  • Default sprite: Scratch Cat
  1. Block Palette (Left)
  • Contains all programming blocks
  • Organized by categories (color-coded)
  • Drag blocks to Scripts Area
  1. Scripts Area (Center)
  • Where you build code
  • Snap blocks together
  • Can have multiple scripts
  1. Backpack (Bottom)
  • Store and share code/sprites
  • Available across projects

Block Categories:

  1. Motion (Blue) – Movement commands
  2. Looks (Purple) – Appearance changes
  3. Sound (Pink) – Audio commands
  4. Events (Yellow) – Triggers for code
  5. Control (Orange) – Loops and conditions
  6. Sensing (Light Blue) – Detect inputs
  7. Operators (Green) – Math and logic
  8. Variables (Orange) – Store data
  9. My Blocks (Purple) – Custom blocks

Coordinates in Scratch

Stage Coordinates:

  • X-axis: -240 to +240 (left to right)
  • Y-axis: -180 to +180 (bottom to top)
  • Center: (0, 0)
  • Top right corner: (240, 180)
  • Bottom left corner: (-240, -180)

Drawing Basic Shapes in Scratch

Preparation:

  1. Delete Scratch Cat sprite (optional)
  2. Add pen extension:
    • Click “Add Extension” (bottom left)
    • Select “Pen”
  3. Create new sprite or use existing

The Pen Blocks:

Key Pen Blocks:

  • pen down – Start drawing
  • pen up – Stop drawing
  • set pen color to [ ] – Choose color
  • set pen size to [ ] – Choose thickness
  • erase all – Clear all drawings
  • stamp – Make copy of sprite

Drawing a SQUARE:

when flag clicked

erase all

pen up

go to x: (-50) y: (50)

set pen color to [red]

set pen size to (3)

pen down

repeat (4)

  move (100) steps

  turn right (90) degrees

end

pen up

 

Explanation:

  1. Start when green flag clicked
  2. Clear previous drawings
  3. Lift pen (don’t draw while moving to start)
  4. Move to starting position
  5. Set pen color to red
  6. Set pen thickness to 3
  7. Put pen down (start drawing)
  8. Repeat 4 times:
    1. Move 100 steps (one side)
    2. Turn 90 degrees right
  9. Lift pen (stop drawing)

Drawing a TRIANGLE:

when flag clicked

erase all

pen up

go to x: (-50) y: (-50)

set pen color to [blue]

set pen size to (3)

pen down

repeat (3)

  move (120) steps

  turn right (120) degrees

end

pen up

 

Key Difference:

  • Repeat 3 times
  • Turn 120 degrees (360° ÷ 3 = 120°)

Drawing a HEXAGON:

when flag clicked

erase all

pen up

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

set pen color to [green]

set pen size to (3)

pen down

repeat (6)

  move (80) steps

  turn right (60) degrees

end

pen up

 

Pattern:

  • For any regular polygon: 360° ÷ number of sides

Drawing a CIRCLE:

Method 1 – Many Small Steps:

when flag clicked

erase all

pen up

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

set pen color to [purple]

set pen size to (2)

pen down

repeat (360)

  move (1) steps

  turn right (1) degrees

end

pen up

 

Method 2 – Using Variables:

when flag clicked

erase all

set [radius] to (50)

pen up

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

point in direction (90)

set pen color to [orange]

set pen size to (2)

pen down

repeat (360)

  move (2 * 3.14159 * radius / 360) steps

  turn right (1) degrees

end

pen up

 

Drawing a STAR (5-pointed):

when flag clicked

erase all

pen up

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

set pen color to [yellow]

set pen size to (3)

pen down

repeat (5)

  move (100) steps

  turn right (144) degrees

end

pen up

 

Key: Turn 144 degrees (720° ÷ 5)

Drawing a RECTANGLE:

when flag clicked

erase all

pen up

go to x: (-75) y: (40)

set pen color to [red]

set pen size to (3)

pen down

repeat (2)

  move (150) steps

  turn right (90) degrees

  move (80) steps

  turn right (90) degrees

end

pen up

 

Customizing Drawings:

Change Colors:

  • Use different color blocks
  • Can use color picker
  • Or set pen color to random

Change Size:

  • Adjust movement steps
  • Change pen size
  • Use variables for flexibility

Multiple Shapes: Create separate scripts or use “go to” blocks to move between shapes without drawing

Adding Interactivity:

Draw on Key Press:

when [space] key pressed

erase all

pen up

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

pen down

[shape drawing code here]

pen up

 

Draw Random Shapes:

when flag clicked

forever

  wait (1) seconds

  set pen color to (pick random (1) to (100))

  [shape drawing code here]

end

 

Tips for Drawing in Scratch:

  1. Always start with: 
    1. erase all (clear previous drawings)
    2. pen up (don’t draw while positioning)
    3. go to starting position
  2. Always end with: 
    1. pen up (stop drawing)
  3. Use repeat blocks for regular shapes 
  4. Calculate angles: 360° divided by number of sides 
  5. Test frequently – Click green flag often 
  6. Use variables for sizes to easily adjust 
  7. Comment your code – Right-click blocks to add notes 

Practice Projects:

Project 1: Rainbow Flower

  • Draw circles in different colors
  • Arrange in flower pattern
  • Use loops

Project 2: House

  • Square for house body
  • Triangle for roof
  • Rectangles for door and windows

Project 3: Robot Face

  • Circle for head
  • Rectangles for eyes
  • Triangle for nose
  • Line for mouth

Lesson Notes for Other Classes