I get into a loop (6/11)


In 5/11 I have already checked that my code is correct. Everything worked just fine. 6/11 is just an exercise to double-check if everything works as it should. The code is exactly the same as in 5/11, but suddenly when I run the code and fill in my user input I get into a loop, and it takes a long time until I finally get the answer that I don’t have the correct code solution.

This is my code:

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"

What exactly happens: When I click on “Run” the console asks me to enter a word, and when I do that I get into a loop. About a minute later the word I entered changes itself into “SCT” and the exercise is marked as wrong.

But do I do wrong?


Please link to the lesson.

Save your code, then try with just this to see if we can work around what would appear to be a problem with the SCT.

print 'Welcome to the Pig Latin Translator!'

original = 'surprise'
print original


I haven’t changed anything of the code. But suddenly it works!
Thank you so much anyway!


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