Calling Functions Flashcards

1
Q

x = calculateOutput ( )

Does this statement call a function?

A

x = calculateOutput ( )

Yes, this is a proper statement calling a function.

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

newValue == calcOutput ( )

Does this statement call a function?

A

newValue == calcOutput ( )
No, this is NOT a proper function calling statement.
The == should be =

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

newValue = calcOutput (names)

Does this statement call a function?

A

newValue = calcOutput (names)

Yes, this is a proper statement calling a function.

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

DisplayOutput (names)

Does this statement call a function?

A
DisplayOutput (names)
No, this is NOT a function calling statement. 
It looks like a module calling statement, but it is not in camelCase.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

playerAlive = doBattle ( )

Does this statement call a function?

A

playerAlive = doBattle ( )

Yes, this is a proper statement calling a function.

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

x = calculateOUTPUT ( )

Does this statement call a function?

A

x = calculateOUTPUT ( )
No, this is NOT a function calling statement.
The function name is not in camelCase.

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

playerAlive = calcHealthValue (FALSE)

Does this statement call a function?

A

playerAlive = calcHealthValue (FALSE)

Yes, this is a proper statement calling a function.

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

answer = calculateAnswer

Does this statement call a function?

A

answer = calculateAnswer
No, this is NOT a function calling statement.
It is missing the ( )

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

newText = getString (enterMsg)

Does this statement call a function?

A

newText = getString (enterMsg)

Yes, this is a proper statement calling a function.

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

newArray = determineAnswer (myArray)

Does this statement call a function?

A

newArray = determineAnswer (myArray)

Yes, this is a proper statement calling a function.

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

Function void shootAlienShip ( )

Does this statement call a function?

A

Function void shootAlienShip ( )
No, this is NOT a function calling statement.
This is a function header.

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

sleepTime = nap (tenMinutes)

Does this statement call a function?

A

sleepTime = nap (tenMinutes)

Yes, this is a proper statement calling a function.

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

complete = finishJob (forMONEY)

Does this statement call a function?

A

complete = finishJob (forMONEY)
No, this is NOT a proper function calling statement because the argument is not in camelCase or UPPER_CASE to indicate it is a constant.

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

done = displayAwesomeGraphic ( )

Does this statement call a function?

A

done = displayAwesomeGraphic ( )

Yes, this is a proper statement calling a function.

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

Module Integer displayOutput ( )

Does this statement call a function?

A

Function Integer displayOutput ( )
No, this is NOT a function calling statement.
This is a function header.

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