SILLY STORIES

PIPER MAKE EDUCATOR RESOURCES SERIES

To do this project, you will need a Piper Make Starter Kit. Get yours here:

Code your own version of MadLibs to create some silly stories!

To get started, head to Piper Make and hit this icon:

Time: 30 minutes

Age Range: 8+

Difficulty: Beginner

In our take on the classic MadLibs game, students will use the Raspberry Pi Pico microcontroller to fill in the spaces of storylines they create themselves. Relying on the basics of variables learned before, students will tap into their creativity to create the most interesting, and random silly stories. This project emphasizes programming skills. No wiring is required in this project.

Note: There are step by step instructions for the students to follow in the tutorials included in each project on Piper Make. These provide directions both for writing code and for building the electronic circuits. The tutorials are well-defined and most students will be able to follow them with little assistance required.

LEARNING OBJECTIVES

Students will:

 

  • Create quick basic commands for real world problems then link to coding concepts
  • Understand computational thinking concepts, including algorithms, sequence of instruction, and variables
  • Create programs that use variables to store and modify data
  • Determine potential solutions to solve simple hardware and software problems using common troubleshooting strategies.

STANDARDS ALIGNMENT

CA Computer Science Standards

3-5.CS.3 Determine potential solutions to solve simple hardware and software problems using common troubleshooting strategies. (P6.2)
3-5.AP.11 Create programs that use variables to store and modify data. (P5.2)
3-5.AP.12 Create programs that include events, loops, and conditionals.
3-5.AP.13 Decompose problems into smaller, manageable tasks which may themselves be decomposed. (P3.2)
3-5.AP.14 Create programs by incorporating smaller portions of existing programs, to develop something new or add more advanced features. (P4.2, P5.3)
3-5.AP.17 Test and debug a program or algorithm to ensure it accomplishes the intended task. (P6.2)
3-5.AP.18 Perform different roles when collaborating with peers during the design, implementation, and review stages of program development.
3-5.IC.22 Seek and explain the impact of diverse perspectives for the purpose of improving computational artifacts. (P1.1)

LANGUAGE OBJECTIVES

CCSS.ELA.L.W.3.8: Recall information from experiences or gather information from print and digital sources; take brief notes on sources and sort evidence into provided categories.


CCSS.ELA.L.W.3.10: Write routinely over extended time frames (time for research, reflection, and revision) and shorter time frames (a single sitting or a day or two) for a range of discipline-specific tasks, purposes, and audiences.


CA ELD.3.C.11: Supporting own opinions and evaluating others’ opinions in speaking and writing


CA ELD.3.C.12: Selecting and applying varied and precise vocabulary and language structures to effectively convey ideas

CONCEPTS

Students will use variables to store words to complete a silly story.

PARTS

Raspberry Pi Pico, breadboard, charging cable

GPIO SETUP

none

OVERVIEW OF STEPS

Step 1: Silly Pip!

Silly stories can be a lot of fun, especially when someone else fills in some of the words.

If you've ever played Mad Libs™ before, this game will be similar, and just as much fun.

Click NEXT to get started.

Step 2: Create a story

The first thing that our project needs is a story. Think of a couple of sentences - they don't even have to be funny or silly. Sometimes the best silly stories come from something very plain.

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:
Poppi is a squirrel.
She lives in a quiet tree.
Everything changed when she got a car!
Once we have our story, the next step is to replace a few of the words with blanks:
Poppi is a ________.
She lives in a quiet ________.
Everything changed when she got a ________!
Now that the story is ready, click NEXT to learn how to program the story into the Pico.

Step 3: Start coding the story

We're ready to start building the code for our story project!

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 the opens up, drag and add item blocks until there are 3 of them total:

Click the blue gear icon again to close the menu.

Why do we need 3 inputs in the create text block? 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 NEXT.

Step 4: Duplicate it!

Right-click the "_" block inside of the create test 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.

Step 5: Add the sentences

Let's look at our story again:

Poppi is a ________.
She lives in a quiet ________.
Everything changed when she got a ________!

Next, let's break the first sentence into 3 parts - before the blank, the blank, and after the blank:

Part 1: Poppi is a
Part 2: ________
Part 3: .

Type part 1: "Poppi is a " into the first "_" block. Notice that there is a space at the end - don't forget to add it in! Then, in the next "_" block, type in part 3: ".". 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.

Step 6: Create the first variable

We are almost ready to let the player's words fill in the blanks in our story, but we need to know what to ask the player first.

Let's look at our story again:

Poppi is a ________.
She lives in a quiet ________.
Everything changed when she got a ________!

What kind of word needs to go in the first blank? An animal, right? That means we need to ask the player to type in the name of an animal.

Before we ask the player, we need a place to store what they type in. Let's create a variable!

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:

Now, we need to type in a question to ask the player. Click in the "_" block inside of the ask block and type "Type in the name of an animal".

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.

Step 7: Add more variables

Let's take one more look at our story:

Poppi is a ________.
She lives in a quiet ________.
Everything changed when she got a ________!

What kind of word needs to go in the second blank? A place or a thing. This kind of word is called a noun. Create a new variable named "noun" 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 noun.

Next, change the text in the second ask block to "Type in a noun". Finally, grab a noun block from the Variables menu and drag it into the middle input of the second create text with block:

The blank in the last sentence of the story needs to be filled with a word that is a thing. Repeat the steps above by duplicating the set noun to block, making a new variable named "thing", changing the text in the ask block to ask the player to type in a thing, and adding the thing block to the last create text with block:

Our program is almost ready! Click NEXT.

Step 8: Adding the finishing touch!

The program will begin by asking the player to type in three words. After they type the words in, we want the console to clear and the program to wait 1 second before printing the story.

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!

Step 9: Try it out!

Let's try out our silly story! Do you think it will work?

Since this game is played using the CONSOLE, click the CONSOLE tab at the bottom of the workspace to open it up.

Next, click CONNECT, then click START.

You should see this in the CONSOLE:

Before you can type in the CONSOLE, you have to click it. When you do, the cursor will start blinking, which means that it is ready for you to type in a word!

Try it out! Type in the name of an animal, 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.

Step 10: Congratulations!

You just built a really cool silly story program! What are some ways to change it up? Could you add a whole new story? Could you have more blanks for more words? 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.