I prefer to use while when the variable is relevant outside the loop, but I should not have re-used k. 

To me, a for loop implies/hints that the iteration value is only relevant inside the loop scope, even if you're not actually using loop block scope.