For this project, you will need to load the Words, sentences library.
Experiment boldly: Here are some suggestions. You might try other experiments, too.
The goal now is to build plural
, a reporter block that takes a noun as input and outputs the plural of the noun, spelled correctly.
plural
block.
Here's one way to start building that block.
plural
does not work correctly. Write down the words you find. Organize that list, sorting the words into categories according to their last letter. For example, some of the words it gets wrong will be words that end with the letter h. Try to find other words it gets wrong. You will probably find other categories. Save your list. You will need it for future activities.Debugging: One important part of writing code that works is trying to "break" it, trying to find situations in which it does not work. This requires thinking of diverse examples, wild and exceptional cases, sometimes even including inputs that are incorrect in some way.
For now, focus only on real English nouns, typed correctly. Record the ones that plural
spells wrong.
plural
should now work correctly for "day" and "boss" and "medicine," but it probably doesn't yet work correctly for the word "box"
Edit your plural
block to make it work for words that end with x.