PIPER MAKE

EDUCATOR GUIDES


YOU ARE HERE

Base expedition

Mission 6 of 13

Base expedition: Mission 6 of 14

Silly Stories


Intermediate

1 hour

Grades 3 - 8

MISSION OBJECTIVE

Learn to create your own silly stories with coding.

Our scientists back on Earth need to run some simulations! In our take on the classic Mad Libs game, students will fill in the spaces of storylines they create themselves. Students will tap into their creativity to create exciting and random silly stories.

View student interface at make.playpiper.com
MISSION CHARACTERS

Scientist

Commander

Piperbot
MISSION MATERIALS

Computer with USB port and Chrome or Edge browser
Piper Make Base Station or Starter Kit

MISSION RESOURCES

Learning Goals

  1. Students will use the Raspberry Pi Pico microcontroller to fill in the blanks of storylines they create in our take on the classic game Mad Libs.
  2. Students will understand how to create a prompt to input a value that is stored as a variable.
I WILL BE ABLE TO...
  • Use code to fill in the spaces of storylines in a fun game of Madlibs
  • Use variables to store inputs that can then be displayed in the console

Learning Activities

ELA Extension: Silly Story Generator

  • Pair students up or allow them to work independently based on grade level and language ability.
  • Students will begin by generating a randomized silly story prompt using the Piper Code project (e.g., “Piperbot took a banana to space because it needed to power the sun!”). This story starter will serve as the launchpad for a creative writing piece, comic strip, or dramatic skit.
  • Next, students will brainstorm using a graphic organizer to outline key story elements: characters, setting, problem, and solution.
  • Students will then write a 1-, 3-, or 5-paragraph story based on grade level expectations.
    Stories must include:
    • A clear beginning, middle, and end
    • Dialogue between characters
    • A cause-and-effect structure (logical or completely silly)
  • After writing, students will trade drafts with a partner for peer editing and revision. Partners will give feedback on structure, vocabulary use, and creativity.
  • Finally, students will present their final story by reading it aloud, performing it as a short skit, or creating a comic strip version.

Bonus vocabulary words to include: input, random, output, sequence, condition, story

EXTENSION: Display completed stories on a classroom “Silly Story Wall” or post them in a digital gallery with accompanying illustrations or code screenshots.


ELD Extension: Silly Story Swap
  • Pair students up so that each English Learner (EL) is working with a fluent English speaker or a higher-level EL.
  • Each student will begin by generating a silly story starter using the Piper Code project or teacher-provided prompt. Students will then draw a scene that represents their silly story idea.
  • Support students with a word bank that includes: robot, banana, fly, space, friend, chicken, dance, because.
  • In mixed-language pairs, students will take turns explaining their drawings using structured sentence frames such as:
    • "My robot is ___ because ___."
    • "In my story, the ___ went to ___ to find a ___."
  • After sharing, partners will swap drawings and create a short ending for their partner’s story. Students will then share the new version aloud, either in small groups or with the whole class.
  • As a class, reflect on the stories using emotion and description.
    Discuss:
    • Which stories made you laugh the most?
    • What made the story funny, silly, or surprising?
  • Encourage use of adjectives and feelings such as: funny, exciting, surprising, weird, creative.

Math Extension: Silly Story Generator

  • Pair students together or allow them to work independently based on grade level and math readiness.
  • Students will begin by running the Silly Story Generator code multiple times, or use a die-based version with randomized story parts (character, action, setting, reason).
  • Each student will complete at least five story generations and record the key variables from each outcome. Students should log: Character, Action, Setting, and Reason.
  • Using the collected data, students will create a frequency chart or bar graph to represent how often each element appeared.
    Example questions to explore:
    • “Which character showed up the most?”
    • “How many times did the banana go to space?”
    • “What’s the probability of Piperbot dancing with a chicken?”
  • Students will share their findings in small groups or as a class and analyze the randomness of the generator.
    Use discussion prompts such as:
    • “Is the generator fair?”
    • “What patterns or surprises did you notice?”
    • “If we ran it 100 times, what outcomes might we expect?”
  • Encourage students to reflect on how randomness and repetition can still lead to recognizable patterns over time.
Bonus vocabulary words to include: random, variable, pattern, frequency, probability, outcome, data.

Career Connections

Software Developer: Salary $127,260/yr
Electrical Engineer: Salary $127,260/yr
Data Scientist: Salary $103,500/yr
Construction Manager: Salary $101,480/yr

Code Diagram




Tutorial Steps

Silly Stories

Help the Commander run some scenarios to simulate what Piperbot might be up to on Mars!

Hmm I wonder what Piperbot is doing up there on Mars, we should really run some scenarios...
If you've ever played Mad Libs™ before, this game will be similar, and just as much fun.
Click NEXT to get started.

Hmm let's think about some of the things Piperbot might be up to? Like who is hanging out with? What is he eating?
We'll start with this story, and at the end, you can change it any way that you like to make it your own!

Here's the short story we'll start with:
Piperbot is hanging out with a Martian Mouse.
He is eating marshmallows.
Today, they're going to the museum.

Once we have our story, the next step is to replace a few of the words with blanks:
Piperbot is hanging out with a ___.
He is eating ___.
Today, they're going to the ___.

Now that the story is ready, click NEXT to learn how to program the story into the Pico.

Let's input these parameters!
Grab a start block from the Chip menu and drag it onto the workspace. Then, grab a print block from the Chip menu and connect it to the start block.

Next, drag the "_" block out of the print block and set it off to the side in the workspace.

