Need help with Pig Latin


I figured out - thanks. Please ignore !


**In the below code: if I leave original = raw_input, it shows an error and doesn't take the count of the input. And if I put raw_input as string then it is fixed. So I am forced to write original=raw_input("Enter a word:) which asks for the input twice.**** Please tell what I am doing wrong?

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

Replace this line with your code.


Are you on #4 Check Yourself! ?


No #3, the one just before that. The code works evenutally but asks for the user inputs twice.



Ok well hopefully your other lessons go smoothly! Happy coding!


So i got the result printed out correctly, but it keeps showing this error.
"Oops, try again. It looks like you printed the correct translation of "name", but make sure to set new_word equal to the slice as well."
Please show me how to fix it. Thanks

pyg = 'ay'

original = raw_input('Enter a word:')
word= original.lower()
first = word[0]
new_word = word + first + pyg
print new_word [1: ]

if len(original) > 0 and original.isalpha():
print original
print 'empty'


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