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
What will be the output of the following Python code snippet?🤔🖥️🧠
for i in ''.join(reversed(list('abcd'))):
print (i)
for i in ''.join(reversed(list('abcd'))):
print (i)
Anonymous Quiz
17%
a b c d
56%
d c b a
18%
error
9%
none of the mentioned
Which of the following functions results in an error?🤔🖥️🧠
Anonymous Quiz
65%
turtle.shape(“turtle”)
13%
turtle.shape(“square”)
12%
turtle.shape(“triangle”)
10%
turtle.shape(“rectangle”)
What will be the output of the following Python code snippet?🤔🖥️🧠
d = {"john":40, "peter":45}
d = {"john":40, "peter":45}
Anonymous Quiz
17%
“john”, 40, 45, and “peter”
22%
“john” and “peter”
29%
d = (40:”john”, 45:”peter”)
32%
40 and 45
What will be the output of the following Python code?🤔🖥️🧠
print("ab\tcd\tef".expandtabs())
print("ab\tcd\tef".expandtabs())
Anonymous Quiz
55%
ab cd ef
14%
abcdef
19%
ab\tcd\tef
13%
ab cd ef
What will be the output of the following Python code?🤔🖥️🧠
print("ab\tcd\tef".expandtabs('+'))
print("ab\tcd\tef".expandtabs('+'))
Anonymous Quiz
29%
ab+cd+ef
44%
ab++++++++cd++++++++ef
17%
ab cd ef
9%
none of the mentioned
What is the output when we execute list(“hello”)?🤔🖥️🧠
Anonymous Quiz
58%
[‘h’, ‘e’, ‘l’, ‘l’, ‘o’]
39%
[‘hello’]
2%
[‘llo’]
1%
[‘olleh’]
What is the output of print(k) in the following Python code snippet?🤔🖥️🧠
k = [print(i) for i in my_string if i not in "aeiou"]
print(k)
k = [print(i) for i in my_string if i not in "aeiou"]
print(k)
Anonymous Quiz
50%
all characters of my_string that aren’t vowels
25%
a list of None
17%
list of Trues
9%
list of Falses