wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Video Game Design - Quiz4 -L5 -P

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Look at the code in the graphic. Are there any problems with the way Jorge named his variables?

a)

No, they are all correct.

b)

Yes, the first line there are spaces in the variable name.

c)

Yes, the second line there are spaces in the variable name.

d)

Yes, the third line there are spaces in the variable name.

2.

Lila created the following variables. She sits next to you. She leans over and asks you if she got her variables correctly named. What would you tell her?

a)

All her variables are named correctly.

b)

Line one has spaces in it, which is incorrect.

c)

Line two starts with a number, which is incorrect.

d)

Line three has a lowercase letter in the front, which is incorrect.

3.

If Jose executes the code in the graphic, what will happen?

a)

It will error out on line 6 because 1dimension is not defined as a variable.

b)

It will error out on line 5 because orangeRed is an incorrect color.

c)

It will error out on line 1 because there are spaces in the variable name.

d)

It will error out on line 2 because the first letter is lowercase.

4.

Carla is unsure of what the benefit of using a variable is. Look at the code in the graphic. How would you explain the benefit to Carla?

a)

The benefit is that you get to define it in your code.

b)

The benefit is that you define the variable once and then it can be used multiple times in your code.

c)

The benefit is that you get to modify the variable: petalSize.

d)

The benefit is that you get to write the variable multiple times in your code.

5.

Emilia isn't sure what the purpose of a variable is. How would you explain it to her?

a)

The purpose of a variable is use descriptive names.

b)

The purpose of a variable is to store letters and numbers that will be used later.

c)

The purpose of a variable is to only store numbers.

d)

The purpose of a variable is to only store letters.

6.

Maria is getting an error in her code. She asks you what the problem is. What would you tell her?

a)

I would tell her that she didn't provide a correct name for the variable: petalSize in line 1.

b)

I would tell her that the fill command is using an incorrect color.

c)

I would tell her that the ellipse command is incorrect because she is trying to create a rectangle.

d)

I would tell her that the petal Size variable has a space in line 9.

7.

Linda is trying to run her code. But she keeps getting an error. What would you tell her is the problem?

a)

She needs to use the variable name in the ellipse commands in lines 7 - 15.

b)

She needs to use the fill command with a correct color in line 6 and 11.

c)

The noFill command is used incorrectly.

d)

She needs to remove the number at the beginning of eyeSize in line 2.

8.

Juanita isn't sure if there's a problem with her code. Look at her code in the graphic. Then what would you tell her?

a)

The issue is that there's a capitatlized letter at the beginning of the variable name in line 2.

b)

The issue is that there's a lowercase letter in the variable name in lines 1 and 3.

c)

The issue is that there are only three variables defined.

d)

The issue is that line 1's variable should have a space between ear and size.

9.

Sofia wrote the code in the graphic. But she's not sure how to change the size of the eyes of the smiley face graphic. What is the best way to change the size?

a)

She would change the value of the variable in line 1.

b)

She would change the value of the variable in line 12 and 13.

c)

She would change the value of the fill command in lines 7, 11, and 16.

d)

She would change the value in lines 16 and 17.

10.

Santiago wrote the code in the graphic. How would he change the hexagon color in the graphic to blue?

a)

He would change line 2 to blue.

b)

He would change line 1 to blue.

c)

He would change line 3 to blue.

d)

He would change line 4 to blue.