Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Code.org Unit 6 - Lists

Total questions: 12

Worksheet time: 6mins

Name
Class
Date
1.

An ordered collection of elements.

a)

Sequence

b)

List

c)

Length

d)

Element

2.

 An individual value in a list that is assigned a unique index.

a)

Sequence

b)

List

c)

Length

d)

Element

3.

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

a)

Sequence

b)

List

c)

Index

d)

Element

4.

Refers to the entire length of a list.

a)

[list].length

b)

[list].length-1

5.

A way to reference the last item in a list.

a)

[list].length

b)

[list].length-1

6.

Allows a user to see random elements in a list that generate a random number between 0 and the length of the list minus one.

a)

Random List Access Pattern

b)

Scrolling List Pattern

c)

List Length

d)

appendItem

7.

Allows a user to "scroll" through all the items in the list.

a)

Random List Access Pattern

b)

Scrolling List Pattern

c)

List Length

d)

appendItem

8.

Removes the element in the given list at the given index.

a)

removeItem(list, index)

b)

appendItem(list, item)

c)

insertItem(list, index, item)

d)

list.length-1

9.

Adds an element to the end of the list.

a)

removeItem(list, index)

b)

appendItem(list, item)

c)

insertItem(list, index, item)

d)

list.length-1

10.

Inserts an element into a list at the index given.

a)

removeItem(list, index)

b)

appendItem(list, item)

c)

insertItem(list, index, item)

d)

list.length-1

11.

What does this code check in the conditional?

a)

if index is less than the length of the list

b)

if index is less than the last item in the list

12.

What is this list pattern is this picture an example of?

a)

Random Access List Pattern

b)

Scrolling List Pattern