Pyg Latin .isalph() help plz!


#1

name = raw_input("What's your name?") # Start coding here!
original = raw_input
raw_input("Enter a word:")
x = raw_input

if len(original) > 0 and x.isalpha():
print word
else:
print "empty"


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


I have no idea what the problem is, I've been stuck for hours...


#2

@wickydooda,

-1

You are making a mess, with your raw_input
Do a google search
and then do some reading to get a feel as what it is all about
== the Book ==
python raw_input site:python.org

== discussions / opinions ==
python raw_input site:stackoverflow.com

-2

You are printing the variable =word= which is NOT defined....


#3

original = raw_input ("What's your name?")
if len(original) > 0 and original.isalpha():
print original
else:
print "empty"

Your code should look like this. Try my code and see the differences.


#4

There is a bug in the module that does not allow you to submit the code as intended. Check out my post that I made to have this fix CodeCademy Bug - Please Fix. @stefan_mocodean has posted correct code that works, but this does not seem to be the original intent of the course.

The way you have your code should result in two entries which is not needed, you only need the first so you could delete line 3 and 4.