Stuck on Python


File "python", line 6
print .isalpha(original)
SyntaxError: invalid syntax

print 'Welcome to the Pig Latin Translator!'

# Start coding here!
original = raw_input("Enter a word:")
if len(original) > 0 and len(original) < 1:
    print .isalpha(original)
        print "empty"

Replace this line with your code.


Hi @skhande2,

This example given in the instructions demonstrates the syntax for calling the isalpha() method ...

x = "J123"
x.isalpha()  # False

You need to use that syntax.


First off, I'm pretty sure isalpha() is a condition that's meant to go in the if statement along with len().

Second, isalpha() isn't run through parameters, but something I believe is called dot notation.

It basically means you follow this syntax: variable.isalpha()


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