EXTEND, PART 1: Let's add a decryption function! This function will essentially be encrypt() but in reverse!

So, we'll pass encrypted_message to decrypt() as an argument. And instead of adding the key to the alphabet position, we will subtract it to find the original letter and therefore decrypt the encrypted message!

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)