No student devices needed. Know more
9 questions
What kind of brackets are used in lists
[ ]
( )
{ }
" "
What is the index number for 'Spain'?
['England','Brazil','Spain','France']
0
1
2
3
Which code would i use to add an item to a list?
variable.add()
variable.append()
append.variable()
add.variable()
variable.sort() will do what?
Sort the list into alphabetical order
Sort the list into reverse order
Create a new list
Error
What sort of loop is this?
Count Controlled
Condition Controlled
Do we use key in lists?
Yes
No
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"
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"]
The list needs one more name added to the end - "Felipe". Which piece of code below would do this?
nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]
nameList.append(Felipe)
append(nameList,"Felipe")
nameList.append["Felipe",7]
nameList.append("Felipe")
Explore all questions with a free account