List Methods Quiz

List Methods Quiz

11th Grade

8 Qs

quiz-placeholder

Similar activities

Python L1 Quiz 4: Lists

Python L1 Quiz 4: Lists

1st - 12th Grade

10 Qs

CSP Lists

CSP Lists

9th - 12th Grade

10 Qs

CSP Lists Loops and Traversals

CSP Lists Loops and Traversals

9th - 12th Grade

9 Qs

Lists, Loops, Traversal

Lists, Loops, Traversal

9th - 12th Grade

9 Qs

Python List Functions Quiz

Python List Functions Quiz

11th Grade

10 Qs

Common Algorithms Quiz

Common Algorithms Quiz

KG - Professional Development

11 Qs

Python list starter

Python list starter

10th Grade - University

12 Qs

Unit 5 -- Lists, Loops, Traversals

Unit 5 -- Lists, Loops, Traversals

9th - 12th Grade

9 Qs

List Methods Quiz

List Methods Quiz

Assessment

Quiz

Computers

11th Grade

Medium

Created by

Nisreen Ariwala

Used 1+ times

FREE Resource

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the count() method do in a list?

Returns the index of the first occurrence of an element

Returns the number of times a given element appears in the list

Removes the first occurrence of an element from the list

Reverses the order of elements in the list

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will happen if you call index() on an element not in the list?

It will return -1

It will return None

It will remove the element from the list

It will generate a ValueError

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the remove() method do?

Reverses the list

Removes all occurrences of an element

Removes the last element of the list

Removes the first occurrence of a specified element

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the pop() method return if no index is specified?

The middle element of the list

The first element of the list

The last element of the list

None

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of calling reverse() on the list ['Tiger', 'Zebra', 'Lion']?

['Tiger', 'Lion', 'Zebra']

['Lion', 'Tiger', 'Zebra']

['Lion', 'Zebra', 'Tiger']

['Zebra', 'Tiger', 'Lion']

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the list look like after executing list1.remove(30) on list1 = [10, 20, 30, 40, 50, 30]?

[10, 20, 40, 50, 30]

[10, 20, 30, 50]

[10, 20, 30, 40, 50, 30]

[10, 20, 30, 40, 50]

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the sort() method do?

Sorts the elements of the list in place

Returns a sorted copy of the list

Reverses the order of elements in the list

Removes duplicates from the list

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of list1.index(90) if list1 = [10, 20, 30]?

None

0

2

ValueError