List, Loops, and Traversals

List, Loops, and Traversals

12th Grade

37 Qs

quiz-placeholder

Similar activities

Excel tercel parcial licenciatura

Excel tercel parcial licenciatura

9th Grade - University

36 Qs

TIK kelas 7, Penilaian Tengah semester

TIK kelas 7, Penilaian Tengah semester

7th Grade - University

40 Qs

Câu Hỏi Trắc Nghiệm Ôn Tập

Câu Hỏi Trắc Nghiệm Ôn Tập

11th Grade - University

32 Qs

Topic 2.3 Classification of Network

Topic 2.3 Classification of Network

12th Grade

34 Qs

SIMULASI AM TIK

SIMULASI AM TIK

9th - 12th Grade

40 Qs

Photoshop Terms and Controls

Photoshop Terms and Controls

9th Grade - University

38 Qs

All About Computers

All About Computers

9th - 12th Grade

40 Qs

Quarter 2 Quiz 2

Quarter 2 Quiz 2

12th Grade

35 Qs

List, Loops, and Traversals

List, Loops, and Traversals

Assessment

Quiz

Computers

12th Grade

Practice Problem

Hard

Created by

Devonte Mitchell

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

37 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Lists

Named the same as variables

Can contain multiple elements

Index starts at 0

Each number(index) contains one value

2.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

What is true about var myList=["pizza",4]

The command creates a new list and assigns it to a variable

A list is indicated with square brackets

Each value in the list is separated by commas

3.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

What is true about myList[1]

It accesses the value at that index of the list

Also uses square brackets

4.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

What does myList[1]="hello" do?

Assigns the value on the right to the index

Throws out the old value and replaces it with a new one.

5.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

What does removeItem(list, index) do?

Removes the element in the given list at the given index

All items to the right are shifted over

The last index is removed from the list

6.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

What does appendItem(list,item) do?

Adds an element to the end of the list

A new index is added to the list to create a place for the element

The new item is placed in this new index

7.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

What does insertItem(list, index, item) do?

Inserts an element into a list at the index given

A new index is added to the list so there's space for the new element

The new element is placed at the index given, all other items move right

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?