Functions Flashcards

1
Q

What does a function ‘take’

A

arguments

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

The result of a function is called the….

A

return value

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

A function that returns something is called

A

fruitful

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

A function that doesn’t return anything is called

A

void / non fruitful

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

What does a function definition do?

A

Specifies the name of a new function

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

What does defining a function do?

A

Creates a function object

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

What is the type of a function?

A

function

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

What is a variable called when passed to a function?

A

parameters

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

Give 3 reasons why you would use functions?

A

Allows you to collect a block of functionality together
Allows you to reduce duplicate code
Helpful for debugging.

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