Search Header Logo

FoP Unit 8 Lists Pre-Assessment

Authored by Jamey Barber

Computers

10th Grade

Used 1+ times

FoP Unit 8 Lists Pre-Assessment
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the syntax for creating a list in Python?

{}

()

[]

||

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access the third element in a list named 'my_list'?

my_list[3]

my_list[2]

my_list(2)

my_list.third()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What method is used to add an element to the end of a list?

pop()

remove()

append()

insert()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the operation [1, 2, 3] + [4, 5, 6]?

Error

10

7

123

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a list containing the squares of numbers from 1 to 10 using list comprehension?

[x^2 for x in range(1, 11)]

[x*2 for x in range(1, 11)]

[x**3 for x in range(1, 11)]

[x**2 for x in range(1, 11)]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the slicing operation my_list[2:5]?

The result of my_list[2:5] is an empty list.

The result of my_list[2:5] is a sublist containing the elements at index 0, 1, and 2.

The result of my_list[2:5] is a sublist containing the elements at index 2, 3, and 4.

The result of my_list[2:5] is a single element at index 2.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access the last element in a list?

list_name[-1]

list_name[last]

list_name[0]

list_name[end]

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

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?