Lab 2: Super Short Stories
This lab builds student understanding of reporter functions and their inputs. In the introductory story-building activity, students change the inputs to a super short story
block (procedure) that takes multiple inputs, use random word generator blocks as inputs to the super short story
block, and edit the code behind the random word generator blocks.

Editing the list of possible random words for the generator blocks serves as students' first introduction to block-editing, randomness, and lists. As the lab progresses, students use the operators
and
as inputs to super short story
then create a simple plural of
block to abstract away the join
function, and finally edit the super short story
itself to customize it with their own story structure and create their own random word generator blocks. Along the way, students learn about nesting functions, creating and editing functions, and input parameters and arguments, and they build facility with the Snap! interface.
Pacing
This lab may take your students 1-3 class periods (45–110 minutes).
- First Time Tip: Prepare your own quick synopsis as an example for the first day of Computing in the News.
↑ Back to Top
Activity 1: Super Short Story Builder.
-
Materials: Super Short Story Builder student page
-
Prepare:
- For an example of the type of project students are exploring, review the Wikipedia article on Mad Libs.
- Consider working through this activity before class (at least creating a block that has multiple inputs and that uses the
join
block to generate a story).
-
If you intend to do the Optional Offline Pre-Activity described under Activity Plan below (creating a super short story together), prepare a single-sentence story, select several words to vary, and chose a variable/category to describe the type of words that could replace each original word.
- This project allows for some creativity to unfold, and with that creativity comes the potential for problematic text being added to student projects. You may wish to review briefly your classroom norms at the start of class.
-
Learning Goals:
- Learn to change block inputs by typing different text into the input slots.
- Learn to change block inputs by dragging other blocks into the input slots.
- Observe how changing a reporter's inputs influences its output.
- Learn that blocks can have random outputs.
-
Activity Plan:
-
Optional Offline Pre-Activity (5–10 minutes):
- Tell students you have made up a super short story and you need their help to fill in some blanks.
- Ask them for a word from each of the categories you prepared above story, recording their responses as you go.
- Read the resulting story out loud (with their words in place of your removed words).
- Repeat this process with the same story and/or with a second story, and explain that they will be coding ways for the computer to create silly stories like this.
-
Students explore a
super short story
block that generates a short story from its inputs. Students change the inputs and observe the impact on the reported sentence. (5–10 minutes)
- Students then explore several blocks that report random words from various categories (eg, action, job, animal) and use these random word generators inside the
super short story
block. (5–10 minutes)
-
Tips:
- This activity avoids using parts of speech (eg, adjective, adverb, verb) in order to keep reduce the English language prerequisites.
- The sentences generated by the
super short story
block might not always make sense (eg, if the form of a verb does not match). There will be opportunities for students to address some of these issues.
-
Standards:
- None covered in this activity.
↑ Back to Top
Activity 2: Editing a Block.
-
Materials: Editing a Block student page
-
Learning Goals:
- Explore the code behind a block with random outputs.
- Learn to modify an existing block.
-
Activity Plan:
-
Students edit the options for one of the
random
blocks to customize the story. (5–15 minutes)
-
Standards:
- 2-AP-14: Create procedures with parameters to organize code and make it easier to reuse.
↑ Back to Top
Activity 3: Using a Random Number.
-
Materials: Using a Random Number student page
-
Learning Goals:
- Use Snap!'s random number procedure,
, to generate random numbers.
-
Activity Plan:
- Students explore the
pick random
block to determine what it does, and then use it in super short story
. (5–10 minutes)
-
Standards:
- None covered in this activity.
↑ Back to Top
Activity 4: Modifying Inputs with Join
.
-
Materials: Modifying Inputs with
Join
student page
-
Learning Goals:
- Concatenate text using the
join
block.
-
Activity Plan:
- Students explore the
join
block to determine what it does, and then use it to pluralize the output of random animal
. (5–10 minutes)
-
Standards:
- 2-AP-14: Create procedures with parameters to organize code and make it easier to reuse.
↑ Back to Top
Activity 5: Creating a Block.
-
Materials: Creating a Block student page
-
Learning Goals:
- Learn to create a custom block.
-
Activity Plan:
- Students create a
plural of
block that will soon hide the code join ()(s)
code. (5–10 minutes)
-
Standards:
- 2-AP-14: Create procedures with parameters to organize code and make it easier to reuse.
↑ Back to Top
Activity 6: Adding an Input to Your Block.
-
Materials: Adding an Input to Your Block student page
-
Learning Goals:
- Learn to create a block input and use the local variable in its code.
-
Activity Plan:
- Students edit their
plural of
block to contain the code join ()(s)
code and then use it with random animal
in super short story
. (5–15 minutes)
-
Standards:
- 2-AP-14: Create procedures with parameters to organize code and make it easier to reuse.
↑ Back to Top
Activity 7: Editing the Story Structure.
-
Materials: Editing the Story Structure student page
-
Prepare:
- Practice the processes described on the student page before teaching.
- You may wish to quickly model the process of changing, deleting, and adding labels and input variables before students work through this activity (see the student page for instructions).
-
Learning Goals:
- Create and use input variables to customize the story.
- Create additional custom blocks by duplicating existing code.
-
Activity Plan:
- Students continue with the same project.
- They write their own short story and edit the underlying structure of the
super short story
block to match. (15–30 minutes)
- If they have time, they may also write their own
random
blocks.
-
Tips:
- If you have students with proficiency in another language, invite them to create their story in the language of their preference. They might even want to share how their language differs from English and how they had to adapted their project.
-
Standards:
- 2-AP-14: Create procedures with parameters to organize code and make it easier to reuse.
↑ Back to Top
Activity 8: Sharing Your Project.
FROM CSP
Activity 2: Saving Snap! Projects
- Materials: Saving Snap! Projects student page
-
Prepare:
- If you haven't already, create your own Snap! account and sign up for access to BJC solutions and assessments.
- Plan for students' Snap! use. This activity lists three options for how to save Snap! projects. The option you direct students to use will depend on your school and district's policies. Visit the Student Accounts and Privacy page for details behind these options.
- The best option for most schools is Option B, which requires you to set up student accounts in bulk well before the first day of class. Directions are on the Student Accounts and Privacy page.
- Option A is listed first as it is the only option that does not involve student Snap! accounts. If you are not ready for students to set up accounts yet, Option A will let them proceed with their project without losing their work. Students can always import and save their projects later if they make accounts.
- You may find it helpful to review the beginning of the Beauty and Joy of Computing: Snap! Crash Course and perhaps also to familiarize yourself with the structure of the Snap! Reference Manual, which is accessible by clicking the Snap! logo in the top left corner of any Snap! window.
-
Learning Goals:
- Save their Snap! project.
- If applicable, access or create a Snap! account.
- Learn to navigate the Snap! interface.
-
Activity Plan:
- Students save their Snap! project. If applicable, students will also access their Snap! accounts. (5–20 minutes)
-
Tips:
- As mentioned in the "Prepare" section above, the best option for most schools will be Option B, which requires you to set up students account in bulk prior to the lab. See the Student Accounts and Privacy page.
- Some students may already have personal Snap! accounts or would prefer to make their own. Encourage personal use of Snap!, but also insist that students use a student account for their school work.
- If students set up Snap! accounts in class using Option C, consider asking students to enter in your (the teacher's) email address instead of their own. One advantage is that all password reset requests will then go to the teacher, instead of a student email that students may also have trouble accessing. Students' school email addresses may also be more short-lived than teacher addresses, so this potentially reduces instances where students lose access to their projects after they leave a school.
- Snap! users can change their password at any time using the Cloud menu.
-
Users can tell whether they are logged in by checking the Snap! Cloud menu:
- If it says "Logout" and then a user name, then that user is logged in.
- If it says "Login..." then no one is logged in.
If students are using shared computers, they should log out of Snap! when they are done.
- You can also tell at a glance whether anyone is logged into Snap! because the cloud icon will be filled in (white) when someone is logged in.
-
Make note of any questions or difficulties that arise, and please share them with the curriculum developers:
-
Standards:
- None covered in this activity since it focuses on getting set up with Snap!.
-
Materials: Sharing Your Project student page
-
Prepare:
- Review the sharing process described on the student page that cooresponds with the project saving process your students are using.
-
Learning Goals:
- Learn how to share Snap! projects.
-
Activity Plan:
- Students perform the save process appropriate for your class. (5–10 minutes)
-
Standards:
- None covered in this activity since it focuses on using Snap!.
Correlation with CSTA Standards
- 2-AP-14: Create procedures with parameters to organize code and make it easier to reuse. Students should create procedures and/or functions that are used multiple times within a program to repeat groups of instructions. These procedures can be generalized by defining parameters that create different outputs for a wide range of inputs. For example, a procedure to draw a circle involves many instructions, but all of them can be invoked with one instruction, such as “drawCircle.” By adding a radius parameter, the user can easily draw circles of different sizes.