CSP Unit 5 Pre-Assessment: Lists, Loops, Traversals

CSP Unit 5 Pre-Assessment: Lists, Loops, Traversals

Assessment

Flashcard

Mathematics, Computers

11th - 12th Grade

Hard

Created by

Quizizz Content

FREE Resource

Student preview

quiz-placeholder

15 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What is a list in programming?

Back

A list is a data structure that holds an ordered collection of items, which can be of different types.

2.

FLASHCARD QUESTION

Front

What does the appendItem function do?

Back

The appendItem function adds an item to the end of a list.

3.

FLASHCARD QUESTION

Front

What does the removeItem function do?

Back

The removeItem function removes an item from a list at a specified index.

4.

FLASHCARD QUESTION

Front

What is the purpose of the insertItem function?

Back

The insertItem function adds an item to a list at a specified index, shifting subsequent items.

5.

FLASHCARD QUESTION

Front

How do you access the last item in a list?

Back

You can access the last item in a list using the index 'length - 1'.

6.

FLASHCARD QUESTION

Front

What is the output of console.log(numbersList.length) if numbersList = [20, 10, 5, 50, 100, 30]?

Back

The output will be 6.

7.

FLASHCARD QUESTION

Front

What is the difference between a list and an array?

Back

In many programming languages, a list is a more general term for a collection of items, while an array is a specific type of list with a fixed size.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?