86). What will be the output of the following Python code snippet?
bool(‘False’)
bool()

[A] True True
[B] False True
[C] False False
[D] True False

Show Answer

87). What will be the output of the following Python code snippet?
['hello', 'morning'][bool('')]

[A]error
[B]no output
[C]hello
[D]morning

Show Answer

88). What will be the output of the following Python code snippet?
not(3>4)
not(1&1)

[A]True True
[B]True False
[C] False True
[D]False False

Show Answer

89). What will be the output of the following Python code?
['f', 't'][bool('spam')]

[A]t
[B]f
[C]No output
[D]Error

Show Answer

90). What will be the output of the following Python code?
l=[1, 0, 2, 0, 'hello', '', []]
list(filter(bool, l))

[A]Error
[B][1, 0, 2, 0, ‘hello’, ”, []]
[C][1, 0, 2, ‘hello’, ”, []]
[D][1, 2, ‘hello’]

Show Answer

91). What will be the output of the following Python code if the system date is 21st June, 2017 (Wednesday)?
[] or {}
{} or []

[A][] {}
[B][] []
[C]{} []
[D]{} {}

Show Answer

92). What will be the output of the following Python code?
class Truth:
	pass
x=Truth()
bool(x)

[A]pass
[B]true
[C]false
[D]error

Show Answer

93). 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")

[A]error
[B]hello
[C]good
[D]bad

Show Answer

94). Which of the following Boolean expressions is not logically equivalent to the other three?
if (9 < 0) and (0 < -9):
    print("hello")
elif (9 > 0) or False:
    print("good")
else:
    print("bad")

[A]not(-6<0 or-6>10)
[B]-6>=0 and -6<=10
[C]not(-6<10 or-6==10)
[D]not(-6>10 or-6==10)

Show Answer

95). What will be the output of the following Python code snippet?
not(10<20) and not(10>30)

[A]True
[B]False
[C]Error
[D]No output

Show Answer