Question
QUESTION 1 What is the following function returns item from the list with max value? cmp(list) len(list) max(list) min(list) 1 points QUESTION 2 What is
QUESTION 1
-
What is the following function returns item from the list with max value?
cmp(list)
len(list)
max(list)
min(list)
1 points
QUESTION 2
-
What is the output of print(tuple[2]) if tuple = [ 'abcd', 786 , 2.23, 'john', 70.2 ]?
'abcd'
786
2.23
'john'
1 points
QUESTION 3
-
What is the output of print( str[0] ) if str = 'Hello World!'?
Hello World!
H
ello World!
None of the above.
1 points
QUESTION 4
-
Which of the following function returns an iterable of index values from 0 to 3?
choice(seq(0,3))
range(0, 3)
random(0, 3)
seed([0, 3])
1 points
QUESTION 5
-
Which list function can be used to return the position value (index number) of a value inside of the list, if that value does exist?
list.index("value")
list.append("value")
list.get("value")
list.remove("value")
1 points
QUESTION 6
-
In the following for loop, what is the purpose of x?
For x in list.keys() print(list[x])
It holds the value of the current element during that iteration.
It holds the index value of the current element during that iteration.
controls the list of index values.
holds the name of the current element during that iteration.
1 points
QUESTION 7
-
What is the output of print( tinylist * 2) if tinylist = [123, 'john']?
[123, 'john', 123, 'john']
[123, 'john'] * 2
Error
None of the above.
1 points
QUESTION 8
-
Which of the following functions generates an iterable list of values, only as needed?
range()
xrange()
temprange()
choice()
1 points
QUESTION 9
-
Using lists and condition statements within our programs gives us the opportunity to handle an undefined amount of data.
True
False
1 points
QUESTION 10
-
when referencing an index value within a list, the first elements index value is always:
0
1
-1
any value
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started