Unit 1, Module 3 : Interactive Mad Libs

Daily Summary

In our last session you learned how to use the ask block with variables to create a version of "Mary Had a Little Lamb" that asked questions than then used the results to tell a slightly different story.  Today you will work with a small team to create a Mad Lib.

I bet most of you have played with Mad Libs before. You ask a player to provide you with several parts of speech (noun, verb, adjective, etc.) and then their responses are placed into a partially existing story - normally with wacky or crazy results.  For examples you can check out the official Mad Libs website at (www.madlibs.com). 

But for this assignment I would like you to create an interactive story/mad lib based on a popular nursery rhyme.

Hey Diddle Diddle.
The (animal1) and the fiddle.
The (animal2) (past-tense verb 1) over the moon.
The (adjective) (animal3) (past-tense verb 2)
to see such a sight.
And the (noun) ran away with the spoon.

 

 

Activity 1

Last session we learned how to use Ask, variable blocks, and Join to make interactive programs.  In this activity we will review that process.

  1. Consider the following short Scratch program.  What will it do when the program is run?
  2. In a new, empty Scratch program copy down the code above. 
  3. Run it.  Did it do what you predicted?  If not, why not?

 

 

Activity 2

Now suppose we want to make a full blown Mad Lib of Hey Diddle Diddle:

  1. How many questions will you need to ask the human user to complete this Mad Lib?
  2. How many variables will you need to store their responses?  What are good names for each of those variables?
  3. In your Scratch program go to the variables tab and add the needed variables.
  4. In your Scratch program add the required questions to the program BEFORE the wait 1 second block.
  5. After EACH question add the code necessary to store the user's answer.
  6. Finally, at the end of the current program add a series of Say blocks with the appropriate Join blocks and variable pegs so that the Mad Lib is told.
  7. What was the hardest part of this process?
  8. What did you learn in this practice that might help you with your upcoming homework assignment (where you will use ask/say blocks in a similar way)?

 

Call me over to check out your program when you get to this point!

 

Activity 3

Mary had a Little Lamb was made much more interesting by adding some visual elements to the story that changed based on the user's choice(s).  Let's do that here too.

  1. Add the Guitar sprite to your program.  We will pretend this is a fiddle.
  2. Add the Bat sprite to your program.
  3. Between the "say Let's tell a story!" and the "say Hey diddle diddle." blocks add a broadcast that says "broadcast fiddle"
  4. Go to the scripts for the Guitar and the Bat and add show/hide commands:
  5. Go to the costumes tab for the Bat sprite and add two additional costumes for this sprite – perhaps a dog, and a monkey [but you have permission to make this even more customized and pick any three costumes you like].
  6. Change the very first ask block so that instead of saying "Please give me the name of an animal" it says "Please pick between bat, dog, and monkey"  [Note, if you used different sprites in step 2 adjust this to match your decisions].
  7. Go to the code for the bat and add some code to the "When I receive fiddle" block.  This code should use the value of the variable set in the previous step and change the costume of the bat sprite to the appropriate animal/thing.
  8. What was the hardest part of this process?
  9. What did you learn in this practice that might help you with your upcoming homework assignment (where you will use ask/say blocks in a similar way)?
  10. Find some other element(s) of the story you would like to customize in a similar manner.  Call me over to check it out when you have it working!