wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Code.org Unit 3 Lessons 1-6

Total questions: 26

Worksheet time: 20mins

Name
Class
Date
1.

Finding and fixing problems in a program is called

a)

properties

b)

scaling

c)

debugging

d)

variable

2.

A placeholder for a piece of information that can change

a)

program

b)

variable

c)

bug

d)

command

3.

An extra piece of information used to customize it for a specific need

a)

variable

b)

parameter

c)

program

d)

property

4.

Which command draws a rectangle

a)

rect(x,y,w,h)

b)

rectangle(x,y,w,h)

c)

rec(x,y,w,h)

d)

square(x,y,w,h)

5.

Which of the following commands draw a circle?

a)

cir(x,y,w,h)

b)

circle(x,y,w,h)

c)

ellipse(x,y,w,h)

d)

ellip(x,y,w,h)

6.

Which variable is named correctly?

a)

1side

b)

1 side

c)

side1

7.

What is the x value in the following code? rect(250,200,75,225)

a)

250

b)

200

c)

75

d)

225

8.

What is width of the rectangle in the following code?

rect(75, 20, 50, 100)

a)

75

b)

20

c)

50

d)

100

9.

What color will the ellipses be according to the code in the picture?

a)

yellow

b)

orange

c)

blue

d)

purple

10.
Which command places a oval in the top right of the game lab
a)

ellipse(200,300);

b)

ellipse(200,200);

c)

ellipse(300,50);

d)

ellipse (50,100);

11.
What does the fill command do
a)
Fill a shape with  color
b)
Fill a shape with other shapes
c)
Adds a border to your shape
d)
none of the above
12.

Variable

a)

An extra piece of information that you pass to the function to customize it for a specific need.

b)

The common programming structure that implements "conditional statements".

c)

Attributes that describe an object's characteristics

d)

A placeholder for a piece of information that can change.

13.
What will the following code do to the picture?
ellipse(randomNumber(0,400), randomNumber(0,400));
a)
Change the place of the ellipse on both the x and y axis
b)
Change the size of the ellipse
c)
Put the ellipse at position (400,400)
d)
Change the place of the ellipse on the x axis
14.
What is the y position in the following code: 
rect (200, 150, 50, 350);
a)
1st position
b)
2nd position
c)
3rd position
d)
4th position
15.
What is the x position in the following code: 
rect (200, 150, 50, 350);
a)
1st position
b)
2nd position
c)
3rd position
d)
4th position
16.
Would this example code run correctly?
Line 1: var xPosition
Line 2: ellipse (Xposition, 200, 50, 150);
a)
Yes
b)
No 
c)
Maybe
17.
What is the command name of variable?
a)
Variable
b)
Size
c)
Var
d)
X
18.
What does an equal sign mean in a variable?
a)
Equal to
b)
Gets the value of
c)
Value
d)
Some number
19.
Are spaces allowed in Naming Variables?
a)
True
b)
False
c)
None of the above
20.

All of the following are correct ways to label a variable except

a)

size_of_eye_52

b)

sizeofeye52

c)

sizeOfEye52

d)

size of eye 52

21.

This code will draw a pink monster. Which of the pictures is drawn correctly?

a)
b)
c)
d)
22.

What is the center of my grid?

a)

(0, 0)

b)

(400, 400)

c)

(200, 200)

d)

(250, 250)

23.

What does randomNumber (0, 100); mean?

a)

It will allow the computer to choose a random number betwen 0 and 100

b)

it will print any random number

c)

it will place a random number at the coordinates of (0, 100)

d)

it will return an error message because random numbers don't exist in Javascript

24.

What is the final value of a?

a)

Undefined

b)

c

c)

5

d)

10

25.

What is the variable for this label?

a)

size

b)

name

c)

location

d)

value

26.

Which of these are an assignment operator in this lesson?

a)

=

b)

+

c)

-

d)

x