They learnt how to code an object to change direction when different keys are pressed on the keyboard. For this, they created a game where you can control the movement of a plane by pressing four different keys on the keyboard.
An algorithm is a set of instructions of how we could solve a challenge. The children's challenge was to
make a program to control a plane to move around the screen and stop. The algorithm was in four parts. Children needed to make the plane go:
2) turn up
3) turn down
Children then had to create some code to make the algorithm work. Then then needed to run the code to test it worked. Children pressed the appropriate key on the keyboard to run the code. This executes the line of code and children could see if the plane was doing what it was supposed to be! Some of the coding was incorrect so children had to debug their code by going back and redoing it. We realised that good programmers test their coding as they go along to see if it is executing properly because it is easier to spot a problem and debug this way.
Have a go at Year 4's games! Make sure you look at the keys you need to press at the bottom of the screen!
Some children went on to create their own helicopter game. This was slightly different as children learnt that objects can be programmed to do an action when a button is clicked and that different buttons can be programmed to make different actions happen. Take a look at these helicopter games to see!
In class we shared and played each others games by posting them onto our Edmodo page.