Logomation Lesson 13

To pass information to a function you can put a variable inside the parentheses in the function definition:

Function drawSquare(side)

Repeat 4

Forward side

Right 90

Then when the function is called you pass the value by putting it in the parentheses:

drawSquare(60)

The value 60 is put into the variable named side and the variable is used inside the function wherever the number is needed.

DRAWING CIRCLES AND ARCS

The circle command is used to draw lines on arcs (rather than straight).

In a new program, take a look at what this does:

circle 50

forward 50

After you enter a circle command, the 'pen' will only draw on an arc with the radius specified in the circle command. In order to get the pen to draw straight again, use straight.


On your own # 13

Balloons
Draw 3 different sized balloons using one function containing variable named radius. The string on the balloon must have at least 2 changes in the curve from between left and right.


teh nex 1

Go back to the Lesson List page