Learn String Manipulation by Building a Cipher - Step 40

Tell us what’s happening:

This is making no sense, what do you mean by Comparing thats a English word to compare something to another thing, and the problem is not indicating me exactly where at the beginning of the loop body to print the “result” i think this needs to improve because how exactly am i supposed to put the code and where, and i have researched and read the "Read-Search method

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)

# 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/131.0.0.0 Safari/537.36

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 40

the printing is in the right place, the issue is that '' is not a space, to be a string with a space inside you need to add a space

1 Like

add a space where exactly?

ok i got it, thank you