Computer Science

Predict the output of the following code fragments:

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

Python

Python Control Flow

35 Likes

Answer

Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello

Working

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

Answered By

11 Likes


Related Questions