Teaching Materials
What is new in this level?
In level 1 the students have learned how to use the variable answer. In this level they'll learn to use multiple variables.
This is the first abstract concept of programming they'll encounter: a name that stands for a value that can change.
Because the students can use multiple variables, they need to learn how to define them as well.
This means that the ask has changed and needs to be precedented by the variable they want to store the answer in.
New in this level:
- Storing a value in a variable with
is - Saving the reply to a question in a variable of your own choosing:
isaskWhat is your name? - Pausing the program with
sleep - Turning the drawing turtle with a number of degrees:
turn90
- Slides Present the level, one concept at a time
- Workbook Exercises to print, away from the screen Work in progress
Common mistakes
Students make typos in their commands
Hedy can't recognize a command with a typo.
prinnt Don't make typos
Teach your students to read the error messages. This way they can find out themselves what went wrong.
print Don't make typos
Students forget that the ask command has changed
In this level students learn about variables. The ask command requires a variable as well, but students forget this.
ask what would you like to eat
In this level you have to tell Hedy where to save your answer, so it can be used later on. This is called a variable.
order is ask What would you like to eat
Students try to use the answer for multiple questions
The variable answer still works, but it only stores one answer at the time. Students will sometimes try to store multiple answers in one variable.
answer is ask What is your name? answer is ask How old are you? print Hi answer. print You are answer years old.
Teach your students the importance of naming variables accurately.
name is ask What is your name?
age is ask How old are you?
print Hi {name}.
print You are {age} years old.
Students use a variable name or as a normal word
In the example below the word 'name' is used as a variable, but also as a normal text. The output of this code will be 'Hi my Hedy is Hedy'.
name is Hedy print Hi my name is name
So don't use a word you want to use in the text as a variable name. In level 4 this is solved with quotation marks.
name is Hedy print Hi I'm name
Students use long variable names containing two words.
A variable should be named with one word. You could use an underscore to connect two words. That counts as one.
chosen door is ask Which door do you pick
Add an underscore.
chosen_door is ask which door do you pick
Students might use two different names for the same variable
In this example the student has used 'horse' and 'name' for the same variables.
horse is ask What is your horse called print Your horse is called name
Always check whether the variable has the same name throughout the code. Slight differences can be hard to spot (for example plurals) but they will interfere with the code.
name is ask What is your horse called print Your horse is called name