Home » Programming Language (coding) » Python MCQs » Study the following program: i = 1: while True: if i%3 == 0: break print(i) Which of the following is the correct output of this program?

Study the following program: i = 1: while True: if i%3 == 0: break print(i) Which of the following is the correct output of this program?

Study the following program:

i = 1:
while True:
    if i%3 == 0:
        break
    print(i) 

Which of the following is the correct output of this program?

A. 1 2 3
B. 3 2 1
C. 1 2
D. Invalid syntax

Correct Answer: Option D. Invalid syntax 

Take Part in Discussion:

Your email address will not be published.

Solve : *
27 + 11 =