
Exploring P5 Programming

Quiz
•
Others
•
9th - 12th Grade
•
Hard
Elida Fachriyati
FREE Resource
11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is P5.js primarily used for?
Developing server-side scripts
Creating visual art and interactive graphics in web browsers.
Building mobile applications
Creating database management systems
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you create a canvas in P5.js?
Use 'drawCanvas(width, height);' in the 'setup' function.
Use 'createCanvas(width, height);' in the 'setup' function.
Invoke 'createScreen(width, height);' in the 'draw' function.
Call 'initializeCanvas(width, height);' before 'setup();'
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What function is used to draw shapes in P5.js?
createCircle()
rect(), ellipse(), line()
paintRectangle()
drawShape()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Explain the purpose of the setup() function in P5.js.
The setup() function handles user input events.
The setup() function is for saving the sketch as an image.
The setup() function initializes the sketch and prepares the environment.
The setup() function is used to draw shapes on the canvas.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between fill() and stroke() in P5.js?
fill() applies to images; stroke() applies to text.
fill() sets the interior color of shapes; stroke() sets the outline color of shapes.
fill() sets the outline color of shapes; stroke() sets the interior color of shapes.
fill() is used for text color; stroke() is used for background color.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you load an image in P5.js?
Use createImage() in setup() to load an image.
Call loadImage() directly in draw() to display an image.
Use loadImage() in setup() and draw() in preload() to load an image.
Use loadImage() in preload() and image() in draw() to load and display an image.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the role of the draw() function in P5.js?
The draw() function continuously executes the lines of code contained inside its block until the program is stopped.
The draw() function handles user input events in P5.js.
The draw() function is only called once at the beginning of the program.
The draw() function is used to define global variables in P5.js.
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
find v.2

Quiz
•
9th Grade
10 questions
Phrasal Verbs 10.12

Quiz
•
10th Grade
10 questions
Belajar bersama

Quiz
•
12th Grade
10 questions
Tipos de Software de Diseño

Quiz
•
12th Grade
6 questions
REFLEKSI KEGIATAN PROJEK P5 (KEARIFAN LOKAL)

Quiz
•
10th Grade
15 questions
Saftey in the Ag lab

Quiz
•
9th - 12th Grade
7 questions
Quis TIK Kls XII

Quiz
•
12th Grade
10 questions
Solved Exercise - Section A (Objective Type Questions)

Quiz
•
9th Grade
Popular Resources on Wayground
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
20 questions
ELA Advisory Review

Quiz
•
7th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns

Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Others
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Distribute and Combine Like Terms

Quiz
•
7th - 9th Grade
12 questions
Graphing Inequalities on a Number Line

Quiz
•
9th Grade
11 questions
NFL Football logos

Quiz
•
KG - Professional Dev...
20 questions
Cell Organelles

Quiz
•
9th Grade
20 questions
Cell Transport

Quiz
•
9th Grade