About this Quiz
This P5.js Class 8 MCQ test contains random 30 Objective Questions. You have select one correct answer among given options.
P5.js Class 8 MCQ With Answers
1. What are the parameters in the 'createCanvas' function?
- No parameters
- x and y coordinates
- color of the canvas
- width and height
2. Which function in p5 is executed only once?
3. Which are correct ways to add color to a shape in p5.js?
- All Of above
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.
5. ______________ are lines of code that perform specific tasks.
6. You can use the 'random' function to randomly select the values for any function that uses numeric parameters.
7. 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.
8. RGB, colors range from ___ to ___.
- 0 - 100
- 0 - 255
- 0 - 250
- 50 - 550
9. 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.
10. How many parameters are there in the code for drawing a line in p5.js?
11. What is a correct code to create a rectangle in p5.js?
12. Which of the following is an example of a built in variable in P5.js?
13. Which code sets the canvas' color to "pink" in p5.js?
14. What is p5.js ?
- It is a header file
- It is programming language
- It is an online compiler
15. When using 'RGB' to fill the color of a shape, the 4th parameter 'a' controls the __________ of the color.
16. What is the y coordinate of the following ellipse?ellipse(70, 120, 150, 180);
17. What function do we use to create circle?
18. What function do we use to add color to a shape in p5.js?
19. The area where all drawn graphics are displayed is known as the...
- drawing area
Enjoyed the Quiz. Share this with friends