Search Header Logo

7. Lists - Data Structures

Authored by RoboticSchools undefined

Computers

6th - 8th Grade

Used 66+ times

7. Lists - Data Structures
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

18 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

What is the correct way to create an empty list in Python?

list = {}

list = []

list = ()

list = set()

2.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

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

add()
append()
insert()
push()

3.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

Which method is used to remove the last element from a list?

shift()
deleteLast()
pop()
removeLast()

4.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

Media Image

What is the length of the list after executing the following code?

2

3

4

5

5.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

Media Image

What is the output of the following code?

[1, 2, 3]

[2, 3, 4]

[2, 3, 4, 5]

[1, 2, 3, 4]

6.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

Media Image

What is the output of the following code?

[1, 20, 30, 4, 5]

[1, 20, 30, 5]

[1, 2, 3, 4, 5, 20, 30]

[20, 30, 4, 5]

7.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

Media Image

What is the output of the following code?

[1, 2, 3, [4, 5, 6]]

[1, 2, 3, 4, 5, 6]

[[1, 2, 3], [4, 5, 6]]

[4, 5, 6, 1, 2, 3]

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?