Pyg Latin: Checking yourself some more


Welcome to the Pig Latin Translator!
Enter a word wrods
Traceback (most recent call last):
File "python", line 5, in
TypeError: object of type 'builtin_function_or_method' has no len()

Looks like it removed my indents when I posted. I have the If/print indented properly. Not sure why it is giving this error

print 'Welcome to the Pig Latin Translator!'

raw_input ("Enter a word")
original = raw_input
if len(original) > 0 and original.isalpha():
    print original
    print "no words".


Cancel, I figured it out. I wasn't assigning raw_input as original in the correct way


Something isn't right about this.

Maybe you intend to put it as:

original = raw_input ("Enter a word")

That said, it should just be:

original = ""


Oops! Okay... :slight_smile:


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