Check yourself


This is what i put in for the exercise:
print 'Welcome to the Pig Latin Translator!'

Start coding here!

raw_input("Type a Word:")
original = raw_input
if len(orignal) >0:
print "Good to Go"
print "Enter Valid Character"

This is the reply i got in the console window:
Welcome to the Pig Latin Translator!
Type a Word: pool
Traceback (most recent call last):
File "python", line 6, in
NameError: name 'orignal' is not defined

I really I'm not sure where i am wrong and i really need some help with this.

Check Yourself!

you should prompt the user for input and store the result of the prompt in original, this is a single line of code

check your spelling


yeah i have gotten through that......Thank you!!


the wrong is in spelling of original
and the raw_input should be raw_input()
the correct code

original = raw_input("Type a Word:")
if len(original) >0:
print "Good to Go"
print "Enter Valid Character"


out of curiosity, why do I have to enter my word twice?


if you code it right, you only need to enter it once

you need one word from the user, why would you prompt twice?


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