Super Short Story Builder

For next revision: consider making shorter stories with fewer inputs per teacher feedback on https://piazza.com/class/h8yx482idav52y?cid=3568. --MF, 8/18/21
In this activity, you'll use functions to write one-sentence stories.

Playing with a Story Builder

    The join words is a custom block, right? Should we call that out? -- PF 8/20/21

  1. Open this Super Short Stories project.
  2. Click the Super Short Story block, and read the bubble that appears.
    Super Short Story, feeling: (happy) job: (teacher) action: (jumps) place: (Central Park) action: (races) number: (7) color: (red) plural animal: (cats) food: (stir fry)
  3. Change some of the inputs to the Super Short Story block, and click it again.
  4. Talk with Your PartnerWhat happens to the story reported in the bubble?
  5. Find one of these random blocks in the palette on the left side of the screen, and click it several times.
    random feeling random job random action random place random color random food
  6. These blocks don't take any inputs, but since they are reporters, they still report an output. Talk with Your Partner The super short story block always reports the same thing if given the same inputs. What do these blocks report?
  7. Drag some of the random blocks into the Super Short Story block, and run the Super Short Story block a few times.
    Super Short Story, feeling: (random feeling) job: (teacher) action: (jumps) place: (Central Park) action: (races) number: (7) color: (red) plural animal: (cats) food: (stir fry)
  8. Talk with Your Partner What happens to the story that is reported?

Editing a Block

Some blocks are built into Snap! and can't be changed, but Snap! programmers (including you!) can also make and edit their own custom blocks. The random blocks in this project are custom blocks that you can edit.

  1. Choose one of the random blocks (random feeling, random job, random action, etc.), right-click it, and select "edit…" from the menu that appears.
    Tips:

This custom block reports a random item from a list of jobs.
random job: {report (item (random) of (list (artist) (computer programmer) (cashier) (musician) (landscaper) (nurse) (plumber)))}

  1. Change some of the items in the list for the block you are editing. (That is, change some of the colors to other colors, some of the jobs to other jobs, or some of the places to other places, etc.)
    Tip: You can add additional items to the list or reduce the number of items in the list by clicking the arrows at the end of the list block (◄ ►).
  2. When you are finished, click the "OK" button, and try clicking the block that you edited several times to make sure that it reports a random item from the list you edited.
    Tip: If it doesn't work right, edit the block again and also edit another one of the random blocks at the same time. Compare the code for your edited random block that isn't working with the random block that is working.
  3. Once you have a working revision to a random block, try it out in your Super Short Story block.
  4. Edit a few other random blocks to customize the story further.
  5. Save your work
In this activity, you used randomness to make a story more interesting and edited lists inside custom blocks.