I need to declare a variable named shifted and assign it the alphabet letter at index plus shift. I’m not sure how to incorporate the alphabet letter.
Your code so far
/* User Editable Region */
text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
index = alphabet.find(text[0].lower())
print(index)
shifted = index + shift
/* User Editable Region */
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Challenge Information:
Learn String Manipulation by Building a Cipher - Step 16
I still don’t understand this. What exactly is it that I’m looking for? Am i looking for what the 10th character is in ‘Hello World’, because it’s asking me to add index to shift, thus shifting the 7th character 3 spaces to find the 10th character? But there isn’t 10 characters in that variable. So am I looking for the 10th character in ‘abcdefghijklmnopqrstuvwxyz’?
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.