Build a Caesar Cipher - Step 10

Tell us what’s happening:

def caesar():
text = ‘hello world’
shift = 5
alphabet = ‘abcdefghijklmnopqrstuvwxyz’
shifted_alphabet = alphabet[shift:] + alphabet[:shift]
print(shifted_alphabet)

help me fix this code pls

Your code so far

# User Editable Region
def caesar():
    text = 'hello world'
    shift = 5
    alphabet = 'abcdefghijklmnopqrstuvwxyz'
    shifted_alphabet = alphabet[shift:] + alphabet[:shift]
    print(shifted_alphabet)
# 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/147.0.0.0 Safari/537.36 OPR/131.0.0.0

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

Hey @csipvoid,

Welcome to freeCodeCamp forum!

Create a function named caesar. Put all your existing code within the function body. Pay attention to keep the same indentation level for all of the lines within the function body.

Step is instructing to wrap all your existing code within the function body, but I can only see following lines wrapped up:

    text = 'hello world'
    shift = 5
    alphabet = 'abcdefghijklmnopqrstuvwxyz'
    shifted_alphabet = alphabet[shift:] + alphabet[:shift]
    print(shifted_alphabet)

I would recommend you to reset this step by clicking on the button shown in below image and then retry wrapping the whole code as instructed by the step:

image