STEP 6: Now let's change the image to match our random number!

Using the Change Image tool allows us to match the dice image to the random number each time the loop runs!

  • In GRAPHICS, click on . Drag out Change Image and drop it INSIDE your loop.
  • Change the image label in the .load_image() command to "dice" + str(outcome)

Remember, str() temporarily treats the value outcome as a string, so it can be combined with the string "dice".

# THIS ACTIVITY IS IN PREVIEW ONLY MODE