MCQGeeks
0 : 0 : 1
CBSE
JEE
NTSE
NEET
English
UK Quiz
Quiz
Driving Test
Practice
Games
Quiz
Computer Science
P5.Js
Quiz 2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Q.1
What is the y coordinate of the following ellipse?ellipse(180);
70
120
150
180
Q.2
______________ are lines of code that perform specific tasks.
Variables
Functions
Loops
Conditionals
Q.3
__________________ 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
Q.4
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.
Q.5
How many parameters are there in the code for drawing a line in p5.js?
4
2
3
5
Q.6
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
Q.7
RGB, colors range from ___ to ___.
0 - 100
0 - 255
0 - 250
50 - 550
Q.8
The area where all drawn graphics are displayed is known as the...
console
drawing area
canvas
pallete
Q.9
Which of the following is an example of a built in variable in P5.js?
background
width
varX
mouse
Q.10
What function do we use to add color to a shape in p5.js?
color();
fill();
paint();
noFill();
Q.11
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);
Q.12
What function do we use to create circle?
ellipse()
line()
arc()
circle()
Q.13
Which function in p5 is executed only once?
draw()
rect()
setup()
createCapture()
Q.14
What is p5.js ?
It is a header file
It is programming language
It is a Javascript library
It is an online compiler
Q.15
What function do we use to change the outline color of a shape?
stroke()
strokeWeight()
fill()
text()
Q.16
What x and y coordinates would you use to center a circle on a canvas that isbypixels?
(100, 100)
(200, 200)
(300, 300)
(400, 400)
Q.17
Which of the following would create a blue fill?
fill(255, 255, 255);
fill(255, 0, 0);
fill(0, 255, 0);
fill(0, 0, 255);
Q.18
What function do we use to change the color of the *background*?
stroke()
fill()
background()
rect()
Q.19
What function do we use to change the color of a shape or text?
strokeWeight()
ellipse()
text()
fill()
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
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