1. What will be the output of the following snippeti=0while i<6 :it=1 if i=3 : break print(i)orWhat will be the output of the following snippet2i=0while i 6 :1+=1 if i=3 : continue print(i)
Q. 1. What will be the output of the following snippeti=0while i<6 :it=1 if i=3 : break print(i)orWhat will be the output of the following snippet2i=0while i 6 :1+=1 if i=3 : continue print(i)
Initialize and Start Loop: Initialize i to 0 and start a while loop that runs as long as i is less than 6.
Increment i: Increment i by 1 in each iteration of the loop.
Check and Skip: Check if i equals 3. If true, skip the remaining part of the loop and continue with the next iteration.
Print Numbers: If i is not equal to 3, print i. This will print all numbers from 1 to 6 except for 3.