Rob Spoor wrote:Or remove those 3 separate x = x - 1 statements and add one single x = x - 1 statement as the last statement of the loop, just after the third if-block.
You posted right as I noticed that mistake. Sorry about that, Rob is right.
I had those x = x - 1 statements around because I was messing with the code, trying to do it in more than just one way, and i forgot to comment them out when i moved on to the other chapters.
I also edited my previous post(the actual code) to the way it was supposed to be when using the code magnets from the book.
We don't like screenshots, but we do like code tags which I have added (and removed some excess blank lines) and doesn't it look a lot better.
By the way: nobody seems to have said which page that exercise is on.