Essays.club - Ensayos gratis, notas de cursos, notas de libros, tareas, monografías y trabajos de investigación
Buscar

Organization and Level Heading Activity

Enviado por   •  25 de Diciembre de 2017  •  1.307 Palabras (6 Páginas)  •  425 Visitas

Página 1 de 6

...

It is included the instruction move, which indicates Karel to advance one square in the direction that is that moment. In order that it executes the command, it is necessary first to ¨compile¨ the program, this is to detect syntax errors and then user can do the corrections and/or changes that he/she considers. Click on the button Compile.

10. To see Karel in action, click on the section Execute. There appears the screen in grey color and with none information. Click on the button initialize. Observe that the screen now is divided in 2 parts; the left section corresponds to the instructions of the program and the right section corresponds to the World of Karel. Click on the button Run. In the right section you will see that Karel moves one block to the right and in the left section each instruction will be illuminated each instruction that Karel performs.

11. Then appears the message box turned-off, which indicates that Karel has finished its task. Click on the button Ok. To make Karel moves again, click on the button Run.

12. Type now the other instructions, in such a way that Karel arrives to the 10 Avenue. Since you have the instruction move in the program, and since there are 10 blocks that Karel has to cover, then you need 10 instructions move so Karel arrives to its destinity. Click on the section Program and add the 10 instructions move to your program.

13. The speed of Karel is a bit slow, this you can see in the textbox steps/min, which is by default on 60. To modify the velocity, change it, for example to 400, initialize again an run the program. See that Karel moves faster.

14. You have to take into account that when you save, it is saved both the World and the program of Karel.

15. Now some obstacles in some blocks of its trajectory will be included, to make a little difficult its journey. Select the section World. Locate the mouse pointer between 3 and 4 avenues, in the street 0 and click once.

16. Also include a Wall between the 7 and 8 avenue. Observe the form in which the World of Karel remains.

17. You have to know that Karel does not cross walls, it has to avoid them with its journey. Observe in detail the World and mainly the trajectory that Karel must cover. Analyze the following:

• In the 3 avenue must stop and then turn to the North, move one block then turn to the East, move again one block, turn to the East and continue with its journey.

• Karel continues moving, then it will stop in the avenue 7, turn to the north, move one block, turn to the East and continue with its journey until arriving to the 10 avenue.

18. Well, now we have to translate all what we said instruction that Karel can understand. We will use the command turnleft. Write the following instructions:

19. Observe that after the third instruction move, it has been included the instruction turnleft. Compile, initialize and run the program. Surely you will see that it does not follow the correct path. This is because we need more instructions. Add the following instructions to your program:

20. Compile, initialize and run the program. Write the following instructions that appear next:

21. Compile, initialize and run the program. Now you will see that Karel moves around the first wall; nevertheless, continuing with its trajectory, if encounters with the second wall.

Now by yourself write the instructions in order that Karel turns around the second wall. At the end must arrive to the 10 Avenue and there will finish its journey and race.

22. Save the world

Conclusion

In this stage we are learning the commands to use Karel the Robot and in this activity we have put in practice our previous knowledge and we used so many different commands in different examples. This activity help us in our understanding of Karel the Robot and we hope we can use this knowledge for more activities in the book.

Sources

• Textbook Information and Communication Technology 2, DEMNS,

...

Descargar como  txt (7.4 Kb)   pdf (128.3 Kb)   docx (13.8 Kb)  
Leer 5 páginas más »
Disponible sólo en Essays.club