🔍
What is the output of the following? i = 0
while i < 5:
 print(i)
 i += 1
 if i == 3:
 break
else:
 print(0)
a) 0 1 2 0
b) 0 1 2
c) error
d) none of the mentioned
0 like 0 dislike

1 Answer

b) 0 1 2
0 like 0 dislike

Related questions

What is the output of the following? i = 1 while True: if i%0O7 == 0: break print(i) i += 1 a) 1 2 3 4 5 6 b) 1 2 3 4 5 6 7 c) error d) none of the mentioned
Answer : a) 1 2 3 4 5 6...

View solution
0 like 0 dislike
1 answer

What is the output of the following? i = 1 Page No 11 while True: if i%3 == 0: break print(i) i + = 1 a) 1 2 b) 1 2 3 c) error d) none of the mentioned
Answer : c) error...

View solution
0 like 0 dislike
1 answer

What is the output of the following? i = 1 while False: if i%2 == 0: break print(i) i += 2 a) 1 b) 1 3 5 7 … c) 1 2 3 4 … d) none of the mentioned
Answer : d) none of the mentioned...

View solution
0 like 0 dislike
1 answer

What is the output of the following? i = 5 while True: if i%0O9 == 0: break print(i) i += 1 a) 5 6 7 8 b) 5 6 7 8 9 c) 5 6 7 8 9 10 11 12 13 14 15 …. d) error
Answer : d) error...

View solution
0 like 0 dislike
1 answer

hat is the output of the following? i = 5 while True: if i%0O11 == 0: Page No 12 break print(i) i += 1 a) 5 6 7 8 9 10 b) 5 6 7 8 c) 5 6 d) error
Answer : b) 5 6 7 8...

View solution
0 like 0 dislike
1 answer

50.5k questions

47.1k answers

240 comments

7.0k users