MCQGeeks
CBSE
JEE
NTSE
NEET
English
UK Quiz
Quiz
Driving Test
Practice
Games
Quiz
Python
Python Interview
Quiz 1
Solution
Q.1.
What will be the output of the following Python code? elements = [def incr(x): return x+1 print(list(map(elements, incr)))
a) [1, 2, 3]
b) [0, 1, 2]
c) error
d) none of the mentioned
Q.2.
What will be the output of the following Python code? elements = [def incr(x): return x+1 print(list(map(incr, elements)))
a) [1, 2, 3]
b) [0, 1, 2]
c) error
d) none of the mentioned
Q.3.
What will be the output of the following Python code? x = ['ab', 'cd'] print(list(map(upper, x)))
a) [‘AB’, ‘CD’]
b) [‘ab’, ‘cd’]
c) error
d) none of the mentioned
Q.4.
What will be the output of the following Python code? def to_upper(k): return k.upper() x = ['ab', 'cd'] print(list(map(upper, x)))
a) [‘AB’, ‘CD’]
b) [‘ab’, ‘cd’]
c) none of the mentioned
d) error
Q.5.
What will be the output of the following Python code? def to_upper(k): return k.upper() x = ['ab', 'cd'] print(list(map(to_upper, x)))
a) [‘AB’, ‘CD’]
b) [‘ab’, ‘cd’]
c) none of the mentioned
d) error
Q.6.
What will be the output of the following Python code? def to_upper(k): k.upper() x = ['ab', 'cd'] print(list(map(to_upper, x)))
a) [‘AB’, ‘CD’]
b) [‘ab’, ‘cd’]
c) none of the mentioned
d) error
Q.7.
What will be the output of the following Python code? x = ['ab', 'cd'] print(map(len, x))
a) [‘ab’, ‘cd’]
b) [2, 2]
c) [‘2’, ‘2’]
d) none of the mentioned
Q.8.
What will be the output of the following Python code? x = ['ab', 'cd'] print(list(map(len, x)))
a) [‘ab’, ‘cd’]
b) [2, 2]
c) [‘2’, ‘2’]
d) none of the mentioned
Q.9.
What will be the output of the following Python code? x = ['ab', 'cd'] print(len(map(list, x)))
a) [2, 2]
b) 2
c) 4
d) none of the mentioned
Q.10.
What will be the output of the following Python code? x = ['ab', 'cd'] print(len(list(map(list, x))))
a) 2
b) 4
c) error
d) none of the mentioned
Support mcqgeeks.com by disabling your adblocker.
×
Please disable the adBlock and continue.
Thank you.
Reload page