I suppose I should have said "definite" rather than "finite", and yes, a while loop requires an unnecessary extra variable.