We used our minds well for this project.
Madlibs are old-fashioned party games. They start with stories with missing words. The job of the player (or players) is to fill in those words without knowing the context of the story. They are prompted for a word by its part of speech. Once the words are filled out, the story is revealed and the new words are added in, making a potentially hilarious story.
Most Madlib stories are pre-made, but this program allows one user to choose (copy and paste) or create their own story, and control which words to offer to the players to replace. It does this with two-dimensional arrays that can get very complicated, particularly when one is used to refer to parts in another. For example, one of the lines of code looks like this:
story[replacements[replaceIndex][0]] = newWord.value;
You can find a partner and play my MadLib program here. I hope it's as much fun as the home page promises.
- Jeshuah Whitney
This was a culminating project, so had many learning target components from HS Computer Science:
LT 2: Algorithms
6-8.CT.d.1 Individually and collaboratively compare algorithms to solve a problem, based on a given criteria (e.g., time, resource, accessibility).
9-12.CT.b.2 Represent algorithms using structured language, such as pseudocode or flowcharting.
LT 3: Programming and Development
6-8.CT.d.3 Create a program, individually and collaboratively, that implements an algorithm to achieve a given goal.
9-12.CT.d.5 Use appropriate conditional structures (e.g., IF-THEN, IF-THEN-ELSE, SWITCH)
9-12.CT.d.6 Use appropriate looping structures (e.g., FOR, WHILE, RECURSION) in programs.
9-12.CT.d.11 Engage in systematic testing and debugging methods to ensure program correctness.
9-12.CT.d.2. Decompose a problem by defining functions, which accept parameters and produce return values.
9-12.CT.c Create an appropriate multidimensional data structure that can be filtered, sorted, and searched (e.g., array, list, record)
LT 10: Application Development
9-12.CT.d Use a development process in creating a computational artifact that leads to a minimum viable product and includes reflection, analysis, and iteration