WARNING: This program has an error that we need to debug.

You can use a comma between strings and variables to output them without having to cast each value to a string.

  • Click Run and enter a number as input. Read the error message that appears.
  • "cannot concatenate str and int..." is an error that we have solved before by casting numbers using str().
  • This time, fix the error by replacing the plus sign with a comma! This avoids needing to cast to a string.

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)