Search Header Logo
PYTHON -- Lists (short)

PYTHON -- Lists (short)

Assessment

Flashcard

Computers

9th - 12th Grade

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

9 questions

Show all answers

1.

FLASHCARD QUESTION

Front

Would the following code work for creating a list? friends = {"Monica", "Ross", "Rachel", "Phoebe", "Joey", "Chandler"}

Back

No

2.

FLASHCARD QUESTION

Front

Which symbols are used to open and close a list? ( ) round brackets AKA parentheses, { } curly brackets, [ ] square brackets, " " double quote marks, < > angle brackets AKA chevrons

Back

[ ] square brackets

3.

FLASHCARD QUESTION

Front

Which line of code is the correct way to create a list of names? Options: nameList = John, Harry, Jesse, John, Harry, Harry; nameList = ("John", "Harry", "Jesse", "John", "Harry", "Harry"); nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]; nameList = [John, Harry, Jesse, John, Harry, Harry]; nameList = (John, Harry, Jesse, John, Harry, Harry)

Back

nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]

4.

FLASHCARD QUESTION

Front

What's the index value of list item "Robert" in names = ["Bob", "Bobby", "Robert", "Rob"]?

Back

2

5.

FLASHCARD QUESTION

Front

Which list item has the index value of 3? ["John", "Harry", "Jesse", "John", "Harry", "Harry"]

Back

"John"

6.

FLASHCARD QUESTION

Front

Which line of code would insert the string "strawberries" in the first position of the fruit list? Options: fruit("strawberries", 1), fruit("strawberries", 0), fruit(1, "strawberries"), fruit[1:1] = ["strawberries"]

Back

fruit[1:1] = ["strawberries"]

7.

FLASHCARD QUESTION

Front

What data type are the list items shown in the screenshot?

Media Image

Back

Integers

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?