WARNING: This program has a logic error! It doesn't create an error message, but it's not doing what it should.

RULE: String formatting uses {curly brackets} to indicate where variables should go in a string.

  • Click Run and read the output in the console.
  • Fix the program by adding another set of {} so that both friends' names are printed.
  • Click Run to see if you fixed the program. When it is fixed, click Submit and Next.

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)