I don't know where is wrong?


#1



word=raw_input("please input a word in English!")
if (len(word) >0 & word.isalpha()):
    word=word.lower()
    first=word[0]
    old_word=word[1:len(word)]
    PigLatin=old_word+first+ "ay"
    print PigLatin

here the Warning:

Oops, try again. It looks like you printed "please input a word in English!" instead of "Pig Latin"


#2

Hi, @adasong ,

Did you use the names for the variables that are specified in the instructions?

What is the purpose of this comparison? ...

raw_word>0

#3

I will change the variable name and try it again, and the code" raw_data > 0" means raw_data is not null, But actually it's should be "len(raw_data) > 0" , thank you very much!


#4

Codecademy actually would like you to do this ...

original = raw_input("Please input a word in English!")

... so that the user's input is stored as original.

You can use the variables word and first to perform some of the translation.

The final result of the translation should be stored as new_word.


#5

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