Python | While Loop Quiz | Question 10

Last Updated :
Discuss
Comments

What does the following Python code do?

x = 1
while x < 6:
   print(x, end=" ")
   x += 1
   if x == 4:
       continue
 

Prints numbers in the range [1, 6] with a skip for 4.

Prints numbers in the range [1, 6] without a skip.

Raises a SyntaxError.

Enters into an infinite loop.

Share your thoughts in the comments