Module 05 - Functions Flashcards

1
Q

Function draw() & function setup() are already apart of p5.js so it’s already defined. True or false.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a user-defined function?

A

Blocks of code the user creates to be defined and executed in the program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the order of the user-defined functions?

A
  1. setup()
  2. draw()
  3. event functions [e.g. keyPressed()]
  4. built-in functions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are parameters?

A

Variables that are used to pass info into a function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How are parameters helpful?

A

They allow users to create generalized functions that can work w/ different sets of data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a parameter-less function?

A

Function that does not take any parameters or arguments. When you define the function, there is no variables listed in the parenthesis ‘()’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a scope?

A

A defined portion of your program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are arguments?

A

Values that are passed when calling an existing function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly