Learn String Manipulation by Building a Cipher - Step 34

Tell us what’s happening:

what is going wrong with my code I keep getting the error message?
thank you

Your code so far


# User Editable Region

text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'

for char in text.lower():
    index = alphabet.find(char)
    print(char, index)
    new_index = index + shift
    new_char = alphabet[new_index]
    print=("new_char")

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 34

@kaliod The way you printed new_char is incorrect. You need to do this print(new_char) without having the = sign and the quotation marks "".

1 Like