Understanding Python Lists

Understanding Python Lists

10th Grade

16 Qs

quiz-placeholder

Similar activities

LAUNDRY 1 SMK PURIWISATA

LAUNDRY 1 SMK PURIWISATA

1st Grade - University

20 Qs

3° Bimestral grado 10°

3° Bimestral grado 10°

10th Grade

17 Qs

JavaScript Basics Quiz

JavaScript Basics Quiz

10th Grade

15 Qs

WORD Unit Practice

WORD Unit Practice

8th - 12th Grade

19 Qs

Classroom Procedures

Classroom Procedures

8th - 10th Grade

16 Qs

GUIA TECNOLOGIA 2

GUIA TECNOLOGIA 2

8th Grade - University

15 Qs

Coding Loops/Lists

Coding Loops/Lists

9th - 12th Grade

21 Qs

PrePost Mail Merge

PrePost Mail Merge

10th Grade

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?