Learn String Manipulation by Building a Cipher - Step 16

idk i dont get what else its asking for.
it prints ‘k’ which is ‘h’ shifted 3 times.

instructions are:
Declare a variable named shifted and assign it the alphabet letter at index plus shift .

Your code so far



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


# 

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 16

Welcome to our community!

The index should be put between square brackets [], not between parentheses (). Delete the parentheses around the index searched for in the alphabet.

Thanks for reply.
do you mean this?

shifted = alphabet[shift + index]

if so that still does not pass.
it gives this tip:
You should assign the alphabet letter at the index index + shift to your new variable.

index + shift, not shift + index. Read the instructions again.

1 Like