Learn String Manipulation by Building a Cipher - Step 41

Tell us what’s happening:

I do not understand the problem. What I need to do?

Your code so far


# User Editable Region

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

for char in text == ' ':
    print()
    char in text.lower():
    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/124.0.0.0 Safari/537.36

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 41

:balloon:Hello @ArjitPrakash!

Welcome to the forum!

This step is ostensibly asking you to compare two values (a boolean test). Here we want to print the result of the comparison to the console.

E.g. if I want to find whether 2 is greater than 1, I might write 2>1 & printing that to the console would look like: print(2> 1)

Does this help?

Keep up the good progress!

Happy Coding! :slightly_smiling_face: