4.0k views
1 vote
What will happen when you run this program?

num = 10
while num > 0:
print (num)

a Syntax Error
b Logical fallicy
c Infinite loop
d Definite loop

1 Answer

1 vote

Answer:

C. Infinite loop

Step-by-step explanation:

num will be printed continuously since it will always be bigger than
0 (
10 is greater than
0, satisfying the condition num > 0) making it an infinite loop since it will go on forever.

Hope this helps :)

User Delsa
by
6.2k points