Exercise

Function to keep rolling when point is established

Let us code the function that will handle all rolling that occurs after a point has been established. Recall that this means it should continue rolling until either the point is rolled again, or a 7 is rolled. Once either of these happens, it should stop, and report back whether the result is a win or a loss.

Note that within this function, we will again use the roll_dice function that we previously defined.

Instructions

100 XP
  • Fill in the conditions in the while loop to continue rolling until either a 7 or the point is rolled.
  • Fill in the condition to check if the most recent roll will result in a win.