I am completely stuck on assigning the variable index to alphabet.find(char)
Your code so far
text = ‘Hello World’
shift = 3
alphabet = ‘abcdefghijklmnopqrstuvwxyz’
index = alphabet.find(char)
/* User Editable Region */
text = ‘Hello World’
shift = 3
alphabet = ‘abcdefghijklmnopqrstuvwxyz’
index = ‘alphabet.find(char[0].lower())’
/* User Editable Region */
### Your browser information:
User Agent is: <code>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0</code>
### Challenge Information:
Learn String Manipulation by Building a Cipher - Step 23
https://www.freecodecamp.org/learn/scientific-computing-with-python/learn-string-manipulation-by-building-a-cipher/step-23
welcome to the forum @ahmed.yangbo , please open your own topic to ask for help
If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Ask for Help button located on the challenge (it looks like a question mark). This button only appears if you have tried to submit an answer at least three times.
The Ask for Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.
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.
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.
Sanity solved it for you above.
but you have to declare the variable and its value after the for loop.
You have to be careful with your indentation.
hope this helps.