Learn String Manipulation by Building a Cipher - Step 16

Tell us what’s happening:

I’m rather embarrassingly stumped. I cannot decipher exactly what the prompt requires me to enter. My code has the bit before ‘+ shift’ left blank, but I’ve tried index, alphabet[7], index[7], text[7], alphabet, etc , etc. Could anyone guide me in the right direction?

Your code so far

# User Editable Region

text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
index = alphabet.find(text[0].lower())
shifted =  + 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/ Safari/537.36

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 16

Welcome to the forum @vaughn.m.lewey

Welcome to the forum

  1. Use the index variable you declared as a guide.
  2. The zero in square brackets is accessing a certain position of the alphabet string.
    You’ll need to add something before the shift variable.

Happy coding


Teller is spot on. The directions say to do something PLUS shift.

Your syntax is going to be like this:
declare your variable >>then assign it something >>that something is the alphabet string >>location in the alphabet string is defined as something PLUS shift

You’ve got this.