kletspraat, dat schrijft. Nu kan je de computer zijn taalcapaciteiten verder ontwikkelen met een rapporteurblok,
meervoud, dat een zelfstandig naamwoord als invoer heeft en op de juiste manier het meervoud als uitvoer geeft.
laatste letter vanrapporteert als
2017de invoer is.)
pluralblock. Build this much and test it out on at least "day" and "boss" and "medicine," to make sure it works correctly for those. If it does not, edit and fix it.
pluraldoes not work correctly. List the words you find. Organize that list, sorting the words into categories according to their last letter. For example, it will get wrong some words that end with the letter h. Try to find many words it gets wrong.
Debugging: To write code that works, you want to try to find situations in which it does not work. "Breaking it" requires thinking of wild and exceptional cases, even including inputs that are incorrect in some way, like this example, which has a space at the end.
pluralshould now work correctly for "day" and "boss" and "medicine," but it probably doesn't yet work correctly for the word "box"
plural block to make it work for words that end with x. Test it
to make sure it does work properly.
You can do the same for conjugating verbs in Spanish or some other language you choose. See the Take It Further section at the bottom.
The next two steps are worth learning—very useful for testing
plural and in more
advanced work later on—but not essential for building
mapto test all the words on your list. Leave the slot in
pluralempty, as you see here. The
mapblock inserts each element of the list into that slot and reports a list of the results.
For now, don't worry about the words it still gets wrong, as long as it works for "day," "boss," "medicine," and "box."
pluralwith. Try it. Now explain what the
mapblock does, in general.
last letter ofempty, as you see here. That is the placeholder for
keepto test each word the list. Explain what the