71. |
What will be the output of the following Python code snippet?
['hello', 'morning'][bool('')]
|
||||||||
Answer:
Option (c) |
72. |
What will be the output of the following Python code snippet?
not(3>4)
not(1&1)
|
||||||||
Answer:
Option (b) |
73. |
What will be the output of the following Python code?
['f', 't'][bool('spam')]
|
||||||||
Answer:
Option (a) |
74. |
What will be the output of the following Python code?
l=[1, 0, 2, 0, 'hello', '', []]
list(filter(bool, l))
|
||||||||
Answer:
Option (d) |
75. |
What will be the output of the following Python code?
if (9 < 0) and (0 < -9):
print(""hello"")
elif (9 > 0) or False:
print(""good"")
else:
print(""bad"")
|
||||||||
Answer:
Option (c) |
76. |
Which of the following Boolean expressions is not logically equivalent to the other three?
|
||||||||
Answer:
Option (d) |
77. |
What will be the output of the following Python code snippet?
not(10<20) and not(10>30)
|
||||||||
Answer:
Option (b) |
78. |
What will be the output of the following Python code snippet?
X=”hi”
print(“05d”%X)
|
||||||||
Answer:
Option (d) |
79. |
What will be the output of the following Python code snippet?
X=”gtu-chandkheda”
print(“%56s”,X)
|
||||||||
Answer:
Option (a) |
80. |
What will be the output of the following Python expression if X=345?
print(“%06d”%X)
|
||||||||
Answer:
Option (b) |