5/11 of pyg latin problems. please help!


#1

my code looks like this:

print 'Welcome to the Pig Latin Translator!'

name = raw_input("Enter a word:")
original=raw_input
if len(original) > 0 and original.isalpha():
print original
else:
print "empty"

and i keep getting the error code:

Traceback (most recent call last):
File "python", line 6, in
TypeError: object of type 'builtin_function_or_method' has no len()

someone please explain what i am doing wrong!


#2

@zmbehar,

print 'Welcome to the Pig Latin Translator!'

name = raw_input("Enter a word:")
original=name
if len(original) > 0 and original.isalpha():
    print original
else:
    print "empty"

#3

Hello, new to python and i was having a little problem. My code looks real simular to the code you posted and Original Never prints, Empty is always returned. Please help.

print 'Welcome to the Pig Latin Translator!'

original = raw_input("Prompt")

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

else :
    print "empty"

#4

Nevermind I figured it out. .isalpha doe not allow spaces or lowercase.