› Teaching Materials › Prepare level 8

What is new in this level?

In this last level of Hedy Basic your students will learn how to use repitition in their programs! they can only repeat one line multiple times. Repeating multiple lines will be taught in the upcoming levels.

New in this level:

  • Repeating a line with repeat 3 times
  • Repeating a line 'variable' times
  • Slides Present the level, one concept at a time
  • Workbook Exercises to print, away from the screen Work in progress

Common mistakes

Students forget one of the word of the repeat command, or they forget the print command

What students get wrong

Make sure that the students know to use both the full repeat command and the print command.

repeat 3 times  "For he's a jolly good fellow"
repeat 3 print 'Which nobody can deny!'
How to fix it

This is the correct code:

repeat 3 times print "For he's a jolly good fellow"
repeat 3 times print 'Which nobody can deny!'

Students try to repeat multiple lines

What students get wrong

In this level you can only repeat one line of code multiple times. In this code the student wanted to print 3 different drinks, but it won't work. It will ask the question 3 times and only print the last answer.

repeat 3 times drink = ask 'What would you like to drink?'
print drink
How to fix it

You should go to the next level to be able to repeat multiple lines. So on this level you'll have to print everything separately.

drink = ask 'What would you like to drink?'
print drink
drink = ask 'What would you like to drink?'
print drink
drink = ask 'What would you like to drink?'
print drink

Students make programs that take too long to run

What students get wrong

In this level it's very easy to make programs that take a lot of time to complete. If the program takes too long, it'll be stopped, this with the intention to prevent straining the student's machine.

repeat 100 times print 'How many times can I repeat this?'
How to fix it

Make sure the code doesn't take too long to execute

repeat 20 times print 'This is enough'