When is while loop more appropriate than for loop?:

The program will be executed at least once

The body of the loop should be executed at least once

The terminating condition occurs unexpectedly.

The number of iterations is known in advance