wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

JavaScript Test 1: Shapes and Printing

Total questions: 10

Worksheet time: 8mins

Name
Class
Date
1.

How do you create a ellipse or a circle?

a)

circle(w, h);

b)

ellipse(x, y, w, h);

c)

ellipse(w, h, x, y);

d)

circle(w, h, x, y);

2.

Make a Square. rect(100, 100, 200, ?);

(Please write number in number form.)

(a)  

3.

Which ones can make shapes.

a)

triangle(x1, y1, x2, y2, x3, y3);

b)

rectangle(x, y, w, h,);

c)

oval(x, y, w, h);

d)

ellipse(x, y, w, h);

4.

Which line of code could be used to make this image.

a)

rectangle(20, 20, 150, 100);

b)

rect(20, 20, 20, 20)

c)

rect(20, 20, 150, 100);

d)

ellipse(20, 20, 150, 100);

5.

Which one could print a string called "35."

a)

print(3+5);

b)

print("3+5");

c)

print("3"+"5");

d)

print("35");

6.

Print out the number or string called 255.

(a)  

7.

Which one can make a text called "My name is cool."

a)

text(x, y, "My name is cool.");

b)

message("My name is cool." x, y);

c)

text("My name is cool." x, y);

d)

message("My name is cool." x, y);

8.

Make the background black.

(a)  

9.

How many parameters are required to make a text or string.

a)

1

b)

4

c)

2

d)

3

10.

Print "Is this is String?"

(a)