Learn String Manipulation by Building a Cipher - Step 16

Tell us what’s happening:

I struggle understanding what’s going on and what exactly i have to do here. Also I’m not a native speaker, so there might be an additional struggle there - I just might not understand linguisticly what is being demanded. I have noone to ask from my surroundings. And I’m a total zero in coding field.
Please - explain to me what’s the logic of this task codewise. Any help is appreciated!

Your code so far


/* User Editable Region */

text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
index = alphabet.find(text[0].lower())
print(index)

shifted = alphabet.find(text[7])+shift

/* 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/119.0.0.0 Safari/537.36 OPR/105.0.0.0

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 16

Many people are struggling with this step, it’s being re-written to be more clear.

You made a good attempt! Use this syntax:

variable = string[var1 + var2]

You are correct up to this point:

shifted = alphabet

Don’t use find.

assign it the alphabet letter at index plus shift.

You have the position of H in the alphabet string. Now you want to find the letter 3 (stored in shift) letters down the alphabet. “Shift” 3 letters along the alphabet to a new letter.

You might find a better explanation in one of the other topics:
https://forum.freecodecamp.org/search?expanded=true&q=Cipher%20-%20Step%2016