Module 4 - The “Cat Sets a Trap for the Mouse” Project

Z Wiki Mistrzowie Kodowania
Wersja A Kubiak (dyskusja | edycje) z dnia 22:58, 6 lip 2015

(różn.) ← poprzednia wersja | przejdź do aktualnej wersji (różn.) | następna wersja → (różn.)
Skocz do: nawigacji, wyszukiwania
Logo Mistrzowie.png

These materials have been developed by Ośrodek Edukacji Informatycznej i Zastosowań Komputerów (Centre for Information Technology Education and Application of Computers) in Warsaw as part of the “Mistrzowie Kodowania” ("Coding Masters”) Programme funded by Samsung Electronics Polska, licensed under CC-BY-SA “Attribution – Share Alike 3.0 Poland”


Information

Objectives

General objectives:

  • Review and revision of previously presented Scratch commands and language structures;
  • Introduction of the concept of variable;
  • Introduction of randomness;
  • Implementation of a games in accordance with a scenario developed under the teacher’s guidance.


Specific objectives:

  • The student will understand and know how to use appropriate iteration instructions (repeat and always).
  • The student will understand and know how to use appropriate conditional instructions (if and if ... otherwise).
  • The student will be able to use randomness in the programme.
  • The student will understand the concept of variable and will know how to use it in the programme.


Stages

Discussion of the solution of Module III additional task

Time to complete this part: about 15 minutes


At the beginning of the lesson we remind students what they were supposed to prepare between classes. We invite a volunteer to present his/her solution. We ask if anyone came up with a different solution. We discuss the solutions (we praise each correct solution).

If there was no homework, we start by repeating key issues from the previous module. We also ask if the students have any doubts about their own projects. We invite students to show anything they are proud of if they want to.


Designing and writing a programme which automatically controls sprites – the Cat lurking and waiting for the Mouse

Time to complete this part: about 45 minutes

We remind students of the game project where the Kitten tried to catch the Mouse which was controlled by the player using a computer mouse (Module II). Then we explain what the next project will involve. This time we will want both the Kitten and the Mouse to be controlled by the computer. The Kitten will not chase the Mouse, but it will set a trap for it and lurk in order to catch it. The Mouse’s task will be to outsmart the Kitten. Naturally, both must have a chance to win.

We should start designing the programme by sketching how it will work on the board and discussing ideas about how to implement it. First we draw the Kitten in the left part of the stage, and the Mouse in the right part.


Task: We ask the students to add both characters (sprites) to the project stage and name them Kitten and Mouse, respectively.

If necessary, we individually remind the students how to add a new sprite.

We ask the following question: What can a mouse trap involve? What should it contain in order to be attractive for the Mouse?

Ideas will probably vary. We should focus on those which students can already implement in Scratch. We start by discussing the bait. It can be e.g. a piece of cheese or some other mouse delicacy. We ask the students where we can get the cheese for the trap. We suggest that we can draw it ourselves. Next we ask what the cheese should be in our project. We hint that it should be another sprite. This will make it easier to introduce the interaction of the Mouse when it catches the cheese (wins) without getting caught by the Kitten. It will also be easier to direct the Mouse to the cheese – in the same way in which the Kitten moved towards the Mouse earlier (in the module II project).