Search Header Logo

Code.org CSP Unit 5 Lists, Strings, and Loops

Authored by Diane Glasgow

Computers

9th - 12th Grade

Used 63+ times

Code.org CSP Unit 5 Lists, Strings, and Loops
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

24 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which vocabulary word is:

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

list

element

index

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which vocabulary word is:

an ordered collection of elements

list

element

index

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which vocabulary word is:

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

list

element

index

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the value of i after this code runs?


var myNumbers = [32, 64, 33, 0, 15, 26, 3];

var i = myNumbers[4];

64

15

0

32

5.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

//Consider this code:

var list = [10, 12, 14, 16, 18];

appendItem(list, 3);

insertItem(list, 2, 20);

removeItem(list, 0);


//What is printed to the console?

console.log(list);

10, 12, 14, 16, 18

10, 12, 14 , 20, 16, 18, 3

3, 12, 14, 20, 16, 18

12, 20, 14, 16, 18, 3

6.

FILL IN THE BLANK QUESTION

3 mins • 1 pt

//Consider this code:

var list = [10, 12, 14, 16, 18];

appendItem(list, 3);

insertItem(list, 2, 20);

removeItem(list, 0);


//What is printed to the console?

console.log(list[0]);

(a)  

7.

FILL IN THE BLANK QUESTION

3 mins • 1 pt

//Consider this code:

var list = [10, 12, 14, 16, 18];

appendItem(list, 3);

insertItem(list, 2, 20);

removeItem(list, 0);


//What is printed to the console?

console.log(list.length);

(a)  

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?