Python lists

Python lists

7th - 9th Grade

18 Qs

Student preview

quiz-placeholder

Similar activities

Python Arrays

Python Arrays

9th - 12th Grade

13 Qs

Programming in Python, Lists - 9RH

Programming in Python, Lists - 9RH

8th - 10th Grade

17 Qs

GCSE J277 - 2.2.3 - Arrays

GCSE J277 - 2.2.3 - Arrays

7th Grade

20 Qs

Python Recap

Python Recap

9th - 12th Grade

15 Qs

Python

Python

9th Grade

14 Qs

Python Lists Quiz

Python Lists Quiz

7th Grade

20 Qs

One Dimensional Arrays

One Dimensional Arrays

9th - 12th Grade

17 Qs

About HTML and CSS

About HTML and CSS

8th - 9th Grade

15 Qs

Python lists

Python lists

Assessment

Quiz

Created by

undefined undefined

Computers

7th - 9th Grade

34 plays

Medium

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

Explore all questions with a free account

or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?