Build a Caesar Cipher - Step 10

Tell us what’s happening:

I’m not sure what I’m doing wrong. The code passed initially, and when I defined the function I indented it all so as to keep it within the function body, yet it still tells me I need to do exactly that. I’ve tried adding further indents to each line and I get an indent error. The same happens if I try to remove an indent.

Your code so far

# User Editable Region
def caesar():
    alphabet = 'abcdefghijklmnopqrstuvwxyz'
    shift = 5
    shifted_alphabet = alphabet[shift:] + alphabet[:shift]
    translation_table = str.maketrans(alphabet, shifted_alphabet)
    return
# User Editable Region

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.5 Safari/605.1.15

Challenge Information:

Build a Caesar Cipher - Step 10

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

Put all your existing code within the function body.

Reset the step and try again. You are missing some lines of code. Original code is 7 lines. Instructions do not mention return so you don’t need to add that.

You were right! I’d messed around with it a few times to try and get it to work which is where the deleted lines and return came in. I went back and copied my original code again and reset and it worked. Tysm!