Q101
Open questionSelect an option to see the answer and solution.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
182
Questions
6/10
Page
Pick an option on a question to see the right answer and solution.
Q101
Open questionSelect an option to see the answer and solution.
Q102
Open questiondef maximum(x, y):
if x > y:
return x
elif x == y:
return 'The numbers are equal'
else:
return y
print(maximum(2, 3))Select an option to see the answer and solution.
Q103
Open questionSelect an option to see the answer and solution.
Q104
Open questionSelect an option to see the answer and solution.
Q105
Open questionl1=[10, 20, 30, [40]]
l2=copy.deepcopy(l1)
l1[3][0]=90
l1
l2Select an option to see the answer and solution.
Q106
Open questiony = 6
z = lambda x: x * y
print z(8)Select an option to see the answer and solution.
Q107
Open questionL = [lambda x: x ** 2,
lambda x: x ** 3,
lambda x: x ** 4]
for f in L:
print(f(3))Select an option to see the answer and solution.
Q108
Open questionSelect an option to see the answer and solution.
Q109
Open questionSelect an option to see the answer and solution.
Q110
Open questiondef func(a, b=5, c=10):
print('a is', a, 'and b is', b, 'and c is', c)
func(3, 7)
func(25, c = 24)
func(c = 50, a = 100)Select an option to see the answer and solution.
Q111
Open questionl=[1, -2, -3, 4, 5]
def f1(x):
return x<2
m1=filter(f1, l)
print(list(m1))Select an option to see the answer and solution.
Q112
Open questionSelect an option to see the answer and solution.
Q113
Open questionx = 'abcd'
print(list(map(list, x)))Select an option to see the answer and solution.
Q114
Open questionSelect an option to see the answer and solution.
Q115
Open questionSelect an option to see the answer and solution.
Q116
Open questionl1=[[10, 20], [30, 40], [50, 60]]
ls=list(l1)
ls
[[10, 20], [30, 40], [50, 60]]Select an option to see the answer and solution.
Q117
Open questionodd=lambda x: bool(x%2)
numbers=[n for n in range(10)]
print(numbers)
n=list()
for i in numbers:
if odd(i):
continue
else:
breakSelect an option to see the answer and solution.
Q118
Open questionx = 1234
print(list(map(list, x)))Select an option to see the answer and solution.
Q119
Open questiondef multiply(a, *args):
result = a
for num in args:
result *= num
return result
result = multiply(2, 3, 4)
print(result)Select an option to see the answer and solution.
Q120
Open questionSelect an option to see the answer and solution.