Explanation
¡Hola! For those of you who don't take Spanish, a verb is conjugated based on the person who does the action. Here's a chart:
English Spanish
I Yo
You Tú
He Él
She Ella
You (formal) Usted
We all Nosotros
You all Vosotros
They (masculine, plural) Ellos
They (feminine, plural) Ellas
You (plural) Ustedes
In Spanish, all verbs end with ar
, er
, or ir
. Here's another helpful chart:
Ar Er Ir
Yo o o o
Tú as es es
Él a e e
Ella a e e
Usted a e e
Nosotros amos emos imos
Vosotros áis éis ís
Ellos an en en
Ellas an en en
Ustedes an en en
Given a pronoun and a verb, print the verb conjugated using the pronoun in the present tense. Don't worry about stem changing and odd verbs.
Examples
Input Output
Yo escribir Escribo
Tu enseñar Enseñas
Ella querer Quere (It should be quiere but ignore stem changes)
If your language doesn't support printing with accents, you can omit them. Otherwise, it shouldn't take any more characters to use á instead of a in your code.
You can find more words with which to test here: http://spanish.speak7.com/spanish_vocabulary_verbs.htm. Note that contester should be contestar.
Challenge: Stem Changes
In Spanish, some verbs have stem changes. Let's take the verb querer
for example. In all forms except nosotros and vosotros, the first e
changes to ie
. So, yo quiero
, but nosotros queremos
. If your program can account for stem changes, you may subtract twice the length of each word you support from your final score. For example, if you support the i
-> ie
change querer
and only querer
, you can subtract twice the length of querer
, or 12, from your score.
For some stem-changing verbs, try this: https://conjuguemos.com/chart.php?language=spanish&id=2&etre=no&commands=no&all=no&source=public
Small Bonuses
Just for fun, if you explain what your code does in Spanish, take off 30 from your score. Don't just use Google Translate or I'll be able to tell that you cheated.
(As I am not a native Spanish speaker, please correct me on any mistakes)