Error in pyg latin program


#1

when i try to run this below code it shows error AttributeError: 'unicode' object has no attribute 'isaplpha'

## print 'Welcome to the Pig Latin Translator!'

## # Start coding here!
## original = raw_input("Enter Word")

## if len(original) >  0 and original.isaplpha():
##     print original
## else:
##     print "empty"

#2

you need to cast the raw_input into a string:

original =str( raw_input("Enter Word"))

#3

now the error is

AttributeError: 'str' object has no attribute 'isaplpha'


#4

stetim94 may i know why we need to do like that ?


#5

the string cast wasn't needed, you simply misspelled isalpha and i missed it.

Sorry, a habit to cast raw_input to a string, but not required for this exercise


#6

yes buddy,, tried without string cast and without mistake.. working fine.. thanks buddy..