Computer Control in KS2         Lego MindStorms RoverBot

 

 

[Return]

 

Short focussed - Tasks 4

Repeat Command

Discuss with the children their previous experiences with the repeat sequence when using the Valiant Roamer.

To introduce the Repeat command demonstrate how to draw a square. 

 

Method 1

Open Command line from the Turtle menu. The Logo command dialogue window opens on screen.

Enter the following:

Repeat 4 [fd 40 rt 90]

Press the Enter key

The above code will also work in the Valiant Roamer.

 

Method 2

  1. Choose Procedures... from the Turtle menu.

  2. Click the New button on the Procedures window.

  3. Input a suitable name [SQUARE] on the Create procedure window

    An input window for the procedure opens

  4. Input the procedure and click the Run button.

 

Example program

SQUARE

Pendown

Repeat 4

Forward 50

Right 90

 

Using a prepared worksheet 

ask the pupils to predict 

the shapes generated sequences, such as:

Pendown

Repeat 6

Forward 15

Right 60

 

Pendown

Repeat 10

Forward 20

Right 36

For more examples click this link

For further information on this task visit...

http://www.standards.dfes.gov.uk/schemes2/it/itx4e/04eq4?view=get

 

__ __ __ __ __  __ __ ___ __ __ ___ ___ __ __