STEP 10: We want to create a sprite that is a number cube. To do so, we need an image label!

  • In the LOGIC tab, go to and drag String Variable into the editor.
  • Change the variable name from my_var to label_2.
  • Replace the string to the right of the equals sign with "dice"·+·str(roll2)

We are casting roll2 into a string using str(). We are doing this so we can concatenate (combine) it with "dice"!

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)