Hi, I don’t know if it’s just late and I’m not getting it, but how do I connect the alphabet part to the index and shift. Can anyone help?
The steps are:
As you can see from the output, "h" is at index 7 in the alphabet string. Now you need to find the letter at index 7 plus the value of shift. For that, you can use the addition operator, +, in the same way you would use it for a mathematical addition.
Declare a variable named shifted and assign it the alphabet letter at index plus shift.
My code so far:
text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
index = alphabet.find(text[0].lower())
print(index)
shifted = alphabet.find(index + shift)
It is great that you solved the challenge, but please don’t your full working solution,
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.