Learn String Manipulation by Building a Cipher - Step 35

Tell us what’s happening:

What am i doing wrong? Im getting indentation error but i did exactly what the question said, i even tried to copy past from the question

Your code so far


# User Editable Region

text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
for char in text.lower():
    index = alphabet.find(char)
    new_index = index + shift
    new_char = alphabet[new_index]
   print('char:', char, 'new_char:', new_char)

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (iPhone; CPU iPhone OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Mobile/15E148 Safari/604.1

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 35

image
This is a good indication that line 10 has something wrong. It’s not properly indented. Each indentation level should be made by 4 spaces.

Also, check the strings you have inside the print. It’s slightly different from what required.