Build a Caesar Cipher - Step 23

Tell us what’s happening:

On step 23 it says I need to return a caesar call on both function encrypt and decrypt with text and shift but also to add False to the decrypt caesar call for the decrypt function I did such and upon trying to go to the next step it still says “your decrypt function should return caesar(text, shift, False).”

Your code so far

def caesar(text, shift, encrypt=True):

    if not isinstance(shift, int):
        return 'Shift must be an integer value.'

    if shift < 1 or shift > 25:
        return 'Shift must be an integer between 1 and 25.'

    alphabet = 'abcdefghijklmnopqrstuvwxyz'

    if not encrypt:
        shift = - shift
    
    shifted_alphabet = alphabet[shift:] + alphabet[:shift]
    translation_table = str.maketrans(alphabet + alphabet.upper(), shifted_alphabet + shifted_alphabet.upper())
    encrypted_text = text.translate(translation_table)
    return encrypted_text

# User Editable Region
def encrypt(text, shift):
    return(caesar(text, shift))

def decrypt(text, shift):
# User Editable Region
    return(caeser(text, shift, False))
    
encrypted_text = caesar('freeCodeCamp', 3)
print(encrypted_text)

Your browser information:

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

Challenge Information:

Build a Caesar Cipher - Step 23

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/workshop-caesar-cipher/681a2a6cf95e82ca30866364.md at main · freeCodeCamp/freeCodeCamp · GitHub

are you sure this is the syntax to return?

review other return in the code

but even with the unusual syntax, your issue is a typo

Such a simple oversight man. :pensive_face:
Thank you for the assistance, for some reason I was treating return the same as print.
(also just pretend you didn’t see the typo in caesar pretty please :folded_hands: )