Font size
WorksheetsParameters and Return Review
Total questions: 19
Worksheet time: 11mins
What is the parameter?
hasVowel
str
lower
true
false
What is the name of the function?
hasVowel
str
lower
true
false
What is the argument for pigify?
updateScreen
statement
text
str
list
8 % 2 =
0
1
2
3
5 % 2 =
0
1
2
3
7 % 3 =
0
1
2
3
Which code segment results in "true" being returned if a number is odd? Replace "MISSING CONDITION" with the correct code segment.
num % 2 == 0;
num % 0 == 2;
num % 1 == 0;
num % 2 == 1;
Numbers is a/an ___
parameter
argument
list
function
loop
What is the name of the procedure?
numList
addNum
subractNum
changeNums
numbers
How many parameters does changeNums have?
0
1
2
3
What will be printed to the console after this program runs?
[12, -1, 0, 6, 5]
[9, 1, 2, 3, 7]
[7, 4, 5, 1, 10]
nothing will be printed
num1 and num2 are called
lists
parameters
arguments
functions
Which function calls would provide the most helpful test of this function?
Remember: With tests, you are attempting to figure out all the possible ways the function could be broken.
findMin(-5, 1)
findMin(2,8)
findMin(0,10)
findMin(7,4)
findMin(8,1)
findMin(6,0)
findMin(4,4)
findMin(-7,7)
findMin(2,3)
findMin(0,2)
findMin(1,-4)
findMin(5,5)
According to the API for moveElement, how many strings need to be input as arguments?
0
1
2
3
Procedural abstraction means you can use functions without understanding the code behind them.
True
False
All functions that have parameters also have a return.
True
False
Algorithms are made up of sequencing, selection, and iteration.
True
False
Using libraries can shorten a programs development time
True
False
The return command of a function should always be placed outside the function definition.
True
False
