wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

p5.js activity

Total questions: 7

Worksheet time: 14mins

Name
Class
Date
1.

What are some shapes we can create with p5.js?

a)

Rectangle

b)

Circle

c)

Dog

d)

Triangle

2.

What is a correct code to create a rectangle in p5.js?

a)

rectangle(40,120);

b)

rect(40,120,120,40);

c)

rectangle(40,120,120,40);

d)

rect();

3.

How do I create a rectangle located 50px to the right and 80px down on the canvas?

a)

rect(40,100,80,50);

b)

rect(100,40,50,80);

c)

rect(80,50,100,40);

d)

rect(50,80,100,40);

4.

What function do we use to add color to a shape in p5.js?

a)

fill();

b)

color();

c)

colorize();

d)

paint();

5.

Which are correct ways to add color to a shape in p5.js?

a)

fill(‘yellow’);

b)

fill(amarillo);

c)

fill(255,255,0);

d)

fill(‘#ebe12d’);

6.

Which code makes an ellipse measuring 140px width and 100px height?

a)

ellipse(175, 130, 100, 140);

b)

circle(175, 130, 140, 100);

c)

ellip(175, 130, 140, 100);

d)

ellipse(175, 130, 140, 100);

7.

Which code sets the canvas' color to "pink" in p5.js?

a)

background-color('pink');

b)

background('pink');

c)

bg('pink');

d)

bg-color('pink');