STEP 10: Let's print some output to the Console so that we can see our function encrypting each letter!

  • From , drag Get Value at Index inside the function and if statement. Indented three times!
  • Change my_var to shift_letter and replace my_list[0] with alphabet[shift_index].
  • On the next line, type this code: print("letter is",letter," and shift_letter is",shift_letter)
  • Run the program and enter a message and key. Check the Console to see the print output!

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)