Build a Caesar Cipher - Step 22

Tell us what’s happening:

In the Python certification question step 22:
I have reversed the shift with shift = -shift. I have followed the provided questions to reverse the shift if encrypt is not true. They instead throw an error nameError: name ‘encrypt’ is not defined. When I add a variable or create a new function, this question is considered unsuccessful.

Your code so far


# User Editable Region

if not encrypt: shift = -shift



# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36

Challenge Information:

Build a Caesar Cipher - Step 22

is that all the code you have? where is the rest of the code?