Stuck at Pig Latin Translator


#1
      
        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.


#2

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.


#3

What is your question? You just posted the instructions.


#4

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
else:
print "Enter An Alphabet" #align the if & else!


#5

what does <<>>mean in your fifth line


#6

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