Coded correspondecnce

Hi, I am doing the off-platform project : https://www.codecademy.com/courses/learn-python-3/informationals/python3-coded-communication And I am having trouble. Here is my code:

alphabet = "abcdefghijklmnopqrstuvwxyz"
punctuation = ".,?' !' "
message = "xuo jxuhu! jxyi yi qd unqcfbu ev q squiqh syfxuh. muhu oek qrbu je tusetu yj? y xefu ie! iudt cu q cuiiqwu rqsa myjx jxu iqcu evviuj!"
translated_message = ""
for letter in messsage:
    if not letter in punctuation:
        letter_value = alphabet.find(letter)
        translated_message +=  alphabet[(letter_value + 10) % 26]
    else:
        translated_message += letter
    print(translated_message)

Now here are the errors:

NameError                                 Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_15880/1942313304.py in <module>
      3 message = "xuo jxuhu! jxyi yi qd unqcfbu ev q squiqh syfxuh. muhu oek qrbu je tusetu yj? y xefu ie! iudt cu q cuiiqwu rqsa myjx jxu iqcu evviuj!"
      4 translated_message = ""
----> 5 for letter in messsage:
      6     if not letter in punctuation:
      7         letter_value = alphabet.find(letter)

NameError: name 'messsage' is not defined

I just can’t figure out how to fix it. Any advice would be appreciated.

Hey!

Double check your spelling of message in the loop :slight_smile:

Happy coding!

1 Like