When is while loop more appropriate than for loop?:

The terminating condition occurs unexpectedly.

The number of iterations is known in advance

The program will be executed at least once

The body of the loop should be executed at least once