wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Code.org Unit 3 Lesson 1-6

Total questions: 45

Worksheet time: 24mins

Name
Class
Date
1.

Which cod produces this image?

a)
b)
2.

This code will produce the picture shown.

a)

TRUE

b)

FALSE

3.

Which square was drawn first?

a)

BLUE

b)

RED

4.

To draw a square in GameLab, which code is needed?

a)
b)
c)
5.

What is a STROKE in Gamelab?

a)

The FILL color inside the shape.

b)

Locations on the coordinate plane.

c)

The color of the shape's border or outline.

d)

The distance between positions of shapes.

6.

What coordinates would your

squares have to be placed at to

recreate this image?

a)

(0, 0) and (400, 400)

b)

(100, 20) and (400, 400)

c)

(0, 0) and (350, 350)

d)

(0, 400) and (400, 0)

7.

The position of an object on a grid is represented by __ and __ coordinates.

a)

x and y

b)

w and h

c)

x and w

d)

h and y

8.

What is an ALGORITHM?

a)

It is a computer

b)

A set of step by step instructions for problem solving.

c)

It's a math idea

9.

Part of a program that does not work correctly.

a)

error

b)

ellipse

c)

bug

d)

overlay

10.

Finding and fixing problems in an algorithm or program.

a)

sequencing

b)

debugging

c)

programing

d)

overlaying

11.

Which of the following is an example of an ellipse?

a)
b)
c)
d)
12.

Which of the following shapes would the rect command create?

a)
b)
c)
d)
13.

What location does the x and y of a rectangle represent?

a)
b)
c)
d)
14.

What location does the x and y of an ellipse represent?

a)
b)
c)
d)
15.

What is the default size of a rectangle as shown below?

a)

50 by 50

b)

100 by 100

c)

25 by 25

d)

200 by 200

16.

What is the default fill color?

a)

Transparent

b)

Gray

c)

Blue

d)

Black

e)

White

17.

To change the color inside a shape, you use what block?

a)
b)
c)
d)

None of these

18.

What is the location of the ellipse?

a)

(100,100)

b)

(100,300)

c)

(300,100)

d)

(300,300)

19.

To draw a circle, you use which of these?

a)
b)
c)
d)
20.

The distance between grid lines in Game Lab is _______ pixels.

a)

32

b)

50

c)

100

d)

128

21.

If the y-coordinate of a point is increasing, then it is moving _______.

a)

up

b)

down

c)

left

d)

right

22.

If the x-coordinate of a point is decreasing, then it is moving _______.

a)

up

b)

down

c)

left

d)

right

23.

The first parameter in the () after an ellipse or rectangle code is:

a)

height

b)

width

c)

x coordinate point

d)

y coordinate point

24.

The second parameter in the () after an ellipse or rectangle code is:

a)

height

b)

width

c)

x coordinate point

d)

y coordinate point

25.

The third parameter in the () after an ellipse or rectangle code is:

a)

height

b)

width

c)

x coordinate point

d)

y coordinate point

26.

The fourth parameter in the () after an ellipse or rectangle code is:

a)

height

b)

width

c)

x coordinate point

d)

y coordinate point

27.
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.
28.

Choose all of the blocks that create a new variable in Game Lab.

a)
b)
c)
d)
29.

Every block in Game Lab represents a piece of Javascript code.

a)

True

b)

False

30.

What is the final value of x when this program runs?

a)

3

b)

4

c)

0

d)

Nothing. An error will occur.

31.

What should be changed about this code?

a)

Nothing. It is the best way to write this code.

b)

The blocks should be reordered.

c)

The variable names don't match.

d)

You must always set a variable to equal a number.

32.

Which statement is most accurate about this code?

a)

The program will not run.

b)

The ellipse is very wide.

c)

The ellipse is at the right.

d)

The ellipse is at the left

e)

The ellipse is very tall.

33.

What is wrong with this code?

a)

x has been declared more than once using var.

b)

Values should not exceed 100.

c)

Nothing. It is perfectly fine as is.

34.

Which reason or reasons make your teacher dislike this code?

a)

The syntax is wrong which makes the program not work

b)

The program lacks whitespace and is very difficult to read

c)

The program lacks comments making the program hard to read and debug

d)

The program is not in blockly

35.

Which variable is named correctly?

a)

BlueFish

b)

Bluefish

c)

blueFish

d)

BLUEFISH

36.

What is x value in the following code?

rect(250, 200, 75, 225);

a)

250

b)

200

c)

75

d)

225

37.

What is width of the rectangle in the following code?

rect(250, 200, 75, 225);

a)

250

b)

200

c)

75

d)

225

38.

What is y value in the following code?

rect(250, 200, 75, 225);

a)

250

b)

200

c)

75

d)

225

39.

Which answer shows the code to draw this image?

a)
b)
c)
d)
40.

Which answer contains the code to draw this image?

a)
b)
c)
d)
41.

Brainstorming with team members to come up with a plan, think of any possible problems.

a)

Define

b)

Prepare

c)

Try

d)

Reflect

42.

Will this code work? Why or why not?

a)

Yes, it will work and make a circle on the center of your screen.

b)

Yes it will work. It has camelCase.

c)

No, it will not work. It has a number to start a name and spaces. It also is not case sensitive.

d)

No, it will not work. The variables called are not the same as the variables listed by ellipse, and the rules of naming variables were not followed.

43.

What are the rules you need to follow when naming variables?

a)

Labels cannot include spaces. Labels cannot begin with a number.

b)

Labels cannot include spaces. Labels cannot begin with a number. Be very careful with spelling. Labels are case sensitive.

c)

Labels are case-sensitive. Labels need to be spelled correctly.

d)

Labels should be in camel case. Labels should be spelled correctly. Labels cannot begin with a number.

44.
Debugging
a)
Finding and fixing problems in your algorithm or program.
b)
Statements that only run under certain conditions.
c)
Any valid unit of code that resolves to a value.
d)
Part of a program that does not work correctly.
45.
Bug
a)
Part of a program that does not work correctly.
b)
the rate at which frames in an animation are shown, typically measured in frames per second
c)
An algorithm that has been coded into something that can be run by a machine.
d)
A graphic character on the screen with properties that describe its location, movement, and look.