Note 8.11.1.
This program violates the usual advice to do updates at the end of the body. All the updates (rolling dice, and incrementing tries) happen at the start of the body. When you construct a loop so that it always has to run at least once and processes even the last value produced by the update, this reversed structure can be easier to read. “Make a new value, do work with it, then if needed, continue.”