Functions Flashcards

1
Q

Function definition

A

A segment of code that creates a function, including its names, and code, to be used by other portions of the program.

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

Parameter

A

A variable for which a function expects to receive a value when called, whose scope is the function’s own execution.

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

Function Header

A

The name and list of parameters a function expects, provided as reference to the rest of the program to use when calling the function.

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

Function Body

A

The code that a function runs when called.

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

Return Stament

A

The line of code that defines what output will be sent back at the end of a function.

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

Arguments

A

Values passed into parameters during a function call. Essentially, these are the values assigned to the function’s dedicated variables (i.e., parameters)

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

return (ending the function early)

A

When a function runs a line with a return statement, it immediately ends the function and send the result back

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