6. Pop Quiz!


#1
  1. Pop Quiz!

Hello,

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?

Regards,

Manuel


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
else:
  print "empty"



#2

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