• 1. 
    ______________ are lines of code that perform specific tasks.

  • Parameters
  • Variables
  • Functions
  • fdsgfds
  • 2. 
    You can use the 'random' function to randomly select the values for any function that uses numeric parameters.

  • True
  • False
  • 3. 
    What are some shapes we can create (with a single function) in p5.js?

  • Rectangle
  • Circle
  • Triangle
  • All Of above
  • 4. 
    What function do we use to add color to the OUTLINE of a shape in p5.js?

  • fill();
  • stroke();
  • outline();
  • line();
  • 5. 
    Numbers inside of the parentheses following the name of the function, which provide information the function needs, are called ________.

  • Brackets
  • Ellipses
  • Variables
  • Parameters (or Arguments)
  • 6. 
    What is the y coordinate of the following rectangle?rect(70, 120, 150, 180);

  • 70
  • 120
  • 150
  • 180
  • 7. 
    What is the height of the following oval (aka ellipse)?ellipse(70, 120, 150, 180);

  • 70
  • 120
  • 150
  • 180
  • 8. 
    What function do we use to add color to the INSIDE of a shape in p5.js?

  • fill();
  • color();
  • colorize();
  • paint();
  • 9. 
    In a p5.js canvas, what are the coordinates of the top left corner?

  • 0,0
  • 100,100
  • -width, -height
  • It depends on the size of the canvas
  • 10. 
    Which of the following has the correct function, parameters and syntax for drawing a rectangle?

  • Rect(x,y,width,height);
  • rect(x,y,width,height);
  • rect(width, height, x, y)
  • rect(x1, x2, y1, y2, width, height);
  • 11. 
    In this image, createCanvas and background are examples of _____.

  • Parameters
  • Variables
  • Functions
  • gloopity gloop
  • 12. 
    HSB stands for ...

  • Height, Saturation, Boldness
  • Hue, Saturation, Brightness
  • Height, Sanitation, Brightness
  • Hue, Statistics, Boldness
  • 13. 
    Using RGB, colors range from ___ to ___.

  • 0 - 255
  • 0 - 100
  • 50 - 550
  • 0 - 250
  • 14. 
    What, if anything, 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 and function draw are both loops but they allow the programmer to do different things.
  • Function setup runs once and function draw is a loop.
  • 15. 
    Which of the following is the correct syntax for drawing a triangle?

  • triangle(x1,y1,x2,y2,x3,y3);
  • triangle(x1,x2,x3,y1,y2,y3);
  • tri(x1,y1,x2,y2,x3,y3);
  • tri(x1,y1,x2,y2,x3,y3, width, height);
  • 16. 
    'Background, arc, and ellipse' are all examples of ______________ in p5.js.

  • functions
  • custom variables
  • shapes
  • parameters
  • 17. 
    The 3 steps involved in creating a custom variable are...

  • name, declare, initialize
  • declare, initialize, use
  • initialize, declare, use
  • name, use, declare
  • 18. 
    When using 'RGB' to fill the color of a shape, the 4th parameter controls the __________ of the color.

  • stroke
  • weight
  • transparency
  • size
  • 19. 
    What is the y coordinate of the following circle?ellipse(70, 120, 150, 180);

  • 70
  • 120
  • 150
  • 180
  • 20. 
    At what points (radians) will the following arc start and end? arc(100, 100, 90, 90, PI, 2*PI);

  • Start - 90, End 360
  • Start - 0, End 270
  • Start - 180, End 360
  • Start - 180, End 270
  • 21. 
    Which of the following is the correct syntax for drawing a rectangle?

  • Rect(x,y,width,height);
  • rect(x,y,width,height);
  • rect(width, height, x, y)
  • rect(x1, x2, y1, y2, width, height);
  • 22. 
    Which option shows accurate code to display this arc?

  • arc(100, 100, 90, 90, radians(270), radians(90));
  • arc(100, 100, 90, 90, radians(180), radians(360));
  • arc(100, 100, 90, 90, PI, PI/2);
  • arc(100, 100, 90, 90, PI/2, 2*PI);
  • 23. 
    What is the height of the following circle?ellipse(70, 120, 150, 180);

  • 70
  • 120
  • 150
  • 180
  • 24. 
    Initializing a custom variable means that you are...

  • setting the variable equal to some value
  • naming the variable
  • telling P5 that the variable exists
  • all of the above
Report Question
warning
access_time
  Time