Code works, but doesn't check for errors in input



The request is to check that the user entered a valid word, my code doesn't do that, it just accepts the input without checking.

I would like to know, is there a way to check for a valid word? If it is not required, then why does the section request it?

word = raw_input('Enter an English word:')
pyg = 'ay'
first = word[0]
piglatin = word[1:len(word)]+first+pyg
print piglatin


This is not a challenge but an exercise where we must follow the instructions, explicitly. In the third or fourth step you will cover simple validation of inputs.


Cheers, I don't think I followed the exercise and did treat it like a test.

Strange thing, I realised my problem almost immediately after posting, but I couldn't delete post.


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