for vs while if you know the time stop, use the for. if you know the condition happen stop, use while