Stuck at Pig Latin Translator

        Break It Down
        Now let's take what we've learned so far and write a Pig Latin translator.

Pig Latin is a language game, where you move the first letter of the
word to the end and add "ay." So "Python" becomes "ythonpay." To write a
Pig Latin translator in Python, here are the steps we'll need to take:

Ask the user to input a word in English.Make sure the user entered a valid word.Convert the word from English to Pig Latin.Display the translation result.


Please explain or state what your problem is to make people understand and clear your doubts. I did not understand, but will try to find out what to do.


What is your question? You just posted the instructions.


word = raw_input("Enter A Word") #Asking For Input
pig = 'ay'
game = word[0] #Gets the first word from user input
tem = word.lower() #lowercase
if (len(word) >0 and word.isalpha()):#checking the the input
new_word = tem[1:] + game + pig #making the new word
print new_word
print "Enter An Alphabet" #align the if & else!


what does <<>>mean in your fifth line


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