understand what algorithms are; how they are implemented as programs on digital devices; and that programs execute by following precise and unambiguous instructions.

create and debug simple programs

1.5a

LO: To debug simple programs.

Time to be annoying; get the envelopes created by the children and mix-up some of the cards.

Give children the mixed-up progrms and ask them to follow the instructions. Now ask what has gone wrong, what needs to be corrected. Follow through an example and see if collectivly the class can debug the program; can they find where the commands are in the wrong order (or missing to extend the task)?

Here we want the Beebot to travel to the red circle:

Where does the Beebot end up? What went wrong witht he program? Can you fix the program in the envelope - what needs to change? What needs to be changed in this code?

clear()
forward()
forward()
turn_right()
forward()
forward()
go()
			

Code Examples

Resources