Python | While Loop Quiz | Question 8

Last Updated :
Discuss
Comments

What is the output of the following Python code?

count = 0
while count < 3:
   print("Hello")
   count += 1
else:
   print("Else block")
 

Prints "Hello" three times and then prints "Else block."

Prints "Hello" four times.

Prints "Else block" three times.

Raises a .SyntaxError

Share your thoughts in the comments