Python - While Loop
What will be the output of this code snippet?
num = 0
while num < 4:
if num == 2:
break
print(num)
num += 1
else:
print('Completed')What will be the output of this code snippet?
num = 0
while num < 4:
if num == 2:
break
print(num)
num += 1
else:
print('Completed')15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions