Build a Caesar Cipher - Step 4

Tell us what’s happening:

please is there something am doing wrong?cuz the ouput seems okay

Your code so far


# User Editable Region

alphabet = 'abcdefghijklmnopqrstuvwxyz'
shift = 5
shifted_alphabet=alphabet[shift:] 
shifted_alphabet=shifted_alphabet + alphabet[0: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/143.0.0.0 Safari/537.36

Challenge Information:

Build a Caesar Cipher - Step 4

Please reset this step and try again. Then concatenate the first part of the alphabet to the value assigned to the existing shifted_alphabet variable.

like in alphabetical order?

Read this part of the instructions:

As you can see from the output, the shifted alphabet starts at the letter f because shift has the value 5. But now the first five letters of the alphabet – a, b, c, d and e – are missing from the shifted alphabet, so you’ll need to add them at the end of the shifted alphabet.

Does it make sense?

No.

Concatenate alphabet[shift:] and alphabet[0:shift] in the existing shifted_alphabet assignment.

What about it doesn’t make sense?

You almost had it here. In fact it works and the result is the same.

Can you try doing this in one line? Edit the existing line, don’t add another one.

ohh thanks the problem was to edit the existing line instead of making a new one