Module 4 - The “Cat Sets a Trap for the Mouse” Project: Różnice pomiędzy wersjami

Z Wiki Mistrzowie Kodowania
Skocz do: nawigacji, wyszukiwania
(Utworzono nową stronę "center These materials have been developed by Ośrodek Edukacji Informatycznej i Zastosowań Komputerów (Centre for Information Technology...")
 
Linia 49: Linia 49:
  
 
''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).''
 
''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).''
 +
 +
 +
[[Plik:B1.png|center]]
 +
 +
'''Task:''' We ask the students to add another sprite to the stage design. Each student should draw his/her costume resembling cheese and change the name to Cheese.
 +
 +
''If necessary we individually remind the students how we can draw a new sprite costume.''
 +
 +
'''We ask the following question:''' What can the Mouse trap look like, assuming that the Kitten will have a chance to catch the Mouse lurking near the trap, and the Mouse will have a chance to outsmart the Kitten?
 +
 +
''Most likely there will be a lot of ideas. We suggest that the trap should have two entrances. The Kitten will lurk only at one of them. If the Mouse chooses the other one, it will outsmart the Kitten – this way both characters will have a chance to win the game. Next, we consider what should be used to build the trap. We can suggest that the Kitten may set it, i.e. draw it. The Mouse will not be able to go through the walls drawn (built) by the Kitten. 
 +
Then, together with the students we think about what the trap should look like. If necessary, we propose that it should be a square without one wall, placed with the missing wall close to the left edge of the stage. As a result, there will be two entrances at which we can place the Kitten. Students should already be able to draw the square. The cheese should be placed in the centre of the square. The trap may resemble the one shown below.'' 
 +
 +
 +
[[Plik:B12.png|center]]
 +
 +
'''Task:''' We ask the students to create and test a script for the Kitten which will draw the trap after it is started. We remind them that we have already drawn a square in class. 
 +
 +
'''Discussion:''' After the students have created the script we look through the solutions and discuss how to improve them.
 +
 
 +
''We should pay attention to the following elements: 
 +
* ''the Kitten’s setting at the starting position (the cheese should always be in the centre),'' 
 +
* ''clearing the screen before drawing the trap,''
 +
* ''setting the colour of the trap walls,''
 +
* ''pointing the Kitten toward the right side of the stage to draw the trap walls,''
 +
* ''thickening of the trap lines,'' 
 +
* ''setting the Kitten toward the right side of the stage, so that it lurks waiting for the Mouse to come.''
 +
 +
''From the students’ designs we select one in which the majority of these elements have been implemented and show it as a model. 
 +
When selecting the design to be shown we should also pay attention to how the square has been drawn – whether the block repeat <3> times has been used and whether when the drawing was finished the pen was raised, as any other solution may cause problems later.''
 +
 +
'''Task:''' We ask the students to complete the Kitten script in accordance with the above guidelines. 
 +
 +
''The guidelines should be written down or drawn on the board. After completion we check students’ solutions and, if necessary, help them individually. Should students have problems, we may jointly discuss which blocks can be useful for the task.''

Wersja z 22:19, 6 lip 2015

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).


B1.png

Task: We ask the students to add another sprite to the stage design. Each student should draw his/her costume resembling cheese and change the name to Cheese.

If necessary we individually remind the students how we can draw a new sprite costume.

We ask the following question: What can the Mouse trap look like, assuming that the Kitten will have a chance to catch the Mouse lurking near the trap, and the Mouse will have a chance to outsmart the Kitten?

Most likely there will be a lot of ideas. We suggest that the trap should have two entrances. The Kitten will lurk only at one of them. If the Mouse chooses the other one, it will outsmart the Kitten – this way both characters will have a chance to win the game. Next, we consider what should be used to build the trap. We can suggest that the Kitten may set it, i.e. draw it. The Mouse will not be able to go through the walls drawn (built) by the Kitten. Then, together with the students we think about what the trap should look like. If necessary, we propose that it should be a square without one wall, placed with the missing wall close to the left edge of the stage. As a result, there will be two entrances at which we can place the Kitten. Students should already be able to draw the square. The cheese should be placed in the centre of the square. The trap may resemble the one shown below.


Task: We ask the students to create and test a script for the Kitten which will draw the trap after it is started. We remind them that we have already drawn a square in class.

Discussion: After the students have created the script we look through the solutions and discuss how to improve them.

We should pay attention to the following elements:

  • the Kitten’s setting at the starting position (the cheese should always be in the centre),
  • clearing the screen before drawing the trap,
  • setting the colour of the trap walls,
  • pointing the Kitten toward the right side of the stage to draw the trap walls,
  • thickening of the trap lines,
  • setting the Kitten toward the right side of the stage, so that it lurks waiting for the Mouse to come.

From the students’ designs we select one in which the majority of these elements have been implemented and show it as a model. When selecting the design to be shown we should also pay attention to how the square has been drawn – whether the block repeat <3> times has been used and whether when the drawing was finished the pen was raised, as any other solution may cause problems later.

Task: We ask the students to complete the Kitten script in accordance with the above guidelines.

The guidelines should be written down or drawn on the board. After completion we check students’ solutions and, if necessary, help them individually. Should students have problems, we may jointly discuss which blocks can be useful for the task.