Computer Science, asked by sharmasachin4740003, 7 months ago

Find the output of the following code:

for x in [10, 15, 20, 25]:

if(x == 20):

break:

print(“the value of x is”, x)

a. Incorrect syntax of break statement

b. No Error

c. incorrect syntax of for loop

d. None of these​

Answers

Answered by avinashsingh3297
3

Answer:

answer will be option A. Because after if statement break statement should be intented .

Explanation:

correct statement will be

if (x==20):

break

print("the value of x is ",x)

Note: In python programming you should check indentation otherwise error will be generated.

Similar questions