1-Mini Golf Game-Stage 1 Setting up the Canvas Quiz
 
Mini Golf Game: Stage 1: Setting up the Canvas Quiz(50 Points)
Check Your Understanding

1
What is a canvas on a web page?Single choice. (10 Points)
A photo of a panting from an art gallery
A programming language used to make graphics
A data storage container for storing images and multimedia files
A space where graphics can be displayed and interacted with by users.

2
Which of the following is the correct code to create a p5play canvas that is 400 pixels wide and 300 pixels tall?Single choice. (10 Points)
new Canvas(400, 300);
new Canvas(300, 400);
new.Canvas(400, 300);
Canvas.new(300, 400);

3
Single choice. (10 Points)

Location A
Location B
Location C
Location D

4
What does the following code do?  clear(); background('red');Single choice. (10 Points)
It clears a web page and sets the background to red.
It makes the border of the canvas clear and then sets its background to red.
It clears all graphics from the canvas and then sets its background to red.
It clears the values stored in the variables and then sets the canvas background to red.

5
Which statement best explains the purpose of the setup() and draw() functions when using p5play?Single choice. (10 Points)
They are both used to draw graphics only once at the beginning of the program.
The setup() function runs once at the start to prepare the program, while draw() runs continuously to update visuals.
The setup() function handles math calculations, and draw() controls keyboard input.
The draw() function only runs when a key is pressed, and setup() restarts the program loop.
Last updated  2025/10/12 00:12:48 PDTHits  32