True or False: The function of the reverse() method is to sort the list (lowest to highest for numbers and alphabetical order for strings).
False
Oops!
Check
Okay!
Check
boom
Lose 50 points!
Oops!
seesaw
Swap points!
Okay!
fairy
Take points!
5
10
15
20
25
thief
Give points!
5
10
15
20
25
boom
Lose 50 points!
Oops!
shark
Other team loses 5 points!
Okay!
fairy
Take points!
5
10
15
20
25
baam
Lose 5 points!
Oops!
10
The sort() method in lists reorders the values by default in _________________order. (ascending/descending)
ascending
Oops!
Check
Okay!
Check
lifesaver
Give 15 points!
Oops!
fairy
Take points!
5
10
15
20
25
gift
Win 25 points!
Okay!
banana
Go to last place!
Oops!
10
nameList = ["John", "Harry", "Jesse", "John", "Marry", "Larry"] Using the slicing concept, write the line of code that would display Harry and Jesse only.
print(nameList[1:3])
Oops!
Check
Okay!
Check
10
What is the output of the following code?
[2]
Oops!
Check
Okay!
Check
10
What is the output of the following code segment?
[8, 12, 16]
Oops!
Check
Okay!
Check
10
What is the index number for "Spain" in the list?
2
Oops!
Check
Okay!
Check
10
What is the output of the following code segment?
[4, 2, 1, 3, 5]
Oops!
Check
Okay!
Check
10
Write the line of code that can sort this list. numbers = [1, 4, 2, 6, 3 ]
numbers.sort()
Oops!
Check
Okay!
Check
10
What is the output of the code segment above?
["honda", "suzuki", "yamaha"]
Oops!
Check
Okay!
Check
10
True or False: The function of the sort() method in lists is to reverse the order of the elements inside a list.