It uses the value in num to control looping. As long as num > 0, it continues to loop.
To see how the value of num changes add a print statement to print the value of num at the end of the loop...