Filters
Question type

Study Flashcards

When working with multiple sets of data,one would typically use a(n)


A) list
B) tuple
C) nested list
D) sequence

E) None of the above
F) C) and D)

Correct Answer

verifed

verified

To calculate the average of the numeric values in a list,the first step is to get the total of values in the list.

A) True
B) False

Correct Answer

verifed

verified

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

A) True
B) False

Correct Answer

verifed

verified

What will be the value of the variable list after the following code executes? List = [1,2] List = list * 3


A) [1, 2] * 3
B) [3, 6]
C) [1, 2, 1, 2, 1, 2]
D) [1, 2], [1, 2], [1, 2]

E) B) and C)
F) C) and D)

Correct Answer

verifed

verified

Lists are dynamic data structures such that items may be added to them or removed from them.

A) True
B) False

Correct Answer

verifed

verified

In order to create a graph in Python,you need to include


A) import matplotlib
B) import pyplot
C) import matplotlib.pyplot
D) import matplotlib
Import pyplot

E) A) and D)
F) A) and C)

Correct Answer

verifed

verified

To add a descriptive label to the X and Y axes of a graph when using the matplotlib package,you need to import the labels module.

A) True
B) False

Correct Answer

verifed

verified

Each element in a tuple has a(n)__________ that specifies its position in the tuple.

Correct Answer

verifed

verified

The __________ function returns the item that has the lowest value in the sequence.

Correct Answer

verifed

verified

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

A) True
B) False

Correct Answer

verifed

verified

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


A) [1, 2, 3, 10]
B) [1, 2, 10, 4]
C) [1, 10, 10, 10]
D) Nothing; this code is invalid

E) All of the above
F) C) and D)

Correct Answer

verifed

verified

What are the data items in a list called?


A) data
B) elements
C) items
D) values

E) B) and C)
F) A) and D)

Correct Answer

verifed

verified

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


A) append
B) index
C) insert
D) add

E) A) and B)
F) None of the above

Correct Answer

verifed

verified

The sort method rearranges the elements of a list so they are in ascending or descending order.

A) True
B) False

Correct Answer

verifed

verified

Tuples are __________ sequences which means that once a tuple is created,it cannot be changed.

Correct Answer

verifed

verified

The __________ method reverses the order of the items in a list.

Correct Answer

verifed

verified

Which method or operator can be used to concatenate lists?


A) *
B) +
C) %
D) concat

E) B) and D)
F) A) and C)

Correct Answer

verifed

verified

The __________ package is a library you can use in Python to create two-dimensional charts and graphs.

Correct Answer

verifed

verified

A(n)___________ is a span of items that are taken from a sequence.

Correct Answer

verifed

verified

What is the first negative index in a list?


A) 0
B) -1
C) -0
D) the size of the list minus 1

E) B) and C)
F) A) and C)

Correct Answer

verifed

verified

Showing 21 - 40 of 40

Related Exams

Show Answer