Understanding Python Lists

Understanding Python Lists

10th Grade

16 Qs

quiz-placeholder

Similar activities

Woodshop Safety

Woodshop Safety

9th - 12th Grade

14 Qs

9 kl massiv

9 kl massiv

9th - 12th Grade

19 Qs

Q2 Comprog Summative Test 2

Q2 Comprog Summative Test 2

10th Grade

15 Qs

CIE Computer Science syllabus 0478

CIE Computer Science syllabus 0478

9th - 11th Grade

15 Qs

bai 2

bai 2

10th Grade

15 Qs

Coding Loops/Lists

Coding Loops/Lists

9th - 12th Grade

21 Qs

AP CompSci Unit 6 & 7 Vocab Review

AP CompSci Unit 6 & 7 Vocab Review

9th - 12th Grade

18 Qs

GUIA TECNOLOGIA 2

GUIA TECNOLOGIA 2

8th Grade - University

15 Qs

Understanding Python Lists

Understanding Python Lists

Assessment

Quiz

Instructional Technology

10th Grade

Hard

Created by

RAKSMEY EN

Used 3+ times

FREE Resource

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a list in Python?

A list in Python is a type of function that returns values.

A list in Python is a mutable, ordered collection of items defined by square brackets.

A list in Python is an immutable, unordered collection of items.

A list in Python is a collection of items defined by curly braces.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid way to create a list?

my_list = [1, 2, 3]

my_list = {1, 2, 3}

my_list = '1, 2, 3'

my_list = (1, 2, 3)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What method would you use to add an item to the end of a list?

Use the 'add()' method.

Use the 'insert()' method.

Use the 'extend()' method.

Use the 'append()' method.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access the first element of a list named 'my_list'?

my_list[0]

my_list.get(0)

my_list.first()

my_list(1)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of List = [1, 2, 3]; List.insert(1, 5); print(List)?

A) [1, 5, 2, 3]

B) [1, 2, 5, 3]

C) [5, 1, 2, 3]

D) [1, 2, 3, 5]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method removes the first occurrence of a value from a list?

remove()

delete()

pop()

discard()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the expression len(my_list) if my_list = [1, 2, 3, 4, 5]?

4

6

10

5

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?