Creating action sequences and patterns based on defined actions.

Objectives

Combining input parameters, action sequences and evaluating conditions to make Turtle move

Calling a function (Action)

Passing values (for parameters) to function

Familiarization of ways of defining parameters - movement, co-ordinates and colour

Visualize steps, space, co-ordinates and shapes through movement and vice versa

Steps

1.Define an action as a sequence of commands
2.Addition and division commands defined as actions
3.Note that the values are stored in variables “box 1” and is transferred between actions. The variables can also pass value from main code to the action sequence
4.Tracing a circle of a given angle and a given radius
Note that there are two print commands; only the latest one is captured in this screeshot.

Hands-on activity

1.Ask the turtle to execute a pre-defined procedure
2.See the control flow from main function to additional function
3.Determine/ identify the shape the turtle will trace; pay attention to the orientation of the turtle
4.Count the number of times instructions are repeated
5.What is the relation, if any, between the number of times the instruction is repeated and the shape traced by the turtle Activity #1 Activity #2
See the picture here:

Portfolio components

Two Turtle constructions are given here for the students to decode the instructions
Figure 1
Figure 2