121. |
What will be the output of the following Python code?
i = 1
while False:
if i%2 == 0:
break
print(i)
i += 2
|
||||||||
Answer:
Option (d) |
122. |
What will be the output of the following Python code?
True = False
while True:
print(True)
break
|
||||||||
Answer:
Option (d) |
123. |
What will be the output of the following Python code?
i = 0
while i < 5:
print(i)
i += 1
if i == 3:
break
else:
print(0)
|
||||||||
Answer:
Option (b) |
124. |
What will be the output of the following Python code?
i = 0
while i < 3:
print(i)
i += 1
else:
print(0)
|
||||||||
Answer:
Option (b) |
125. |
What will be the output of the following Python code?
x = ""abcdef""
while i in x:
print(i, end="" "")
|
||||||||
Answer:
Option (d) |
126. |
What will be the output of the following Python code?
x = ""abcdef""
i = ""i""
while i in x:
print(i, end="" "")
|
||||||||
Answer:
Option (a) |
127. |
What will be the output of the following Python code?
x = ""abcdef""
i = ""a""
while i in x:
print(i, end = "" "")
|
||||||||
Answer:
Option (c) |
128. |
What will be the output of the following Python code?
x = ""abcdef""
i = ""a""
while i in x:
print('i', end = "" "")
|
||||||||
Answer:
Option (b) |
129. |
What will be the output of the following Python code?
x = ""abcdef""
i = ""a""
while i in x:
x = x[:-1]
print(i, end = "" "")
|
||||||||
Answer:
Option (b) |
130. |
What will be the output of the following Python code?
x = ""abcdef""
i = ""a""
while i in x[:-1]:
print(i, end = "" "")
|
||||||||
Answer:
Option (c) |