Build a Caesar Cipher - Step 4

Tell us what’s happening:

Hi. Once again, I’ve looked it up and haven’t found anything to help me. I’m stuck on step 4 of Build a Caesar Cipher in the Python course.

Your code so far


# User Editable Region

alphabet = 'abcdefghijklmnopqrstuvwxyz'
shift = 5
shifted_alphabet = alphabet[shift:]
print(shifted_alphabet)
shifted_alphabet = alphabet[0:shift] + alphabet[shift:]

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:142.0) Gecko/20100101 Firefox/142.0

Challenge Information:

Build a Caesar Cipher - Step 4
https://www.freecodecamp.org/learn/full-stack-developer/workshop-caesar-cipher/step-4

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.

Are you adding the missing part of the alphabet onto the end of the shifted alphabet?

I thought I was. :grinning_face: Should I have another line of code or fix the one I have?

you should not be adding a new line in this step at all

You should be modifying the top line of code here, instead of adding that bottom line of code. Ensure that you are concatenating the right way around too.

Thank you! It took me awhile, but I finally got it.:grinning_face:

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge. How to Help Someone with Their Code Using the Socratic Method

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.