wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Javascript Assessment

Total questions: 15

Worksheet time: 3hrs 30mins

Name
Class
Date
1.

What is a bug in a program?

a)

a computer virus

b)

a mistake or problem in the code

c)

a creepy, crawly insect that makes Mrs. Altman scream.

d)

a hacker

2.

Look at the image. What is the line of code for the rectangle?

a)

rect (400, 400);

b)

ellipse (200, 400);

c)

rect (0, 0);

d)

ellipse (0, 0);

3.

What is it called when we go in and fix a problem in our program?

a)

bugging

b)

debugging

c)

hacking

d)

shutting down

4.

Look at the image. What line of code made the entire screen appear blue?

a)

background ("blue");

b)

fill ("blue");

c)

rect ("blue");

d)

color ("blue");

5.

What line of code creates a yellow outline around the circle?

a)

fill("yellow");

b)

noStroke("yellow");

c)

background ("yellow");

d)

stroke("yellow");

6.

Find the bug! Why is the rectangle not red?

a)

The parameters in line 1 are incorrect.

b)

The fill code should come first.

c)

There is no background code.

d)

There is no stroke code.

7.

What are parameters in code?

a)

the outside measurement of a room

b)

the name of a shape

c)

the specific details in a line of code

d)

the line numbers in a program

8.

Why do programmers use the //Comment line of code?

a)

to tell the computer what to say

b)

to keep their program organized

c)

to tell the user to input information

d)

to add text to their program

9.

DEBUG! Why is the cloud not showing up?

a)

They are the wrong color.

b)

What cloud?

c)

The cloud is off of the grid.

d)

The background code is covering it up because it in the wrong order.

10.

Look at the line of code. What does the number 173 represent?

a)

the x coordinate of the circle

b)

the width of the circle

c)

the y coordinate of the circle

d)

the height of the circle

11.

What do we call a piece of code that STORES information to be used later on in the program?

a)

variable

b)

random number

c)

ellipse

d)

storage

12.

What does the randomNumber code do to our program?

a)

switches our program order

b)

adds variables

c)

makes it react differently each time

d)

writes the code for us

13.

What is missing from the line of code?


rect (100, 234, 24, 65)

a)

a period

b)

the semi-colon ;

c)

nothing, it looks great!

d)

the rest of the word rectangle

14.

What does the = sign mean in the line of code?


var playerScore = 0;

a)

is equal to

b)

is not equal to

c)

gets the value or gets

15.

What is NOT a rule when creating a variable label?

a)

It cannot start with a number.

b)

It cannot have spaces.

c)

It has to be called out exactly as it was named.

d)

It must contain the letter e.