Unit 6 - Lists Quiz

Unit 6 - Lists Quiz

9th Grade

6 Qs

quiz-placeholder

Similar activities

Basics of Javascript

Basics of Javascript

9th - 12th Grade

10 Qs

Advance Python

Advance Python

KG - Professional Development

10 Qs

Code Evaluation

Code Evaluation

9th - 11th Grade

10 Qs

Video Games

Video Games

9th - 12th Grade

10 Qs

KODEKIDDO HACK #MLH3

KODEKIDDO HACK #MLH3

4th Grade - University

10 Qs

Domain 1 Game

Domain 1 Game

9th Grade

11 Qs

Conditional Statements JavaScript

Conditional Statements JavaScript

8th - 12th Grade

10 Qs

Variables in Computer Science

Variables in Computer Science

9th - 12th Grade

7 Qs

Unit 6 - Lists Quiz

Unit 6 - Lists Quiz

Assessment

Quiz

Computers

9th Grade

Hard

Created by

Aquamarine Schutter

Used 3+ times

FREE Resource

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

How do you create an empty list?

var my_list = {};

var my_list = [];

var my_list = ();

var my_list = [None];

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will this code print out?

var innerPlanets = ["mercury", "venus", "earth", "mars"];

console.log(innerPlanets[0])

0

"mercury"

["mercury", "venus", "earth", "mars"]

"venus"

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

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"]

wordList[0] = wordList[2]

wordList[2] = wordList[0]

insertItem(wordList, 0, "air")

removeItem(wordList,0)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

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

var inventory = ["key","coin","coin","backpack"];

console.log(inventory[inventory.length-1]);

coin

4

3

backpack

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt


What will be displayed when this program finishes running?

var numbersList = [20, 10, 5]

removeItem(numbersList,1)

insertItem(numbersList, 0, 30)

console.log(numbersList.length)

2

3

4

5

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will be displayed when this program finishes running?

var groceryList = ["milk","eggs","cheese"]

appendItem(groceryList , "takis")

insertItem(groceryList ,2,"tortillas")

removeItem(groceryList ,1)

console.log(groceryList)

["milk","cheese","takis",2,"tortillas"]

["milk","tortillas","takis"]

["milk","eggs","tortillas","cheese","takis"]

["milk","tortillas","cheese","takis"]