› Teaching Materials › Prepare level 3

What is new in this level?

Level 3 adds lists and randomness. This is the first level where running the same program twice can give a different result, which surprises students who assume a program is a fixed recipe. It is a good moment to have them run their code several times before deciding whether it works.

New in this level:

  • Making a list with is and picking from it with at random
  • Adding an item to a list with add to
  • Taking an item out of a list with remove from
  • Slides Present the level, one concept at a time
  • Workbook Exercises to print, away from the screen Work in progress

Common mistakes

Students try to print whole lists

What students get wrong

A list can't be printed. You can only print one item from the list with at random.

groceries is apples, milk, chocolate
print groceries
How to fix it

To print a list of all the groceries, you simply need to put them after a print command. Else you can use the list to print one item with at random.

print apples, milk, chocolate

# or

groceries is apples, milk, chocolate
print groceries at random

Students use the name of a variable or list as regular text

What students get wrong

This problem probably occurred in level 2 as well. Now it can happen with lists too.

name is Hedy
print Hi my name is name

# or

animal is rhino, bee, swan
print The best animal is... animal at random
How to fix it

Don't use the names of variables or lists in regular text to print. In level 4 this problem is solved with quotation marks.

name is Hedy
print Hi I'm name

# or

animals is rhino, bee, swan
print The best animal is... animals at random

Students forget at in at random

What students get wrong

Like in the example

birds is sparrow, seagull, robin
print birds random
How to fix it

This problem is solved by adding the word at.

birds is sparrow, seagull, robin
print birds at random

Students forget to use the print command when also using the at random command

What students get wrong

Or they will sometimes put at random at the beginning of the line.

fruit is apple, cherry, banana
fruit at random
How to fix it

Emphasize to your students that you always need a print to print text.

fruit is apple, cherry, banana
print fruit at random

Students forget to use commas in their lists

What students get wrong

In a list items are separated with a comma.

pizzas is funghi tonno quattro stagioni
print pizzas at random
How to fix it

After each item on your list, there should be a comma

pizzas is funghi, tonno, quattro stagioni
print pizzas at random

Students try to use at random without a list

What students get wrong

For example

clubs is Manchester United
print clubs at random
How to fix it

Hedy can't print anything at random, because there is no list to choose from.

clubs is Manchester United, FC Bayern Munich, FC Barcelona
print clubs at random

Students try to use add/remove without a list

What students get wrong

In the example below 'names' is not a list, but a variable. You cannot add anything to it.

names is Jake
your_name is ask Who are you?
add your_name to names
print names at random
How to fix it

There has to be a list first, so you have to add a second name to turn names into a list, for example Amy. If you don't want amy on your list, you can use remove to remove it after.

names is Jake, Amy
your_name is ask Who are you?
add your_name to names
print names at random

Students forget to use to/from in add/remove

What students get wrong

Without to/from the add/remove command won't work.

adventures is story, parrot, dice
choice is Which adventure do you like best?
add choice
remove dice
print I love adventures at random
How to fix it

Hedy has to know which list the item should be added to/removed from.

adventures is story, parrot, dice
choice is Which adventure do you like best?
add choice to adventures
remove dice from adventures
print I love adventures at random