I just started learning how to code on codeacademy, and one of the things you have to make there is a pig latin translator.
I tried making it on Atom today, and got this error:
Traceback (most recent call last): File "/home/musse/Programming/Python/Tests/aowdjaoiwjd.py", line 5, in <module> word1 = raw_input("Please enter the word you desire to translate:") NameError: name 'raw_input' is not defined [Finished in 0.326s]
This is my code:
# The pig latin translator pig = "ay" word1 = raw_input("Please enter the word you desire to translate:") if len(word1) > 0 and word1.isalpha(): word2 = word1 word3 = word1 + word2 + pig word3 = word3[1:len(word3)] print(word3) else: print("The word you've enter is not accepted. Please try another one.")