CBSE Class 11 Computer Science Question 106 of 161

Flow of Control — Question 15

Back to all questions
15
Question

Question 11a

Predict the output of the following code fragments:

count = 0         
while count < 10:
    print ("Hello")
    count += 1

Answer

Output
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Explanation

The while loop executes 10 times so "Hello" is printed 10 times

Answer