A scientist demonstrates what happens when algorithms have bugs, by pretending to be a robot that makes a smoothie. He encounters a syntax bug which is a typing error by the programmer. In this example the word milk had the letter k missing. The robot also encountered a logical bug which is an instruction that is missed out or not explained clearly. The algorithm didn't include pouring the smoothie into a glass. What happens as a result of these errors?

This clip is from:
Teach

Students could write their own algorithms for an everyday task such as tying their shoe laces, getting dressed or making beans on toast. Once they have finished writing the algorithm, a friend should check it for bugs. If they find a bug, they have to discuss whether it is a syntax error or logic bug.