As a native speaker of Portuguese, I think it would look nicer the verbs were all in the same conjugation, simple present. You have "retornar" (return) which is in infinitive form and "escreva" write which is in the present imperative mode. I would choose to put all the verbs in the simple present:
retorna => return faz => do escreve => print
I couldn't find the Portuguese version for "break", but in my opinion it should be "quebra" or "interrompe".
If this project becomes open source, I'll be happy to contribute.