Teacher Challenge 2 Guide
Introduction
Objectives
To further investigate the use of selection, random numbers and subroutines
To use computation to solve problems with code
To find out how to pick up artefacts in Kurono and check inventory status
Preparing for the Lesson
Timing and Prior Experience
Timing | Pupils’ prior experience |
One lesson of approximately 50 mins | Pupils should be familiar with Python programming, including the use of: |
|
Teacher Preparation
Read over the pupil worksheet.
Delivering the lesson
This worksheet picks up from the end of worksheet 1 and pupils should have working code that outputs a message about the next cell. If necessary, explain the starter code on the worksheet.
Task 1 - Avoiding obstacles
The first challenge asks pupils to introduce a subroutine to help them choose another direction if they can't move in the direction chosen. You may need to recap on subroutines.
Here is a solution:
Choose another random direction
Extension task - favour a particular direction
This solution favours moving South or West by increasing the number of random numbers generated and allocating more of them to a South or West move. Your pupils might do this in a different way.
Task 2 - Pick up an artefact
Part of the story behind Kurono is that pupils travel through time to collect artefacts for a museum. This task allows pupils to start interacting with artefacts on the map. In later worksheets, pupils will find that there are different types of artefact but, for now, they're all the same.
Pupils can only pick up an artefact if their avatar is on the same cell on the map. They can use the location information to check if there is an artefact there. They might be able to see one, but the program needs to use a selection (if) statement to work it out!
Example Solution
They can then pick up any artefact they find by setting their turn action to a PickupAction
instead of a MoveAction
or WaitAction
.
You might need to remind pupils that a subroutine can only return one thing and should only ever have one return point. In terms of Kurono, what they return is their move and they can only make one move.
Pupils should output a message if they pick up an artefact.
Summary
These tasks have allowed pupils to further explore the use of selection and subroutines, as well as interacting with the Kurono API.
In the next worksheet, pupils will be able to scan areas of the map to look for artefacts and start to discover different types of artefact.
Last updated