.isalpha not working properly


#1

Hello, my code is working but not properly. the .isalpha suppose to cancel out any word with numbers but now it doesnt matter what i type, the computer will print “empty” , thank you.

print 'Welcome to the Pig Latin Translator!'

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

#2

Did you try after refreshing your browser?

what’s your input?


#3

hey sorry I just figured out why, when I input my word I had pressed spaced after “:” so it would register it as empty, my bad.


#4

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