wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Javascript Drawing

Total questions: 15

Worksheet time: 7mins

Name
Class
Date
1.
ellipse(212, 206, 283, 318);
ellipse(212, 235, 100, 73);
ellipse(150, 150, 30, 30);
ellipse(278, 150, 30, 30);
The code above represents a snowman with two eyes and a nose. The code that represents the nose is:
a)
ellipse(150, 150, 30, 30);
b)
ellipse(212, 206, 283, 318);
c)
ellipse(212, 235, 100, 73);
d)
ellipse(212, 235, 100, 73);
2.
The command: ellipse( 200,100, 20, 20) will draw:
a)
an ellipse that is 100 pixels wide and 100 pixels high
b)
a circle whose center is 200 pixels across and 100 pixels down
c)
a rectangle that is 200 pixels by 100 pixels wide
d)
a circle that is 200 pixels in diameter
3.

What is the correct order of parameters in rect()?

a)

rect(x, y, width, height);

b)

rect(y, x, width, height);

c)

rect(x, y, height, width);

d)

rect(width, height, x, y);

4.

How do you turn off the outline around the shapes?

a)

noStroke();

b)

stroke("transparent");

c)

noFill();

d)

noOutline();

5.
When drawing in Javascript, the coordinates for the top left of the screen is:
a)
0,400
b)
0,0
c)
400,0
d)
400,400
6.
The command: ellipse( 200,100, 20, 20) will draw:
a)
an ellipse that is 100 pixels wide and 100 pixels high
b)
a circle whose center is 200 pixels across and 100 pixels down
c)
a rectangle that is 200 pixels by 100 pixels wide
d)
a circle that is 200 pixels in diameter
7.
ellipse(212, 206, 283, 318);
ellipse(212, 235, 100, 73);
ellipse(150, 150, 30, 30);
ellipse(278, 150, 30, 30);
The code above represents a snowman with two eyes and a nose. The code that represents the nose is:
a)
ellipse(150, 150, 30, 30);
b)
ellipse(212, 206, 283, 318);
c)
ellipse(212, 235, 100, 73);
d)
ellipse(212, 235, 100, 73);
8.
What does var stand for?
a)
Variant
b)
Variable
c)
Varies
9.
What is a variable?
a)
A variable is a placeholder for a value that can change
b)
A variable is a placeholder for a value that can not change
10.
What is a constant
a)
A constant is a placeholder for a value that can change
b)
A constant is a placeholder for a value that can not change
11.
Variable store values.
a)
True
b)
False
12.

This is a set of instruction providing detail to the code.

a)

Parameter

b)

Function

c)

Variable

13.

Color is defined by these three colors

a)

Red, purple, orange

b)

Red, Blue, Green

c)

Green, Blue, Orange

14.

This saves a value, which can be then assigned when writing code

a)

Parameter

b)

Function

c)

Variable

15.

To draw an oval with its centre at the origin, width 100, height 150, filled with RED colour, which one is correct?

a)

fill (255, 0, 0); ellipse(0, 0, 100, 150);

b)

fill (0, 0, 0); ellipse (0, 0, 150, 100);

c)

fill (255, 255, 255); ellipse (100, 150, 0, 0);

d)

ellipse (0, 0, 100, 150);