6. Pop Quiz!

  1. Pop Quiz!


I was just wondering how would one do to make a space a valid input for the word in the statement. So if original consists of two words it will still get printed. I’m guessing I would have to remove the .isalpha() method altogether since it excludes spaces? But what would allow me to keep excluding numerical values?



print 'Welcome to the Pig Latin Translator!'

# Start coding here!
original = raw_input("Enter a word: ")

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


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