Search Header Logo

List Quiz

Authored by Vinisha Jesubert

Education

University

Used 13+ times

List 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

What is a list in Python?

A data type to store a single value

A collection of ordered and mutable elements

A mathematical calculation in Python

A built-in function in Python

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create an empty list in Python?

list()

empty_list()

[ ]

empty_list[]

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access the first element of a list in Python?

list[0]

list.first()

list.first

list[1]

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following methods adds an element to the end of a list?

append()

add()

extend()

insert()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when you use the "+" operator to concatenate two lists in Python?

It concatenates the lists into a new list.

It adds the elements of both lists into a new list.

It raises an error; the "+" operator cannot be used with lists.

It removes the common elements and concatenates the remaining elements.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you remove an element from a list by its value?

list.remove(element)

list.pop(index)

list.delete(element)

list.remove(index)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the following code snippet

my_list = [1, 2, 3, 4, 5]

new_list = my_list[1:3]

[1, 2]

[2, 3]

[2, 3, 4]

[3, 4]

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?