Pyton Piglatin wont work

print ‘Welcome to the Pig Latin Translator!’

Start coding here!

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"

When I hit run, The circle just spins and nothing happens.
Nothing appears in the box. Please Help

The print commands for your if and else statement require indentation. You should at least be seeing an error report. Perhaps the error report isn’t functioning properly?

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”
^

If correcting your code doesn’t display anything, try resetting the work space or refreshing your browser.

the indent is fine. No format/markup was used, so the indent doesn’t display on the forum

@tofferito6106, raw_input is a function which prompts for input while the programming is running (right most window), you have to provide this input, then press enter to submit

1 Like