Grab a create text with block and place it into the print block. Put the "_" block into the first input of the create text with block:
Next, click the blue gear icon on the create text with block. In the new menu that opens up, drag and add item blocks until there are 3 of them total:
But Commander, why do we need 3 inputs in our create text block?
Good question, doctor. Each sentence in our story has a beginning, a blank, and an end. We need to make a line of text out of those three pieces.
Click the blue gear icon again to close the menu.

Click NEXT.

Oh I see! Since we have three different sentences, now we can just duplicate that print block right?
Ah yes! But wait, before you do that, you know that the beginning and the end of each of our sentences are defined right? They're going to have text in them, so let's put the appropriate blocks in there so we don't have to do it later!
Right-click the "_" block inside of the create text with block and select Duplicate from the menu. Drag the new "_" block into the last input of the create text with block:
Next, right-click the print block and select Duplicate from the menu. Connect the new block to the end of your program. Do this one more time so that there are a total of 3 print blocks:
Click NEXT.

Let's look at our story again:

Piperbot is hanging out with a ___.
He is eating ___.
Today, they're going to the ___.
Next, let's break the first sentence into 3 parts - before the blank, the blank, and after the blank:

Part 1: Piperbot is hanging out with a
Part 2: ________
Part 3: .
Great, now let's type our part one into the first "_" block. Be sure to add in a space at the end! Then in the next "_" block, type "." -- that's right, just the period!
Now, add the beginning and end of the next two sentences. Don't forget the extra space at the end of part 1 for each sentence:
Click NEXT.

Great! It's almost time to fill in the blanks in our simulation! Now who do we think Piperbot would be hanging out with?
Let's look at our story again:

Piperbot is hanging out with a ________.
He is eating ________.
Today, they're going to the ________.

Commander, do you think it's reasonable to assume that Piperbot is probably hanging out with a creature of some sort? Maybe an animal?
Yes! Now you're getting it! Grab a paper, we're going to brainstorm some animals... Actually better yet, let's create a variable for it!
Click the Variables menu and then click the Create Variable button. Name your new variable "animal".

Click the Variables menu again and drag out the set animal to block and connect it right below the start block. Next, grab an ask block from the Chip menu and place it inside of the set animal to block:
Maybe we can have someone enter the animal when prompted!
Click in the "_" block inside of the ask block and type "Type in the name of an animal".
Great, now let's put the player's answer into the first sentence.
Grab an animal block from the Variables menu and place it the middle input of the first create text with block:
Click NEXT.

Let's look at our story again:

Piperbot is hanging out with a ________.
He is eating ________.
Today, they're going to the ________.

Hmm what kind of word needs to go in the second blank? Something that Piperbot would be eating?
Create a new variable named "food" by opening the Variables menu and clicking the Create variable button.

Right-click the set animal to block and choose Duplicate. Connect the new block right below the set animal to block. Then, change the animal option in the second set block to food.

Next, change the text in the second ask block to "Type in a food". Finally, grab a food block from the Variables menu and drag it into the middle input of the second create text with block:
I see what you're saying! The blank in the last sentence of the simulation needs to be filled with a word that is a place.
Repeat the steps above by duplicating the set noun to block, making a new variable named "place", changing the text in the ask block to ask the player to type in a place, and adding the place block to the last create text with block:
Our program is almost ready! Click NEXT.

By my calculations, the program will begin by asking the player to type in three words, right?
Correct! And then, we want the console to clear and the program to wait 1 second before printing the simulation results.
Grab a console clear block from the Chip menu and insert it right after the set thing to block. Then, grab a wait block from the Chip menu and insert it right after the console clear block:
Click NEXT to try it out!
What are place, food, and animals in this program?
Functions
Commands
Booleans
Variables

Place, food, and animals are variables in our program—coding components that can take on different values based on user entries. Booleans are TRUE or FALSE values, functions are sets of code that execute and return a result, and commands are lines of code that execute different things.

Let's try it out! Since our simulation is played using the CONSOLE, you're going to have to hit the CONSOLE tab at the bottom of the workspace.
Next, click CONNECT, then click START.

You should see this in the CONSOLE:
Type in a place:?
Hmm before I can type in the CONSOLE, it looks like I have to click it!
When you do, the cursor will start blinking, which means that it is ready for you to type in a number!
Okay let's try it out! Type in the name of a place and then press Enter or Return on your keyboard.
Keep answering the next two questions that the program asks, and after you answer the last question, it will show you your silly story!

Click NEXT.

Excellent, we've built a simulation generator! What are some ways we could change this up? Could we enter other parameters?
Experiment and have some fun with it!

When you're ready to try some new tutorials or projects, click EXIT to go back to the start screen.

Blueprint

OPEN IN BLUEPRINT VIEWER  DOWNLOAD

Have an different version? Look for more information on the Support Page.

Troubleshooting Tips

  • Are the prompts missing from the console when you hit START?
    • Ensure that the ask block is in place, as this block requires input from the user in the console.
  • What is a variable?
    • A variable is a value that can change depending on conditions or information passed to the program.

Our customer support specialists are on hand to ensure your implementation of Piper runs seamlessly.
View Support Docs or Contact Support
EXPANDED RESOURCES

Term Glossary


Circuit A conductive path for the flow of current or electricity.

Power The current or flow of electric charge and voltage.

Microcontroller An integrated circuit containing a microprocessor with memory and associated circuits.

Variables A value that can change depending on conditions or information passed to the program. A storage location with a symbolic name used to keep track of a value that can change while a program is running (similar concept to using X and Y in an algebraic equation). Variables are not only numbers; they can also hold text, including whole sentences (strings) or logical values (true or false).

Input Device A hardware device that sends data to a computer, allowing interaction and control.

Output Device A piece of hardware that converts information into a form humans can sense and understand.

View Full Glossary

Standards Alignment