Edit Game
Lists in Python - Activity#2
 Delete

Use commas to add multiple tags

 Private  Unlisted  Public



 Save

Delimiter between question and answer:

Tips:

  • No column headers.
  • Each line maps to a question.
  • If the delimiter is used in a question, the question should be surrounded by double quotes: "My, question","My, answer"
  • The first answer in the multiple choice question must be the correct answer.






 Save   10  Close
What is the output of the following code segment?
[4, 2, 1, 3, 5]
What is the output of the following code?
[2]
Write the line of code that can sort this list. numbers = [1, 4, 2, 6, 3 ]
numbers.sort()
The sort() method in lists reorders the values by default in _________________order. (ascending/descending)
ascending
What is the output of the following code segment?
[8, 12, 16]
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])
True or False: The function of the sort() method in lists is to reverse the order of the elements inside a list.
False
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
What is the output of the code segment above?
["honda", "suzuki", "yamaha"]
What is the index number for "Spain" in the list?
2