How can I know if my translator works properly?


#1

Question

How can I know if my translator works properly?

Answer

We know from the exercises that led to this point how our program should behave, so let’s check for some key aspects:
When pressing Run, I’m prompted for a word
If I enter nothing, it tells me it’s empty
If I enter something that isn’t strictly alphabetical, it tells me it’s empty (we can change this message to be “invalid” or something more descriptive).
If I enter a strictly alphabetical string, it returns the lowercase version with the first letter at the end of the normal word, followed by ‘ay’.


FAQ: Learn Python - Pyglatin - Testing, Testing, is This Thing On?
#5

2 posts were split to a new topic: Why do I Get ythonpa Instead of ythonpay When I Enter Python?


#7

2 posts were split to a new topic: Why is my Translator Not Changing the Input?