Ask your own question, for FREE!
Computer Science 19 Online
OpenStudy (anonymous):

Is it code academy, or is it me? This looks fine, but codeacademy says "Oops, try again. Check your syntax. To check the word is alphabetical you should have original.isalpha(). Use the keyword and to combine multiple conditions in an if statement" print ("Welcome to the English to Pig Latin translator!") original = raw_input("Give me a word.") if len(original) != 0 and original.isalpha(): print (original) else: print("empty or non alphabetical"):

OpenStudy (anonymous):

I can't remember if they are using Python 3 on code academy, are they?

OpenStudy (anonymous):

Also why u have ":" at the end?

OpenStudy (anonymous):

Code Academy doesn't tolerate much creativity. You have to put in exactly what it expects or you will get an "Oops," even if your code would work just as well. Try yours in Python on your computer to see it it works. Then try to guess what they are looking for. They have also been having some "Oops" issues which they are working on fixing. They may see this message and, eventually, fix it for you.

OpenStudy (anonymous):

Maybe it is because print doesnt require () around it. So it should be: print "Welcome to the English to Pig Latin translator!" original = raw_input("Give me a word.") if len(original) != 0 and original.isalpha(): print original else: print "empty or non alphabetical" Ive also removed the : at the end. Javascript does require console.log("Hello") so maybe you are confused with that?

OpenStudy (anonymous):

Okay, took out the parens at the top and it worked. At last I can go on to the next bit of the maze and find the cheese. Thanks for the help!

OpenStudy (anonymous):

Yes, Python 3 (print is a function) is the culprit (u might be better off uninstalling that until after the course if u don't have any need for it just now, use 2.7.3 instead).

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!