Stuck at pig latin translator


what is the error


your code is wrong, remember, if you want to get some thing should be input that into a variable.
that means: raw_input should be insert after original=

.isalpha() is an string method. you must insert string or variable of string before .isalpha()
for example: "hello".isalpha()


please write the line of the code after correcting it


please reply

if somebody can write incorrect line correctly


original = raw_input("Enter a word: ")
if len(original) > 0 and original.isalpha():
    print "word"
    print "empty"

test it


i did that but dosent work


please help me out!!!


too bad, the asks not say print original.

original = raw_input("Enter a word:")
if len(original) > 0 and original.isalpha():
    print original
    print " not alpha!:/"

and is should say in this part 1 condition is work. not need 2 condition :confused:


thanks a lot it worked:slight_smile:


if i was wrong in
original = raw_input("Enter a word:")
then how did this code ran successful


any answer please!!!


be patient my friends,

your code is correct to work, but not perfect.

the asks in your lesson is about if else. check bottom of left sidebar.

your if condition return True. because, your original = "Enter a word:" (is an string) and your condition is len of original > 0 --> this is True. and instructions may want from you that use if and else in your code. check it again.


sorry! but just now i am dealing with another problem in the next lesson. it trows the following error.

can you please write the incorrect or missing line


instructions part