Two sprites “talk” to each other and tell a knock-knock joke.
Objective: Students will be program 2 sprites using “say” blocks and “wait” blocks. They will be able to adjust the timing and sequence so they take turns speaking.
Expected Outcome
Students will be able to:
Objectives/Outcome
Dialogue
Prerequisites:
Students should have foundational understanding of:
Vocabulary
Sequence
Algorithm
Event
Project Sample
Sequence
Next
First
Then
Last
Steps arranged in a specific order
Connection
What is wrong with the sequence of this program?
When we create code we need to be careful to put the code blocks in the correct sequence.
Create the Code:
Knock Knock Jokes
Dialogue
Dialogue
Decompose
Add Sprite and Background
Time sprite to say a knock-knock joke
What are some of the code blocks I need?
Step-by-Step
3. Add code to one of the sprites to say the first line of the knock knock joke.
Step-by-Step
4. Add code to the second sprite to say the second line of the knock knock joke.
Step-by-Step
5. Click the flag and test the program so far. What is wrong?
Both sprites are talking at the same time
Step-by-Step
6. To make them take turns use a wait block before the second sprite speaks
Adjust the time to wait until the first sprite finishes talking.
Step-by-Step
7. Add the rest of the lines of the joke to each sprite using say blocks and wait blocks.
Test and Debug
Example Code
Revise
Extensions
Debug
Can you add background music?
Can you add a third sprite to laugh when the joke ends?
Can you add motion or actions for your sprite or costume changes?
Can you code a second knock-knock joke?
Does everything work the way you want it to?
Is there anything you want to change?
CS 3AP-3b Create programs that include sequences, events, loops, and conditionals
CS 3AP-4a Break down (deconstruct) algorithms and list the steps needed to solve a problem into a sequence of tasks and sub-tasks.
CS 3AP-5e Test and debug (identify and fix errors) a program or algorithm to ensure it runs as intended
Vocabulary
Code Blocks
Skills
CODE BLOCKS
SKILLS
VOCABULARY
STANDARDS
Show
Hide
Point towards
Move
Wait
Go to random
If/then
Sensing operator
Start sound
Conditionals
Random
Algorithm
Event