Lesson 38 has me blocked -python

hello, stuck at step 38… CANT FIND THE SYNTAX ERROR, and i am about to go mad :upside_down_face:

what’s your code? also step 38 of which project?

1 Like

sorry, it was unspeccific lol

  • Now, replace new_char with encrypted_text . Also, modify the print() call into print('char:', char, 'encrypted text:', encrypted_text) to reflect this change.*

that is what i have to do, but i keep failing
text = ‘Hello World’
shift = 3
alphabet = ‘abcdefghijklmnopqrstuvwxyz’
encrypted_text = ‘’

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

this is the code you should have

this is the string you have

find the difference

1 Like

omg, i been since yesyerday stuck with this part… i was “fixing” the wrong issue.
thank you so muchh

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.