Variables and ifs in p5.js

Quiz
•
Computers
•
8th Grade
•
Medium
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
Similar Resources on Wayground
15 questions
KS3 Y8 Kodu Quiz

Quiz
•
5th - 8th Grade
10 questions
Publicando un Website con WIX

Quiz
•
7th - 8th Grade
12 questions
Scratch interface

Quiz
•
5th - 9th Grade
7 questions
JavaScript. Занятие 2

Quiz
•
8th Grade
8 questions
internet safety

Quiz
•
3rd - 12th Grade
6 questions
Webpage Maker: Introduction

Quiz
•
6th - 8th Grade
15 questions
Understanding Arrays

Quiz
•
8th Grade
9 questions
MEL quiz 1

Quiz
•
8th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
15 questions
Acceptable Use Policy (Quiz)

Quiz
•
6th - 8th Grade
25 questions
Career Vs. Job

Quiz
•
6th - 8th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
30 questions
Introduction to Computers

Quiz
•
8th - 9th Grade
20 questions
Copyright and Fair Use

Quiz
•
6th - 8th Grade
15 questions
Computer Components Video

Interactive video
•
8th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade