Search Header Logo

Python List Functions Quiz

Authored by Monika Agrawal

Computers

11th Grade

Used 7+ times

Python List Functions Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

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

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?