Check Yourself... Some More


#1




Could someone please help me out im stuck at this exercise bc i dont know how to use the .isalpha function.
Thats the error message:
File "python", line 6
if raw_input > 0 and .isalpha():
^
SyntaxError: invalid syntax

if i remove .isalpha the code works but says:

Welcome to the Pig Latin Translator!
Enter a Word here: ghh
built-in function raw_input
None


print 'Welcome to the Pig Latin Translator!'

# Start coding here!
raw_input("Enter a Word here:")
original = raw_input
if raw_input > 0 and .isalpha():
   print raw_input
else: 
    print "empty"


#2

You need to assign the .isalpha to the "original" variable


#3

it worked thank you mate


#4

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