Learn String Manipulation by Building a Cipher - Step 39

Tell us what’s happening:

What exactly am I doing wrong here?

The lesson modules do an absolutely terrible job of guiding you in the right direction; the wording is confusing and it speaks in riddles to “help” you figure it out on your own.

All it has done is discourage me to learn.

Your code so far

text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
encrypted_text = ''

# User Editable Region

for char in text.lower():
    index = alphabet.find(char)
    new_index = index += shift
    encrypted_text = encrypted_text += alphabet[new_index]
    print('char:', char, 'encrypted text:', encrypted_text)

# User Editable Region

Your browser information:

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

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 39

What the hell.

Am I being gaslit here?

removed

I already tried this, but it wasn’t working. I just wasted 20 minutes on this one step and it was an error. :rage: :rage: :rage:

You seem to have moved on to step 40. Do you still need some support for this one?

Please don’t post solution code.

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.

I agree the instructions here are a bit vague. This Python curriculum is new and in Beta, so it’s being evaluated and updated. Your feedback is welcome and valuable, but please don’t come to the forum just to vent and complain.

There is a non-beta legacy Python course here: https://www.freecodecamp.org/learn/python-for-everybody/ maybe you would be interested in something more time-tested.

1 Like

hey! its simple, the code is - REMOVED -
EASY !! keep learning :slight_smile:

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.

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.

1 Like