Question: Question 1 A Python list is . . . . . . . . set of items. an unordered an ordered a limited an integer
Question
A Python list is set of items.
an unordered
an ordered
a limited
an integer
Question
Which is a valid Python statement?
alist ; ; ;
alist : : :
alist
Question
A Python list's items can be any Python type.
True
False
Question
If squares what is the value of squares
an error
Question
If squares what is lensquares
Question
The following statement is valid:
alist
True
False
Question
What is the output of the following program:
alist
for i in range:
alist.appendi
printalist
Question
What is the output of the following:
alist
sum
for value in alist:
sum value
printsum
Question
If squares what is the value of squares:
Question
If squares what is the value of squares:
an error
Question
If squares what is the value of squares:
an error
Question
If squares what is the value of squares::
an error
Question
What function can be used to determine the smallest value in a list?
smallest
min
least
minimum
Question
Which keyword is used to determine if a value is in a list?
contains
in
has
within
Question
Assuming alist is a list of items, what does this statement do:
alist
Insert two items into the list at position
Change alist's second item to
Change alist's first item to
Insert an item in a list at position with value
Question
Which statement can be used to insert an item into a list named alist?
alist.insertitem O
insertalist item
alist.insertO item
alist item
Question
What method can be used to append a list to the end of another list?
augment
extend
concatenate
add
Question
Assuming the list squares is set to what statement can be
used to remove the value from the list
del alist
alist.remove
removealist
removealist O
Ouestion
Assuming alist is a list with items, what statement can be used to
remove the last item from alist and assignment the variable last to its
value?
last alist.pop
last alist.drop
last alist
last alist
Question
What statement can be used to remove all items from a list named alist?
delete alist
alist.clear
del alist
clearalist
Question
What statement can be used to remove the first item from a list named
alist?
removealist
alist.removeO
del alistO
delalist O
Question
If alist is a list, what method can be used to create a new list with a copy
of the items contained in alist?
blist alist.dup
blist alist
copyalist blist
blist alist.copy
Question
If alist is a list, what does sortedalist do
generates a new ordered list
checks if alist is sorted, and return True or False
returns the index of the first item out of order
updates alist so that its items are in order
Question
If alist is a list, what does alist.sort do
checks if alist is sorted and return True or False
generates a new ordered list
updates alist so that its items are in order
returns the index of the first item out of order
Question
If alist is a list, what does alist.reverse do
generates a new list in reverse order
checks if alist is reverse sorted, and return True or False
updates alist so that its items are in reverse order
returns the index of the first item out of order
Question
A table can be represented as a list of lists.
True
False
Question
After a tuple is created, its items can be changed.
True
False
Question
Which can be used to create a tuple?
square brackets
curly braces
colons
parentheses
Question
A tuple's items can be access by square brackets, similar to lists.
True
False
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
