Computer Science
Grade 2
20 min
Collaborative Project 2: Creating a Collaborative Story Generator
Work together to create a collaborative story generator, with each team member contributing different story elements.
Tutorial Preview
1
Introduction & Learning Objectives
Learning Objectives
Work with a partner to plan a short story.
Add one part of a story using a code block.
Take turns coding with a teammate.
Combine code blocks from different people to make one program.
Run the program to see their collaborative story.
Explain their team's story to the class.
Want to build a super silly story with your friends? 🤖 Let's code one together!
Today, we will be a team of storytellers! We will use code blocks to build a funny story generator, piece by piece.
Real-World Applications
Making a movie with a team 🎬
Building a big LEGO castle with friends 🏰
Writing a comic book together 🦸
Creating a fun play for the class 🎭
2
Key Concepts & Vocabulary
TermDefinitionExample
CollaborateWorking together on the same project. It means sharing ideas! 🤝You draw the hero, and your friend draws the silly monster.
Story PartOne piece of the story. It can be a character, a place, or an action. 🧩Your story part could be 'a brave little mouse'.
GeneratorA program that makes something new each time you run it. 🎰Our story generator will make a new, funny story every time we click 'run'.
SequencePutting things in the right order. First, next, then last. 🔢First, we meet the hero. Next, they find a treasure. Last, they go home.
Team RoleA special job each person has on the team. 🧑🚀Your role is 'Character Creator'. Your friend's role is 'Action Expert'.
CombinePutting all the small code parts together t...
3
Core Syntax & Patterns
One Part, Then Pass 🤝
Each person adds one code block for their story part, then lets the next person have a turn.
Use this rule to make sure everyone gets to add to the story. It keeps the project fair and fun.
Plan Before You Code 🗺️
Talk with your team about the story first. Who is the hero? Where are they?
Use this rule before you start coding. A good plan helps your story make sense and is easier to code.
Connect the Blocks 🔗
Make sure your code block connects to your friend's code block to build the story.
When it's your turn, find the last block and add yours. This creates the story sequence.
4 more steps in this tutorial
Sign up free to access the complete tutorial with worked examples and practice.
Sign Up Free to ContinueSample Practice Questions
Challenging
Your team's story generator lets you choose a hero: a knight or a wizard. The story crashes ONLY when you choose the wizard and try to use a magic spell. What is the MOST likely bug?
A.'wait' block is missing from the knight's code
B.The computer is too slow to run the story
C.There is a problem with the 'magic spell' code that is specific to the wizard character
D.The background for the wizard is the wrong color
Challenging
Your team disagrees on the story's ending. Half the team wants a happy ending, and half wants a surprise, funny ending. What is the BEST collaborative solution?
A.Have the team leader decide the ending for everyone
B.Create two separate projects
C.Let the person who is the fastest coder decide
D.Code the story so it can randomly choose between the happy ending and the funny ending
Challenging
Your friend made a loop to make a boat rock back and forth. They used a 'turn right 15 degrees' block and a 'turn left 15 degrees' block. But the boat just wiggles in one spot. What is likely missing from their loop?
A.'wait' block between the turns to make the movement visible
B.'say' block
C.'change color' block
D.'go to random position' block
Want to practice and check your answers?
Sign up to access all questions with instant feedback, explanations, and progress tracking.
Start Practicing Free