Python Lists

Python Lists

Assessment

Quiz

Computers

9th - 12th Grade

Easy

Created by

Saul Cantu

Used 1+ times

FREE Resource

Student preview

quiz-placeholder

18 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these pieces of code would return the name "Harry" from the following list?

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

nameList()

nameList[1]

NameList(4)

nameList["4"]

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is the correct code for creating a list of names?

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]

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

List items have an index number. In the following list, which item has the index number of 3?

["Joe", "Harry", "Jesse", "John", "Harry", "Harry"]

"John"

"Harry"

"Jesse"

"John"

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the position of the name "Robert" in the following list:

0
1
2
3

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Is this the correct code for a list?

register = {"Sam", "Pheobe", Georgia", Richard"}

Yes

No

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

This list contains items of what data type?

String

Boolean

Float

Integer

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which symbols are used to open and close a list?

( ) round brackets

( ) curly brackets

[ ] square brackets

" " speech marks

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?