Learn String Manipulation by Building a Cipher - Step 43

Tell us what’s happening:

Help I already to put the print call in every position possible but it still not pass. I’m stuck

Your code so far


# User Editable Region

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

for char in text.lower():
    if char == ' ':
        encrypted_text += char
    else:
    print()
        index = alphabet.find(char)
        new_index = index + shift
        encrypted_text += alphabet[new_index]
        print('char:', char, 'encrypted text:', encrypted_text)

# 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/17.4.1 Safari/605.1.15

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 43

Hi,
You don’t need to add any print calls here.
You have to add an else statement after encrypted_text += char and make sure that the existing print call isn’t included in the else statement.
Reset the step and try doing that. The instructions also point in indenting the lines of code that come inside the else statement.
Good luck!

You should indent the lines of code after your else clause except the print() call.

its talking about the existing print call and not add an additional print call