Search Header Logo

Python lists

Computers

7th - 9th Grade

Used 35+ times

Python lists
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

30 sec • 1 pt

Which of these is a list?

["apples", "oranges", "bananas"]

"apples", "oranges", "bananas"

{"apples", "oranges", "bananas"}

("apples", "oranges", "bananas")

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these assigns a list to a variable?

fruit = input(["apples", "oranges", "bananas"])

fruit = ["apples", "oranges", "bananas"]

fruit == ["apples", "oranges", "bananas"]

fruit["apples", "oranges", "bananas"]

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

To add an item to the end of a list we use

fruit.add("strawberries")

fruit.append("strawberries")

append(fruit("strawberries")

("strawberries").append[fruit]

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

To insert an item in the first position of a list we use

fruit.append("strawberries, 1")

fruit.insert("strawberries",0)

fruit.insert(1, "strawberries")

fruit.insert(0, "strawberries")

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will the code output?

"apples", "oranges"

"apples"

"there are apples"

"there are no apples"

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

An empty list can be declared as

fruitList = ""

fruitList = ["empty"]

fruitList == []

fruitList = []

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

The output of this code will be

"orange"

3

True

0

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?