Learn String Manipulation by Building a Cipher - Step 40

Tell us what’s happening:

how can i do this? i already added print(char==‘’) like what it is needed to be, but it just cannot pass. i dont understand, please help me, thank you

Your code so far


# User Editable Region

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

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

### Challenge Information:
Learn String Manipulation by Building a Cipher - Step 40
https://www.freecodecamp.org/learn/scientific-computing-with-python/learn-string-manipulation-by-building-a-cipher/step-40
1 Like

note the difference between an empty string '' and a string with a space ' '

1 Like

ok thank you so much for the reminding me that it has to be spaced! i didnt read the “space” tho… but thanks for reminding me!

i was literally stuck here for half an hour dsjfndslfs;f