Homework 1: MadLib

Short Description:

Write a program that allows a user to play a mad lib.

This assignment is worth 5 points.

Goals

When you finish this homework, you should

Formal Description

Read chapter 0 and 1 of Eloquent Javascript, Third Edition.

In addition, it might be useful to know that this script:

<script type="text/javascript">
let note = "Hello from the Script!";

document.write("<p>", note, "<p>");
</script>
Produced this output
 

See this example

Write a very simple mad lib game. At a minimum, use the prompt command to get input and the document.write example above to produce output. If you know more html and javascript, you may do other things as well.

You may make up or find your own story for the mad lib, or you might consider using one of these free very short stories..

Your mad lib must have at least three different words or phrases that you request from the user. For example if you use The Bat And The Weasels Fable you might allow the user to provide alternatives for bat, weasel, bird and mouse. This would allow the user to create the story of The Elephant and the Bacteria. Did you know Bacteria are enemies of an Emu?

Please keep your stories rated PG or lower.

I expect this program to be written at the CSCI 130 program 2 level. If you know javascript, or want to work ahead, please use an array, but this is by no means required.

If you are unfamiliar with Mad Libs, see the Wikipedia Page.

Documentation

Please use relative references to your code in the html file. This will allow me to extract the file in my local environment.

Please submit two linked html files.

The first provides

The second page implements the game.

Additional Requirements/Comments

Extras

I find that I want to continue to play with simulations/visualizations of this type. Please do so, but only if you have sufficient time, do not enhance this, or any other project at the expense of your other classes.

Submission

When you have finished your assignment, please create a tar or zip file containing all files needed for this project. Please do not post your project on line until after grades have been assigned.

Submit your tar or zip file To the D2L homework folder Homework 1 by the due date.