Python List, Tuple, Set & Dictionaries

Assessment
•
Yolande Cole
•
Computers
•
Professional Development
•
809 plays
•
Medium
Student preview

25 questions
Show answers
1.
Multiple Choice
Square brackets in an assignment statement will create which type of data structure?
( s=[] )
List
Queue
Dictionary
Set
2.
Multiple Choice
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
List items have an index number. In the following list, which item has the index number of 3?
["John", "Harry", "Jesse", "John", "Harry", "Harry"]
"John"
"Harry"
"Jesse"
"John"
4.
Multiple Choice
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"]
5.
Multiple Choice
0
1
2
3
Explore all questions with a free account
Find a similar activity
Create activity tailored to your needs using
python quiz

•
Professional Development
Python - List (metods)

•
Professional Development
Quiz Module 2 and 3

•
Professional Development
Python quiz 1

•
7th Grade - Professio...
Stats+Python ISA Test - Quiz

•
University - Professi...
Python Lists Dictionaries Tuple Set

•
Professional Development
Python Lists and Dictionaries

•
Professional Development
Тест 2. Функции и коллекции

•
Professional Development