ExamVeda
Login
Home
81
What will be the output of the following Python code?
x = "abcdef"
i = "a"
while i in x:
    print('i', end = " ")
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
82
What will be the output of the following Python code?
i = 2
while True:
    if i%3 == 0:
        break
    print(i)
    i += 2
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
83
What will be the output of the following Python code?
i = 1
while True:
    if i%2 == 0:
        break
    print(i)
    i += 2
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
84
What will be the output of the following Python code?
x = ['ab', 'cd']
for i in x:
    x.append(i.upper())
print(x)
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
85
What will be the output of the following Python code?
i = 5
while True:
    if i%0O9 == 0:
        break
    print(i)
    i += 1
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
86
What will be the output of the following Python code?
True = False
while True:
    print(True)
    break
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
87
What will be the output of the following Python code?
i = 1
while True:
    if i%3 == 0:
        break
    print(i)
 
    i + = 1
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
88
What will be the output of the following Python code?
i = 1
while False:
    if i%2 == 0:
        break
    print(i)
    i += 2
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
89
What will be the output of the following Python code?
i = 5
while True:
    if i%0O11 == 0:
        break
    print(i)
    i += 1
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
90
What will be the output of the following Python code?
x = ['ab', 'cd']
for i in x:
    i.upper()
print(x)
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board