ExamVeda
Login
Home
71
What will be the output of the following Python code?
x = 'abcd'
for i in range(len(x)):
    print(i)
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
72
What will be the output of the following Python code?
x = "abcdef"
while i in x:
    print(i, end=" ")
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
73
What will be the output of the following Python code?
x = "abcdef"
i = "a"
while i in x:
    x = x[1:]
    print(i, end = " ")
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
74
What will be the output of the following Python code?
x = "abcdef"
i = "a"
while i in x[1:]:
    print(i, end = " ")
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
75
What will be the output of the following Python code?
x = "abcdef"
i = "i"
while i in x:
    print(i, end=" ")
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
76
What will be the output of the following Python code?
x = "abcdef"
i = "a"
while i in x:
    x = x[:-1]
    print(i, end = " ")
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
77
What will be the output of the following Python code?
x = "abcdef"
i = "a"
while i in x[:-1]:
    print(i, end = " ")
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
78
What will be the output of the following Python code?
i = 0
while i < 3:
    print(i)
    i += 1
else:
    print(0)
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
79
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)
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
80
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 C
No explanation is given for this question. Let's Discuss on Board