Java Basics
Have you ever played the game "Mab Libs?" (http://en.wikipedia.org/wiki/Mad_Libs). The general idea was that one player would have a story and ask another player (who doesn't know the story) for nouns and adjectives, etc. and the end result was that you'd read the pre-written story fitted with their mostly out-of-context words filling in key spots of the story. It usually was pretty funny.
Let's build a Mad Labs game with Javascript … you'll create a script that contains a list of variables. You can either use an array or individual variables. You should use variables that are integers and text. You'll then create your story by concatenating the variables into the story.
For example, to create the story you could take a paragraph like this:
It is a period of civil war. Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire.
You would sub in variables for certain words:
It is a period of <ADJECTIVE> <NOUN>. Rebel <NOUN, plural>, striking from a <ADJECTIVE> <NOUN>, have won their <NUMBER> victory against the evil <NOUN>.
Steps:
1. Come up with three to four sentence paragraph, decide which words you will replace with variables and make a list of corresponding parts of speech. You should ask specifically for "a noun", "an adjective", "a number", corresponding to how many elements you need.
2. In the forum denoted as "Lesson 2 - Mad Libs", post your list of word needs for a classmate to reply to, which you can plug in for the variables.
6 years ago 15
Purchase the answer to view it
- TechnologyJavascriptTask.htm
- 1.PNG
- Relative humidity of 33 and 3
- ACC 305 - Intermediate Accounting III
- as discussed
- PSY 310 Week 1 Individual Assignment History of Psychology Paper
- NUR 405 Week 6 Individual Assignment Persuasive Letter
- IT 242 Week 9 Final Project WAN Design
- EDU 623 Week 4 Assignment Philosophy of Education
- Lab Report
- please respond to my classmate 50-100 words ( its not an essay) (its a greeting) due now
- Evidence-based practice in psychology