Variables and ifs in p5.js

Variables and ifs in p5.js

8th Grade

10 Qs

quiz-placeholder

Similar activities

Evaluación Diagnostica de Salida 2do Año

Evaluación Diagnostica de Salida 2do Año

8th Grade

10 Qs

JS Variables, Objects, Data Types

JS Variables, Objects, Data Types

3rd - 8th Grade

5 Qs

JavaScript Operators

JavaScript Operators

3rd - 8th Grade

5 Qs

JavaScript

JavaScript

2nd Grade - Professional Development

12 Qs

Quiz sobre Funções em p5.js

Quiz sobre Funções em p5.js

1st Grade - University

10 Qs

Exploring p5.js Drawing Properties

Exploring p5.js Drawing Properties

8th Grade

10 Qs

AV3/1TRI ROBÓTICA 8 ANO primeira parte

AV3/1TRI ROBÓTICA 8 ANO primeira parte

8th Grade

15 Qs

Recuperação 8 e 9 programação

Recuperação 8 e 9 programação

8th Grade

10 Qs

Variables and ifs in p5.js

Variables and ifs in p5.js

Assessment

Quiz

Computers

8th Grade

Medium

Created by

Chris Mera

Used 5+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 20 pts

What is the correct way to declare a variable to store the number of circles drawn on the canvas in p5.js?

`number circles = 0;`

`var numberOfCircles;`

`int numberOfCircles = 0;`

`let numberOfCircles = 0;`

2.

MULTIPLE CHOICE QUESTION

45 sec • 20 pts

Where should I declare my variables?

In the setup()

Before the setup()

In the loop()

Wherever I want

3.

MULTIPLE CHOICE QUESTION

45 sec • 20 pts

What will be the value of `x` after the following code is executed?

let x = 5; x = x + 10;

5

10

15

20

4.

MULTIPLE SELECT QUESTION

45 sec • 20 pts

Which of the following variable declarations is NOT valid in p5.js?

`let_score;`

`let=2ndPlace;`

`let-$amount;`

`let playerHeight;`

5.

MULTIPLE CHOICE QUESTION

45 sec • 20 pts

What is the value of the variable declared as `let score;` in p5.js?

13

yes

undefined

0

6.

MULTIPLE CHOICE QUESTION

45 sec • 20 pts

Which of the following is the correct way to declare a variable for storing the user's name in p5.js?

`string userName;`

`var userName;`

`let userName = '';`

`userName = " ";`

7.

MULTIPLE CHOICE QUESTION

45 sec • 20 pts

What variable am I missing to describe this object?

let sqX = 20;

let sqW = 20;

let sqH = 20;

let sqColor = "black"

createCanvas

sqY

mouseY

mouseX

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?