Mastering Python List Operations

Mastering Python List Operations

7th Grade

10 Qs

quiz-placeholder

Similar activities

Unit 6 Coding

Unit 6 Coding

6th - 8th Grade

15 Qs

PYTHON (FOR LOOP)

PYTHON (FOR LOOP)

1st - 10th Grade

10 Qs

CodeHS 5.2

CodeHS 5.2

6th - 10th Grade

15 Qs

Python list and tuple

Python list and tuple

6th - 8th Grade

10 Qs

10.4 Python Lists

10.4 Python Lists

7th - 10th Grade

14 Qs

Python - Loops & Lists

Python - Loops & Lists

7th - 11th Grade

15 Qs

Python methods

Python methods

6th - 12th Grade

10 Qs

Banana Tales Part I (1-40)

Banana Tales Part I (1-40)

6th - 8th Grade

10 Qs

Mastering Python List Operations

Mastering Python List Operations

Assessment

Quiz

Computers

7th Grade

Medium

Created by

Ammar Hanifi

Used 7+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code: list1 = [1, 2, 3]; print(list1[0])?

1

3

0

2

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you add an element '4' to the end of list1 = [1, 2, 3]?

list1.insert(4)

list1.add(4)

list1.append(4)

list1.extend(4)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the method list1.remove(2) do to the list list1 = [1, 2, 3]?

The list becomes [1, 3].

The list becomes [1].

The list becomes [2, 3].

The list becomes [1, 2, 3].

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If list2 = [5, 6, 7] and you execute list1=list2, what will list1 contain?

[5, 6, 7]

[5, 6]

[5, 6, 7, 8]

[6, 7]

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

List1=[0,2,3] .What is the result of len(List)?

[2, 3]

2

3

[1, 2, 3]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you create a new list that is a copy of list1 = [1, 2, 3]?

new_list = list1.extend([])

new_list = list1.copy() or new_list = list1[:]

new_list = list1.append(4)

new_list = list1 + []

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code: list1 = [1, 2, 3,7]; print(len(list1))?

2

4

3.5

3

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?