Expressing a range with 'while"