MCQ Mojo
access_time
menu
Quiz
Web Stories
CBSE
arrow_drop_down
MCQ Questions for CBSE Class 12 with Answers
MCQ Questions for CBSE Class 11 with Answers
MCQ Questions for CBSE Class 10 with Answers
MCQ Questions for CBSE Class 9 with Answers
MCQ Questions for CBSE Class 8 with Answers
MCQ Questions for CBSE Class 7 with Answers
MCQ Questions for CBSE Class 6 with Answers
MCQ Questions for CBSE Class 5 with Answers
MCQ Questions for CBSE Class 4 with Answers
MCQ Questions for CBSE Class 3 with Answers
MCQ Questions for CBSE Class 2 with Answers
MCQ Questions for CBSE Class 1 with Answers
CBSE
arrow_drop_down
MCQ Questions for CBSE Class 12 with Answers
MCQ Questions for CBSE Class 11 with Answers
MCQ Questions for CBSE Class 10 with Answers
MCQ Questions for CBSE Class 9 with Answers
MCQ Questions for CBSE Class 8 with Answers
MCQ Questions for CBSE Class 7 with Answers
MCQ Questions for CBSE Class 6 with Answers
MCQ Questions for CBSE Class 5 with Answers
MCQ Questions for CBSE Class 4 with Answers
MCQ Questions for CBSE Class 3 with Answers
MCQ Questions for CBSE Class 2 with Answers
MCQ Questions for CBSE Class 1 with Answers
Quiz
Quiz
/
P5.js Class 8 MCQ Questions With Answers
1.
RGB, colors range from ___ to ___.
0 - 100
0 - 255
0 - 250
50 - 550
2.
Which code sets the canvas' color to "pink" in p5.js?
background-color('pink');
bg('pink');
background('pink');
bg-color('pink');
3.
What is a correct code to create a rectangle in p5.js?
rect();
rectangle(20,20,40,50);
rect(40,120,120,40);
rect(40,120);
4.
__________________ are the values inside of the parentheses following the name of the function. These values will be different based on the information that the function needs.
Variables
Function
Arrays
Parameters
5.
When using 'RGB' to fill the color of a shape, the 4th parameter 'a' controls the __________ of the color.
stroke
weight
transparency
size
6.
What function do we use to create circle?
ellipse()
line()
arc()
circle()
7.
How many parameters are there in the code for drawing a line in p5.js?
4
2
3
5
8.
What function do we use to add color to a shape in p5.js?
color();
fill();
paint();
noFill();
9.
MouseX and mouseY are variables that represent...
The location of the mouse on the X and Y axis.
The location of your drawing on the x and y axis.
The size of the canvas.
NONE
10.
Which are correct ways to add color to a shape in p5.js?
fill(‘yellow’);
fill(255,255,0);
fill(‘#ebe12d’);
All Of above
11.
Which of the following is an example of a built in variable in P5.js?
background
width
varX
mouse
12.
______________ are lines of code that perform specific tasks.
Parameters
Variables
Functions
fdsgfds
13.
What are the parameters in the 'createCanvas' function?
No parameters
x and y coordinates
color of the canvas
width and height
14.
The area where all drawn graphics are displayed is known as the...
console
drawing area
canvas
pallete
15.
You can use the 'random' function to randomly select the values for any function that uses numeric parameters.
True
False
16.
What is the y coordinate of the following ellipse?ellipse(70, 120, 150, 180);
70
120
150
180
17.
Which function in p5 is executed only once?
draw()
rect()
setup()
createCapture()
18.
What, 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 runs once and function draw is a loop.
Function setup and function draw are both loops but they allow the programmer to do different things.
19.
What is p5.js ?
It is a header file
It is programming language
It is a Javascript library
It is an online compiler
Report Question
Previous
Next
warning
Submit
access_time
Time
Report Question
A bunch of text
Support mcqmojo.com by disabling your adblocker.
×
Please disable the adBlock and continue.
Thank you.
Reload page