What will be the output of the following Python code?π€π₯οΈπ§
x = ['ab', 'cd']
for i in x: i.upper() print(x)
x = ['ab', 'cd']
for i in x: i.upper() print(x)
Anonymous Quiz
14%
[βabβ, βcdβ]
67%
[βABβ, βCDβ]
9%
[None, None]
10%
none of the mentioned
What is the maximum possible length of an identifier in Python?π€π₯οΈπ§
Anonymous Quiz
25%
79 characters
16%
31 characters
22%
63 characters
36%
none of the mentioned
What does pip stand for python?π€π₯οΈπ§
Anonymous Quiz
7%
unlimited length
10%
all private members must have leading and trailing underscores
67%
Preferred Installer Program
15%
none of the mentioned
Which function is called when the following Python program is executed?π€π₯οΈπ§
f = foo()
format(f)
f = foo()
format(f)
Anonymous Quiz
17%
str()
47%
format()
15%
__str__()
21%
__format__()
What will be the output of the following Python code snippet?π€π₯οΈπ§
x = 'abcd'
for i in range(len(x)): print(x) x = 'a'
x = 'abcd'
for i in range(len(x)): print(x) x = 'a'
Anonymous Quiz
13%
a
35%
abcd abcd abcd abcd
30%
a a a a
21%
none of the mentioned
What will be the output of the following Python code?π€π₯οΈπ§
i = 0
while i < 3: print(i) i += 1 else: print(0)
i = 0
while i < 3: print(i) i += 1 else: print(0)
Anonymous Quiz
19%
0 1 2 3 0
35%
0 1 2 0
32%
0 1 2
15%
error
What will be the output of the following Python code?π€π₯οΈπ§
for i in range(int(2.0)):
print(i)
for i in range(int(2.0)):
print(i)
Anonymous Quiz
19%
0.0 1.0
46%
0 1
24%
error
11%
none of the mentioned
My friends, are you a final year student or just graduated?π€
Join Coding Ninjas pay after placement program. Learn Coding for free & pay only if you get job of Salary Rs. 7-20 Lakh!π
Take one step ahead to join your dream companies like Amazon, Google & Microsoft!π§
100% Job Gurantee!π±
Register for freeπ
https://bit.ly/36FOk1q
Join Coding Ninjas pay after placement program. Learn Coding for free & pay only if you get job of Salary Rs. 7-20 Lakh!π
Take one step ahead to join your dream companies like Amazon, Google & Microsoft!π§
100% Job Gurantee!π±
Register for freeπ
https://bit.ly/36FOk1q
Is the output of the function abs() the same as that of the function math.fabs()?π€π₯οΈπ§
Anonymous Quiz
39%
sometimes
27%
always
23%
never
10%
none of the mentioned
What will be the output of the following Python code?π€π₯οΈπ§
x = "abcdef"
while i in x: print(i, end=" ")
x = "abcdef"
while i in x: print(i, end=" ")
Anonymous Quiz
51%
a b c d e f
18%
abcdef
12%
i i i i i i β¦
19%
error
What will be the output of the following Python code?π€π₯οΈπ§
for i in range(int(float('inf'))):
print (i)
for i in range(int(float('inf'))):
print (i)
Anonymous Quiz
18%
0.0 0.1 0.2 0.3 β¦
22%
0 1 2 3 β¦
15%
0.0 1.0 2.0 3.0 β¦
45%
none of the mentioned
What will be the output of the following Python code?π€π₯οΈπ§
f=lambda x:bool(x%2)
print(f(20), f(21))
f=lambda x:bool(x%2)
print(f(20), f(21))
Anonymous Quiz
29%
False True
23%
False False
19%
True True
30%
True False
The output of the following codes are the same.π€π₯οΈπ§
[x**2 for x in range(10)] list(map((lambda x:x**2), range(10)))
[x**2 for x in range(10)] list(map((lambda x:x**2), range(10)))
Anonymous Quiz
77%
True
23%
False
What will be the output of the following Python code?π€π₯οΈπ§
list(map((lambda x:x**2), filter((lambda x:x%2==0), range(10))))
list(map((lambda x:x**2), filter((lambda x:x%2==0), range(10))))
Anonymous Quiz
28%
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
49%
[0, 4, 16, 36, 64]
14%
Error
8%
No output