Activity: Casting

STEP 9: Remember, the data type of roll_2 is an integer. We need to cast it to a string.

  • Go to LOGIC, click on and drag in Convert to String. Drop it at the bottom of your program.
  • Change the variable inside of str() from my_var to roll_2.
  • Change the variable to the left of the = from my_var to roll_2_string.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
Support