WEEK 4 (pixels and animation 1)
- a loop (for/while/repeat)
- a conditional (if/else-if/etc)
- a custom variable and/or list
- a user input (keyboard, mouse, webcam, microphone)
- an element of randomness
- BONUS: a custom block
Scratch Sketches — Week 4 Deliverables
For this assignment, I created four Scratch sketches that demonstrate the required elements: loops, conditionals, variables, user input, randomness, and a custom block. Each sketch builds on the previous one, and the final project (“Abby”) incorporates everything.
Download the Scratch projects and documentation:
Sketch 1 — Simple Bounce
Description: The sprite moves across the stage forever. When it touches the edge, it bounces back.
Requirements shown:
- Loop (forever)
- Conditional (if on edge, bounce)
Sketch 2 — Keyboard Walker
Description: The sprite moves right when the right arrow is pressed, and left when the left arrow is pressed. The speed variable controls how fast it moves.
Requirements shown:
- Variable (speed)
- User input (arrow keys)
- Loop (forever)
- Conditional (if key pressed)
Sketch 3 — Random Teleporter
Description: When the space key is pressed, the sprite jumps to a random location on the stage. This repeats as long as the program runs.
Requirements shown:
- Loop (forever)
- Conditional (if key pressed)
- User input (space key)
- Randomness (pick random for X and Y positions)
Sketch 4 — Abby (Speeding Sprite with Custom Block)
Description: The sprite starts in a random direction and moves at a speed controlled by the speed variable. It bounces off the edges, flashes colors on impact, and speed can be increased or decreased with arrow keys. A custom block (My Move) organizes the motion and bounce logic.
Requirements shown:
- Loops (forever, repeat)
- Conditionals (if touching edge, if key pressed, if speed < 1)
- Variable (speed)
- User input (arrow keys)
- Randomness (random direction at start)
- A Custom block