Uploaded by Fatima Al-Thunayan

A simple Madlib

advertisement
A simple Madlib
A file will contain a series of text and prompts for additional words, something like this,
where lines of all capital letters will be prompts for input.
Your
A RELATIVE
was a
A PET ANIMAL
and your
ANOTHER RELATIVE
smelt of
FRUITS (PLURAL)
A user will be asked for items to fill in the blanks and then the resulting text will be
displayed. The output must be reasonably well displayed, with some degree of
relevant word wrap.
Here is a sample interface:
What is the name of the Madlib file? insults
Please supply words for the following prompts:
a relative: mother
a pet animal: hamster
another relative: father
fruits (plural): elderberries
Your mother was a hamster and your father
smelt of elderberries!
There should be at least 10 prompts and enough text to assure that the resulting
paragraph spans to at least three lines of output.
American children are fascinated by -----Adjective------- stuff – like
stories that scare the -----plural noun----- off them or make their ----plural noun----- stand on end. Scientists say this is because being
frightened causes the ------silly word---- gland to function and puts ----type of liquid---- into their blood. And everyone knows that makes kids
feel -----Adjective-------. When they are scared by a movie or a/an ----noun----- , boys laugh and holler and -----verb-----. But girls cover their
eyes with their -----plural noun----- and keep screaming and -----verb
ending in “ing”-----. Most kids get over this by the time they are --Number----- years old. Then they like movies about cars -----verb ending
in “ing”----- or cops shooting -----plural noun-----, or, if they are girls,
they like movies about a boy meeting a/an ----- noun----- and falling in
love. Of course, that can be scary, too.
Download