Alright, let me guide you a wee bit more then…
Say num = 5 when you call the function. Then num1 = 5-1 = 4 at the first iteration of the loop. Then you set num = num1 * num = 4 * 5 = 20.
The loop body ends, so the loop condition is checked - is i >= 1? Yes, since it started at 5. So then i becomes 4 and the loop starts again.
The second time around, num1 is set to num - 1 = 20 - 1 = 19…are you starting to see the problem?