Prepa CC

Prepa CC

Assessment

Flashcard

Science

University

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

15 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What is a list in Python?

Back

A list is a collection of data that has an order and can be changed.

2.

FLASHCARD QUESTION

Front

How do you add an item to the end of a list in Python?

Back

Use the append() method, e.g., nameList.append('Felipe').

3.

FLASHCARD QUESTION

Front

What method would you use to remove an item at a specific index from a list?

Back

Use the pop() method, e.g., players.pop(3).

4.

FLASHCARD QUESTION

Front

What is the highest index of a list with 5 elements?

Back

The highest index is 4, as indexing starts at 0.

5.

FLASHCARD QUESTION

Front

How do you access the first element of a list?

Back

Use index 0, e.g., nameList[0].

6.

FLASHCARD QUESTION

Front

What will nameList = ['A', 'B', 'C']; nameList[1] return?

Back

It will return 'B'.

7.

FLASHCARD QUESTION

Front

What happens if you try to access an index that is out of range in a list?

Back

It raises an IndexError.

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?