The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 4 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
needed asap
1.Which of the following function returns an iterable of index values from 0 to 3?
A.choice(seq(0,3)) B. range(0, 3) C. random(0, 3) D.seed([0, 3])
2.What is the following function returns item from the list with max value?
A.cmp(list) B. len(list) C.max(list) D. min(list)
3.What is the output of print(tuple[2]) if tuple = [ 'abcd', 786 , 2.23, 'john', 70.2 ]?
A. 'abcd' B. 786 C.2.23 D. 'john'
4.What is the output of print( str[0] ) if str = 'Hello World!'?
A.Hello World! B. H C. ello World! D. None of the above.
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?
A. list.index("value") B. list.append("value") C.list.get("value") D. list.remove("value")
6.In the following for loop, what is the purpose of x? For x in list.keys() print(list[x])
A. It holds the value of the current element during that iteration. B. It holds the index value of the current element during that iteration. C. controls the list of index values. D.holds the name of the current element during that iteration
7.What is the output of print( tinylist * 2) if tinylist = [123, 'john']?
A. [123, 'john', 123, 'john'] B. [123, 'john'] * 2 C. Error D. None of the above.
8.Which of the following functions generates an iterable list of values, only as needed?
A. range() B. xrange() C.temprange() D.choice()
9.Using lists and condition statements within our programs gives us the opportunity to handle an undefined amount of data. True False
10.when referencing an index value within a list, the first element’s index value is always:
A.0 B.1 C.-1 D.any value