(Hello World) Issue 04

Page 50

LESSON PLAN

AGE RANGE 7 – 10 years

LESSON TYPE Visual / blockbased coding

REQUIREMENTS • Scratch 2.0 • Key spelling words

SCRATCH SPELLING TEST This spelling game is a great way to introduce inputs, outputs, and variables, as well as learning key words for English literacy or vocabulary for a foreign language! STORY BY Cat Lamin

t can be a challenge to think of ways to apply Scratch and computational thinking skills to subjects outside computer science, but this is a great way to apply Scratch to the rather tedious subject of learning spellings. This simple game teaches users about how to use Say and Ask blocks, as well as introducing variables and broadcasts, switching between costumes, and understanding

I

THE CHALLENGE S tart a new Scratch project and choose

conditional statements. It’s based around the traditional ‘look, cover, write, check’ method of learning spellings that we’re all familiar with, but makes it more interesting. Students could write the code to learn key spelling words for their own age group, or even make it to share with younger students. Why not ask them to plan a lesson around showing younger students how to use the game? This game brings together a range of different coding skills, and it might be worth exploring some of them individually before challenging your students with this task.

your background C hoose a sprite with great facial expressions; for example Nano, Pico,

nH ere are the first few statements of the code. Notice that the first Ask block is searching for the answer ‘yes’. You could extend the task by suggesting that the students put in an Or block to consider alternative answers such as ‘yeah’ or ‘yup’

be any word you’d like; in this case, it’s set to ‘because’. You can set up the other two variables in exactly the same way. The score variable gets set to zero because we want to start the game with no points. Now you’re ready to set up your first spelling word. First, we need to tell the player what the word is by using the variable ‘word1’. Then,

Giga, or Tera T hink about how your instructions need to be written to be clear to the user W hat sort of questions could you ask at the beginning? What answers would you expect? I f you want a countdown, you’ll need to include a sprite with three costumes (the numbers 3, 2 and 1) M ake sure you understand the difference between ‘say [...]’ and ‘say [...] and wait for (2) secs’

50

helloworld.cc

n The finished spelling game in action

First, build an introduction to your game using Say and Ask blocks. A Say block simply displays a message on the screen, while an Ask block expects a user response and will stay on screen until it receives one. In this case, the Ask block is looking for a yes or no answer: ‘Are you ready?’. Attached to it is a Conditional block: ‘if answer = ‘yes’ then say “Great! Here we go...” or say “Tough luck!”’. In other words, regardless of your answer, you are playing the game. Now we need to set up our three word variables, plus a score variable. This is separate from our main code, but still included on the sprite. You can assign the variable ‘word1’ to

n Y ou’ll need to set up three variables for words and one

for score. The variable names don’t matter, it’s what you set them to that is important


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.