Pyglatin (Check yourself)


Can someone please help me?

Can someone please help me?

print 'Welcome to the Pig Latin Translator!'
original = ""
if len(original) > 0:
print "the user's word".
print "empty"

Start coding here!

raw_input("Enter a word:")

Replace this line with your code.


What this line has actually done is copy the string representation of the raw_input function. We can now write,

>>> user = original("Enter a word: ")
Enter a word: surprise
>>> user

The thing to do is write the raw_input statement like above.


Hi, Thanks for your help but I am afraid I still don't get it... This is how it looks in my computer..

Please see the pic.


You haven't changed that line. Make original equal to the line above it.

original = raw_input( ... )


Hi, Thank you so much for your help.. Now I got it.. But I am wondering why do I need to put (... ) after raw_input.


Remove the line, raw_input( ... ) since it is not doing anything except making you input twice.

The parens contain the function call arguments, which in the case of raw_input() is as you have above, the prompt text. When you see ( ... ) that just means I've left the text bits out of the example.

A tip for the next lessons... Write your new code where print original is, and take that line out. You won't need it once you start adding code to the if statement.


it didnĀ“t work for me


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