So I am trying to make a Pig Latin translator as a python exercise. I know that it is supposed to be a really basic project but I don’t see what I’m doing wrong. I believe the problem might be on line 4 where I need to determine what I am supposed to print. If someone could help me figure out the right code so I could move on that would be great!


print 'Welcome to the Pig Latin Translator!'
original = raw_input("Enter a word: ")
if len(original) > 0:
print len(original)
print “empty”


The instructions say to print the user’s word, not the word’s length.


@gearxl I think @overcantor is correct, you told the program to print len() instead of the original.

This is the code I used and it worked.

print ‘Welcome to the Pig Latin Translator!’

Start coding here!

original = raw_input("Enter a word: ")

if len(original) > 0:
print original

print “You did not enter a word”


Thanks for the assistance


I tried the code but it still says that there is an issue in the print original line.


Can you provide the error message? It will help in fixing the issue, could be a simple syntax (whitespace) error.


I figured out what the error was. I was supposed to indent on a few lines. Thank you for the sample code!


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