Python List Functions Quiz

Python List Functions Quiz

11th Grade

10 Qs

quiz-placeholder

Similar activities

Arrays and ArrayLists

Arrays and ArrayLists

10th - 12th Grade

15 Qs

2D Lists and Arrays

2D Lists and Arrays

10th - 12th Grade

15 Qs

AP CSP Vocab

AP CSP Vocab

11th Grade

14 Qs

CodeHS

CodeHS

10th - 12th Grade

12 Qs

CodeHS APCSP Python

CodeHS APCSP Python

10th - 12th Grade

12 Qs

Javascript Arrays

Javascript Arrays

9th - 12th Grade

12 Qs

One-Dimensional Array in Python

One-Dimensional Array in Python

10th - 11th Grade

10 Qs

Code.org Unit 6 - Lists

Code.org Unit 6 - Lists

9th - 12th Grade

12 Qs

Python List Functions Quiz

Python List Functions Quiz

Assessment

Quiz

Computers

11th Grade

Medium

Created by

Monika Agrawal

Used 6+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to add an element at the end of a list?

add()

append()

insert()

extend()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the `remove()` function do in a list?

Removes the last element

Removes an element by value

Clears the entire list

Removes an element by index

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to sort a list in ascending order?

sort()

order()

arrange()

sequence()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? my_list = [1, 2, 3, 4] my_list.reverse() print(my_list)

[4, 3, 2, 1]

[1, 2, 3, 4]

[1, 3, 2, 4]

[3, 2, 1, 4]

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the `insert()` function in a list?

To add an element at the end

To remove an element

To add an element at a specific index

To merge two lists

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method would you use to get the number of elements in a list?

count()

length()

size()

len()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the following code output? my_list = [10, 20, 30, 40] print(my_list[2])

10

20

30

40

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?

Discover more resources for Computers