MCQGeeks
0 : 0 : 1
CBSE
JEE
NTSE
NEET
English
UK Quiz
Quiz
Driving Test
Practice
Games
Quiz
Computer Science
P5.Js
Quiz 1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Q.1
You can use the 'random' function to randomly select the values for any function that uses numeric parameters.
True
False
Q.2
Which of the following is the correct syntax for drawing a rectangle?
Rect(x,y,width,height);
rect(x,y,width,height);
rect(width, height, x, y)
rect(x1, x2, y1, y2, width, height);
Q.3
Which of the following is the correct syntax for drawing a triangle?
triangle(x1,y1,x2,y2,x3,y3);
triangle(x1,x2,x3,y1,y2,y3);
tri(x1,y1,x2,y2,x3,y3);
tri(x1,y1,x2,y2,x3,y3, width, height);
Q.4
______________ are lines of code that perform specific tasks.
Parameters
Variables
Functions
fdsgfds
Q.5
At what points (radians) will the following arc start and end? arc(PI, 2*PI);
Start - 90, End 360
Start - 0, End 270
Start - 180, End 360
Start - 180, End 270
Q.6
Which of the following has the correct function, parameters and syntax for drawing a rectangle?
Rect(x,y,width,height);
rect(x,y,width,height);
rect(width, height, x, y)
rect(x1, x2, y1, y2, width, height);
Q.7
What are some shapes we can create (with a single function) in p5.js?
Rectangle
Circle
Triangle
All Of above
Q.8
What is the height of the following oval (aka ellipse)?ellipse(180);
70
120
150
180
Q.9
What is the y coordinate of the following rectangle?rect(180);
70
120
150
180
Q.10
When using 'RGB' to fill the color of a shape, the 4th parameter controls the __________ of the color.
stroke
weight
transparency
size
Q.11
Initializing a custom variable means that you are...
setting the variable equal to some value
naming the variable
telling P5 that the variable exists
all of the above
Q.12
The 3 steps involved in creating a custom variable are...
name, declare, initialize
declare, initialize, use
initialize, declare, use
name, use, declare
Q.13
HSB stands for ...
Height, Saturation, Boldness
Hue, Saturation, Brightness
Height, Sanitation, Brightness
Hue, Statistics, Boldness
Q.14
What is the y coordinate of the following circle?ellipse(180);
70
120
150
180
Q.15
What is the height of the following circle?ellipse(180);
70
120
150
180
Q.16
'Background, arc, and ellipse' are all examples of ______________ in p5.js.
functions
custom variables
shapes
parameters
Q.17
What, if anything, is the difference between function setup () and function draw()?
Function setup is a loop and function draw only runs once.
There are no differences.
Function setup and function draw are both loops but they allow the programmer to do different things.
Function setup runs once and function draw is a loop.
Q.18
What are the parameters in the 'createCanvas' function?
No parameters
x and y coordinates
color of the canvas
width and height
Q.19
When using 'RGB' to fill the color of a shape, the 4th parameter 'a' controls the __________ of the color.
stroke
weight
transparency
size
Q.20
You can use the 'random' function to randomly select the values for any function that uses numeric parameters.
True
False
0 h : 0 m : 1 s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Report Question
×
What's an issue?
Question is wrong
Answer is wrong
Other Reason
Want to elaborate a bit more? (optional)
Support mcqgeeks.com by disabling your adblocker.
×
Please disable the adBlock and continue.
Thank you.
Reload page