Perfect parking
Learn
Code
Repeat
Lesson 1 - Visual, level 3
Introduction
Recap previous work on co-ordinates and using "if do else". Show the example and see what happens as the car parks in a space or hits a parked car. Discuss ways in which the program might be deciding if the car has parked properly. (using the "if" to see if a certain condition is true).
Main Activities
Task 1. Using the template get the children to make a new set of blocks like the set starting "if y position" and add it in below the existing set of blocks. Now change the values so that the car can park or crash on the lower set of spaces
Task 2. Children change the car park sprite to the empty car park background. They write a new game where only one of the spaces is the "correct" one and all the others spaces say "This is not your space". (refer to the video as necessary)
Challenge
Children can create their own parking games based on the blank car park template. Share the games with younger children in the school. Those with access to the Just2easy Tool Suite may do that with blogging or sharing, other schools may use the "link" button.
Follow up lesson(s)
Children can create other games using different backgrounds and sprites and performing an action when a sprite is at a particular location.
Children can be encouraged to continue to experiment by accessing J2Code at home.
Schools with access to the Just2easy ToolSuite may choose to blog some work, pupils can then leave comments on each other's work suggesting improvements or leaving feedback. Teachers may also save and share their own examples and templates.
Assessment
Self and peer assessment - pupils can work with a partner to review, and help correct their code (debug).
Learning Objectives
- To use "if do else" to create a simple game.
- To detect and correct errors in their program.
Learning Outcomes
All children: will create a set of blocks to park a car.
Most children: make a specified parking game.
Some children: will create their own game using blank car park template.
Cross curricular links
Maths: number and place value - negative numbers, geometry - position and direction.
Vocabulary
x-position, y-position (see glossary).
Resources
Template: j2e.com/code/template/Y5template1