STEP 3: Calculations and new math operators are great, but we need to see the results! Let's output them!

Use a comma instead of + for outputting strings with numbers to avoid casting and automatically include spaces.

  • From , drag Output Variable to the bottom of the program.
  • Change the string "my_var is" to "calc_1a is". Change the output variable from my_var to calc_1a.
  • Click Run and try entering numbers that are and aren't factors of 4! What are your results?

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)