wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Unit 3 AppLab

Total questions: 9

Worksheet time: 14mins

Name
Class
Date
1.

What is the name of this function?

a)

function

b)

drawSeagrass

c)

moveForward

d)

drawStarfish

2.

What are the names of the parameters of this function?

a)

c, d, e, f

b)

moveForward()

c)

r, g, b

d)

a, b, c

3.

What does the parameter 'c' control?

a)

penWidth

b)

how far to move

c)

blue color

d)

how far to turn

4.

What does the parameter 'e' control?

a)

green color

b)

how far to move

c)

red color

d)

how far to turn

5.

Which line correctly calls this function?

a)

drawStarFish(35, 22);

b)

drawStarfish();

c)

drawStarfish(35, 100, 25, 45);

d)

drawStarfish(c, d, e, f);

6.

To condense the code with a loop by putting one moveForward(c) and one turnRight(144) statement in the loop, which 'for' loop should be used?

a)

for(int i=1; i<=10; i++)

b)

for(int i=1; i<=3; i++)

c)

for(int i=1; i<=144; i++)

d)

for(int i=1; i<=5; i++)

7.

When calling the penRGB function like this: penRGB(x,y,z);

What are valid values for x, y, and z

a)

0-10

b)

0-100

c)

0-255

d)

0-500

8.

What are the coordinates of the red dot (upper left corner)?

a)

(320,450)

b)

(0,0)

c)

(160, 240)

d)

(1,1)

9.

What does the parameter 'c' control?

a)

penWidth

b)

how far to move

c)

color

d)

how far to turn