Mind your Test
More TEST Q's
Vocab
Mo Vocab
Lingo Mr. Anderson Shouldn't use
100



A school is developing a program to keep track of information about students and their class schedules. In which of the following instances would a data abstraction be most helpful?


A.   The program includes individual variables to store the names of each student rather than a single list of students.

 B.   A program includes multiple comments that could be combined into a single comment

 C.   A program includes repeated programming statements that could be moved inside a loop

 D.   A program includes repeated code that could be moved inside a function

A.   The program includes individual variables to store the names of each student rather than a single list of students.

100

What will be displayed in the console when the following program runs?

var count = 0

while (count != 5){

  console.log(count);

  count = count + 2;

}

 A.   0 2 4 6

 B.   0 2 4

 C.   2 4 6

D.   The program will result in an infinite loop

D.   The program will result in an infinite loop

100

    • an ordered sequence of characters.

List

100
  • occurs when the ending condition will never evaluate to true.

Infinite loop:

100

What does, "slay" mean?

A. Refers to what a butcher does

B. It's what those smelly reindeer pull

C. to do something well/to impress

D. small Lay's chips, usually mini in stature.

200

var list = [10, 5, 15];

for(var i = 0; <INSERT CODE>; i++){

  console.log(list[i]);

}

Which of the following will result in ONLY all the items in list being printed to the console if placed where the program reads <INSERT CODE> and the program is run.

 A.   i < list[list.length]

B.   i < list.length

 C.   i < list[0]

 D.   i < list[1]

B.   i < list.length

200

what will the following program display in the console?
for(var i = 0; i < 4; i++){

  console.log(i);

}

A.   0 1 2 3

 B.   0 1 2 3 4

 C.   1 2 3

 D.   1 2 3 4

A.   0 1 2 3

200
  • an individual value in a list that is assigned a unique index

Element

200
  • the process of accessing each item in a list one at a time.

Traversal

200

What does the word, "GOAT" mean?

A. It is a vegetable, similar to a sweet potato

B. The next up and comming viral rapper

C. To put a curse on your enemies by turning them into a farm animal

D. Greatest of all time

300

wordList is a list of words that currently contains the values ["tree", "rock", "air"]

Which of the following lines will result in the list containing the values ["air", "rock", "air"]

A.   wordList[0] = wordList[2]

 B.   wordList[2] = wordList[0]

 C.   insertItem(wordList, 0, "air")

 D.   removeItem(wordList,0) 

A.   wordList[0] = wordList[2]

300

What will the following program display in the console?

var sum = 0; for(var i = 0; i < 5; i++){  sum = sum + i; }
console.log(sum);

 A.   0

 B.   5

 C.   10

 D.   15 

C

300
  • a common method for referencing the elements in a list or string using numbers

Index

300
  •  manage complexity in programs by giving a collection of data a name without referencing

    the specific details of the representation.

Data abstraction:

300

What does the term, "Hits different" mean?

A. The unique way something quenches a desire

B. Rock'em sock'em Robots

C. Refers to a slap instead of a punch in a fight. "Why are their Hits different?"

400

What will be displayed in the console when this program runs?

var numList = [10,20,30]; console.log(numList[numList.length-1]);

 A.   2

 B.   3

 C.   20

 D.   30 

D

400


A job placement agency helps match job seekers with potential employers. The agency would like to design a simulation in order to help predict the likely job placement outcomes for job seekers based on historical trends and patterns. Which of the following is most likely to be a benefit of the simulation?


 A.   The computer simulation will be able to include more details and complexity than the real-world job placement process.

B.   The computer simulation could be used to test hypotheses about patterns in the job placement process that are costly or time consuming to observe in reality.

C.   The computer simulation will be able to precisely predict the real-world outcomes for each job seeker.

 D.   The computer simulation will remove the bias that may arise in the real-world job placement process. 

B.   The computer simulation could be used to test hypotheses about patterns in the job placement process that are costly or time consuming to observe in reality.


400
  •  a repetitive portion of an algorithm which repeats a specified number of times or until a given
    condition is met.

Iteration

400
  • This word is another name for a list?

An array

400

What does the term, "Let them cook" mean?

A. a description of a character on a T.V. show about a teacher, "Breaking Bad."

B. When a parent is cooking dinner and the kids keep interrupting

C. Give one space to proceed uninterrupted (especially when saying or doing something provocative) in the hope that the result might be entertaining 

500

What will be displayed when this program finishes running?

var numbersList = [20, 10, 5]

appendItem(numbersList, 50)

appendItem(numbersList,100)

removeItem(numbersList,1)

insertItem(numbersList, 0, 30)

console.log(numbersList.length)
 A.   3

 B.   6

 C.   7

 D.   5

D

500

var words = [“apple”, ”bug”, ”car”, ”dream”, ”ear”, “food”]; var filteredWords = [];
for (var i = 0; i < words.length; i++) {  var word = words[i];  if (word.length < 4) {    
    appendItem(filteredWords,word);  } 

}
console.log(filteredWords);

If the program above is run, what will be displayed in the console?

 A.   [apple, dream]

 B.   [bug, car, ear]

 C.   [bug, car, ear, food]

 D.   [apple, dream, food] 

B

500
  • a data type that is either true or false.

Boolean Value:

500
  • a command that executes the code within a function

Function Call:

500

What does the word, "Shook" mean?

A. How you feel after getting off a ride at an amusement park

B. To be shocked, surprised, or bothered. 

C. When someone is acting like they need to be shaken to bring them back to reality.

D. How James Bond likes his drinks.

M
e
n
u