"Roelof Wobben" <rwobben at hotmail.com> wrote > It worked now. > x=x+1 must have the same indention als the if then and the return. Or more specifically, it must be indented further than the while statement. The fact thatv the other commands inside the while loop happen to be an if/else is incidental x=1 while x < 10: x = x+1 works as a loop too. Alan G.