Lists Py Reading

Lists Py Reading

Assessment

Passage

Computers

9th - 10th Grade

Practice Problem

Hard

Created by

Andrew Ward

FREE Resource

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a list in Python?

A collection of items that are ordered and changeable

A collection of items that are unordered and unchangeable

A single item of a specific data type

A function to perform mathematical operations

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a list in Python?

Using square brackets []

Using curly braces {}

Using parentheses ()

Using angle brackets <>

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? fruits = ["apple", "banana", "cherry"] print(fruits[1])

banana

apple

cherry

orange

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

Using the append() method

Using the add() method

Using the insert() method

Using the extend() method

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the following code? fruits = ["apple", "banana", "cherry"] fruits[1] = "orange" print(fruits)

['apple', 'orange', 'cherry']

['apple', 'banana', 'cherry']

['orange', 'banana', 'cherry']

['apple', 'cherry', 'orange']

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to remove the first occurrence of an item from a list in Python?

remove()

delete()

pop()

discard()

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?