Study the following program: x = 1 while True: if x % 5 = = 0: break print(x) x + = 1 What will be the output of this code?

- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

Question:
Study the following program: x = 1  
while True:  
    if x % 5 = = 0:  
        break  
    print(x)   
    x + = 1   What will be the output of this code?

1.error

2.2 1

3.0 3 1

4.None of these

Posted Date:-2021-01-22 09:02:56


More MCQS Questions and answers

Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!