ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Adquision Satage 3


Enviado por   •  31 de Marzo de 2015  •  425 Palabras (2 Páginas)  •  230 Visitas

Página 1 de 2

There are a variety of commands used in Karel the Robot Programming Language; in this section we will describe only those to develop the learning activities:

Command move ()

The command or statement move () is used to make advance the Robot Karel one street or avenue in the direction in which Karel is oriented .

Example of the use of the basic command “move ()”:

Description: The task of Karel is to advance five blocks. Karel starts in the Southwest limit of the city, in the North direction.

Command turnleft ()

With the statement turnleft () we make that the Robot turns 90 degrees to its left (in the contrary sense of the counter clockwise). In other that Karel turns to its right, we write three times the command or statement turnleft ().

Example of the use of the basic command” turnleft ()”:

Description: The task of Karel is to advance three bocks, then turn 180 degrees and return to the place where it started. Karel starts in the Southwest limit of the city, in the East direction.

Command putbeeper ()

The statement putbeeper () is used to order to Karel that leave a beeper in the corner where it is standing, but we have to assure that Karel has one beeper in its bag otherwise it will mark error,If the Karel leaves two beepers, we write twice the statement putbeeper ().

Example of the use of the basic command “putbeeper ()”:

Description: The task of Karel is to advice five blocks, on each block it must leave two beepers from the 10 it has in its bag. Karel starts in the Southwest limit of the city, in the North direction and with 10 beepers in its bag.

Command pickbeeper ()

The statement pickbeeper () is used to order to Karel that pick up a beeper from the corner where it is standing, but we have to assure that Karel is in the corner where there is, at least, one beeper, otherwise it will mark error. Each beeper that Karel pick up, it will store in its bag.

Example of the use of the basic command “pickbeeper ()”:

Description: The task of Karel is to advance five blocks, on each corner there are two beepers it has to pick up. Karel starts in the Southwest limit of the city, in the North direction.

Command turnoff ()

The statement turnoff () is used to order to Karel that stops performing any task that it has been assigned on the previous statements, it is the end of the execution of the program.

Example of the use of the basic command” turnoff ()”:

...

Descargar como (para miembros actualizados) txt (2 Kb)
Leer 1 página más »
Disponible sólo en Clubensayos.com