Exam 8: Lists and Tuples

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

In slicing, if the end index specifies a position beyond the end of the list, Python will use the length of the list instead.

(True/False)
4.8/5
(80)

The built-in function _______________ returns the length of a sequence.

(Short Answer)
4.8/5
(71)

What would be the value of the variable list after the execution of the following code? list = [1, 2, 3, 4] List[3] = 10

(Multiple Choice)
5.0/5
(70)

A(n) _______________ is an object that holds multiple items of data.

(Short Answer)
4.8/5
(92)

What would you use if an element is to be removed from a specific index?

(Multiple Choice)
4.8/5
(79)

The index - 1 identifies the last element in a list.

(True/False)
4.8/5
(69)

A list cannot be passed as an argument to a function.

(True/False)
5.0/5
(84)

What method can be used to convert a tuple to a list?

(Multiple Choice)
4.8/5
(87)

What is the advantage of using tuples over lists?

(Multiple Choice)
4.9/5
(75)

What method can be used to place an item in the list at a specific index?

(Multiple Choice)
4.8/5
(87)

Which list will be referenced by the variable number after the execution of the following code? number = range(0, 9, 2)

(Multiple Choice)
4.8/5
(84)

The primary difference between a tuple and list is that _____.

(Multiple Choice)
4.9/5
(69)

Arrays, which most other programming languages allow, have much more capabilities than list structures.

(True/False)
4.9/5
(83)

What would be the value of the variable list2 after the execution of the following code? list1 = [1, 2, 3] List2 = list1 List1 = [4, 5, 6]

(Multiple Choice)
4.8/5
(74)

The first step in calculating the average of the values in a list is to get the total of the values.

(True/False)
4.9/5
(72)
Showing 21 - 35 of 35
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)