
4/6 quiziz

Quiz
•
Computers
•
9th - 11th Grade
•
Medium
D W
Used 10+ times
FREE Resource
6 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which code segment results in "true" being returned if a number is even? Replace "MISSING CONDITION" with the correct code segment.
function isEven(num){
if(MISSING CONDITION){
return true;
} else {
return false;
}
}
num % 2 == 0;
num % 0 == 2;
num % 1 == 0;
num % 1 == 2;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be printed to the console after this program runs?
var numbers = [2, 5, 3, 1, 6]
function changeNums(numList, addNum, subtractNum){
for(var i=0; i<numList.length; i++){
if(numList[i] % 3 == 0){
numList[i] = numList[i] + addNum;
} else {
numList[i] = numList[i] - subtractNum;
}
}
}
changeNums(numbers, 3, 2);
console.log(numbers);
[2, 5, 3, 1, 6]
[0, 3, 6, -1, 9]
[-1, 2, 6, -2, 8]
[5, 2, 6, 3, 9]
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which call of the function correctly follows the instructions laid out in the API?
moveElement("button1", 2, 23);
moveElement("button1", "left", "thirty");
moveElement("button1", 30, "two");
moveElement("button1", "down", 25);
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Parameter
the value passed to the parameter
used to return the flow of control to the point where the procedure (also known as a function) was called and to return the value of expression.
Extracting shared features to generalize functionality
a variable in a function definition. Used as a placeholder for values that will be passed through the function.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Argument
The subdivision of a computer program into separate subprograms
the value passed to the parameter
a variable in a function definition. Used as a placeholder for values that will be passed through the function.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will print to the console after running this code segment?
10
16
21
18
Similar Resources on Wayground
10 questions
Advanced Python Iteration Quiz

Quiz
•
10th Grade
11 questions
Java Boolean Statements

Quiz
•
11th Grade
8 questions
Thunkable Practice

Quiz
•
11th Grade
10 questions
Thunkable quiz

Quiz
•
8th - 9th Grade
9 questions
Checkpoint 1 revision

Quiz
•
9th - 12th Grade
10 questions
Python Level 2- Lesson 2

Quiz
•
10th Grade
7 questions
AP CSP - Functions (code.org unit4)

Quiz
•
9th - 12th Grade
10 questions
C# Database

Quiz
•
10th Grade
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade