What is wrong with my code :/


print 'Welcome to the Pig Latin Translator!'

raw_input("Enter a word:")
if len(original) > 0:
print original


Hello, @terarockstar62850!
The problem is that you didn't store the value you got after prompting the message "Enter a word:" for the user.
You should've done:

original = raw_input("Enter word:")

Best regards,


you shouldn't do it this way :slightly_smiling:

raw_input() is a function, and you just take the function and assign it to a variable (you should've written raw_input(), but no worries)

Instead, try:
original = raw_input("Enter a word: ")
which will assign the entered word to the variable "original" :smiley:


Thanks guys!This website is amazing!


if i want to use isalpha function what would be the condition ?
ans syntax


You could add that to the same line as the

if len(original) > 0:

just put an "and" to it:

if len(original) > 0 and original.isalpha():


Does it work if I do it as?

original = raw_input()

or do I have to do

original = raw_input("Enter a word:")

If yes to the latter, can you explain what would happen differently between the two? Ty


@micac: The raw_input() function is used to prompt a message to the user, if such exist between the parentheses, and will line a line from input, convert into string and return that to you.
The difference bewteen both is that one will print a message to let the user know what he/she will do while the other will simply wait for the user to inform something but will not print any sort of instruction.