Search Header Logo

Exploring p5.js Drawing Properties

Authored by Basma AlGhanim

Computers

8th Grade

Exploring p5.js Drawing Properties
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What function is used to set the background color in p5.js?

fillBackground()

setBackground()

background()

colorBackground()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a rectangle in p5.js?

Call the rectangle(x, y) method to draw a rectangle.

Create a rectangle using the shape() function.

Use the rect(x, y, width, height) function in p5.js to create a rectangle.

Use the drawRect(x, y, width, height) function.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What property controls the stroke color of shapes in p5.js?

noStroke()

background()

stroke()

fill()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to draw an ellipse in p5.js?

drawEllipse()

shape()

circle()

ellipse()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the 'fill()' function in p5.js?

To set the fill color for shapes in p5.js.

To change the stroke color for shapes in p5.js.

To create a new shape in p5.js.

To clear the canvas in p5.js.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you change the size of the canvas in p5.js?

Use the 'resizeCanvas(width, height)' function.

Adjust the canvas size using CSS styles.

Use the 'setCanvasSize(width, height)' function.

Change the canvas size in the HTML file directly.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the 'noStroke()' function do in p5.js?

The 'noStroke()' function changes the color of the stroke in p5.js.

The 'noStroke()' function only affects text rendering in p5.js.

The 'noStroke()' function disables the stroke for shapes in p5.js.

The 'noStroke()' function adds a border to shapes in p5.js.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?