Build a Caesar Cipher - Step 17

Tell us what’s happening:

Step 17 Caesar Cipher Difficulty Tried using Grok no good answers there either

Your code so far


# User Editable Region

def caesar(text, shift):
    if True:
        return 'Shift must be an integer value.'

# User Editable Region

    alphabet = 'abcdefghijklmnopqrstuvwxyz'
    shifted_alphabet = alphabet[shift:] + alphabet[:shift]
    translation_table = str.maketrans(alphabet + alphabet.upper(), shifted_alphabet + shifted_alphabet.upper())
    return text.translate(translation_table)


encrypted_text = caesar('freeCodeCamp', 3)
print(encrypted_text)

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.1 Safari/605.1.15

Challenge Information:

Build a Caesar Cipher - Step 17

Hi

Can you please attempt the code following the instructions and the example given of how to use isinstance() to replace the current condition on the if statement. Please post the code you have attempted if you are still stuck