Across
- 2. What does this p5.js code do? Describe what will be displayed on the screen.
- 5. What function changes the alignment of text in p5.js?
- 6. What is the built-in variable that stores the vertical position of the mouse?
- 8. What p5.js function changes the way rectangle positions are defined?
- 10. What function checks if a key is pressed in p5.js?
- 14. What is the purpose of the setup() function in p5.js?
- 15. What is the difference between the setup() and draw() functions in p5.js?
- 17. What built-in variable stores the key code when a key is pressed?
- 20. What function disables the stroke of shapes in p5.js?
- 22. Write a line of p5.js code that draws a circle with a diameter of 50 pixels at (200, 150).
- 23. What function stops the draw loop in p5.js?
- 25. What is the built-in variable that stores the horizontal position of the mouse?
Down
- 1. What does background(255, 0, 0); do in p5.js?
- 3. What function sets the color of the shape’s outline in p5.js?
- 4. What function draws a line between two points in p5.js?
- 7. What function sets the number of frames per second in p5.js?
- 9. What is the function used to draw an ellipse in p5.js?
- 11. What will happen if you write fill(0, 255, 0); ellipse(100, 100, 50, 50); in the draw() function?
- 12. What built-in variable stores the actual key value when a key is pressed?
- 13. What function changes the font size for text in p5.js?
- 16. Which of the following correctly creates a canvas of width 400 and height 300 in p5.js?
- 18. What function is used to create the drawing area in p5.js?
- 19. What function is used to disable filling shapes in p5.js?
- 21. The following code has a mistake. What is wrong with it? How would you fix it?
- 24. What function generates a random number in p5.js?
