4/6 quiziz

4/6 quiziz

9th - 11th Grade

6 Qs

quiz-placeholder

Similar activities

2° ANO SENAC - ATIVIDADE 3

2° ANO SENAC - ATIVIDADE 3

11th Grade

10 Qs

Chapter 5

Chapter 5

9th Grade

10 Qs

C# Database

C# Database

10th Grade

10 Qs

Advanced Python Iteration Quiz

Advanced Python Iteration Quiz

10th Grade

10 Qs

Python Level 2- Lesson 2

Python Level 2- Lesson 2

10th Grade

10 Qs

AP CSP - Functions (code.org unit4)

AP CSP - Functions (code.org unit4)

9th - 12th Grade

7 Qs

Data

Data

9th Grade - University

11 Qs

Code.org Unit 5 Data

Code.org Unit 5 Data

9th Grade - University

11 Qs

4/6 quiziz

4/6 quiziz

Assessment

Quiz

Computers

9th - 11th Grade

Medium

Created by

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

Media Image

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

Media Image

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

Media Image

What will print to the console after running this code segment?

10

16

21

18