Difference btw for and while loop

in the live lecture sir said we can make any program related to loops using any of the two (for and whille loops) loops . how is that possible ?

but how can we make a for loop work if we don’t know number of iterations before hand whereas in we use while loop when we don’t know the exact no of iterations .

Yes the problems that can be solved by for loop can also be solved by while loop and vice versa but in some problems where the number of iterations are not known we prefer while loop rather than for loop . This is the key difference between using a for loop or a while loop.