Build a Caesar Cipher - Step 20

Tell us what’s happening:

its not giving answer correct even gpt one verified

Your code so far


# User Editable Region

def caesar(text, shift):
    if not isinstance(shift, int):
        return 'Shift must be an integer value.'
    
    if shift < 1 or shift > 25:  # ← Add "or shift > 25" here
        return 'Shift must be an integer between 1 and 25'  # ← Exact message
    
    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)


# 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 20

Hi

You’re missing something at the end of your text. Check again.

Not quite the exact message. :wink: Check your punctuation.

I guess gpt isn’t useful then