Lesson 7 - Panda - S Travel - Lesson Plan
Lesson 7 - Panda - S Travel - Lesson Plan
Panda’s Travel
Objectives
By the end of class, students will be able to…
● create a program in mBlock which incorporates a conditional statement;
● use motion blocks to control the rebound and rotation of a sprite;
● define conditional statements;
● describe the functionality of a computer program.
Overview
In this lesson, students create a mBlock project that showcases places that Panda has visited on Earth.
Students help Panda turn around and walk in the opposite direction when reaching the edge of the
stage. Using a conditional statement, students program mBlock to decide to run specific blocks only
when a condition is true.
Key Focus
● Use conditional statements to decide whether to run specified blocks.
Pre-lesson Checklist
For Teacher:
● A computer with mBlock software installed or access to the mBlock software website
● Slides Presentation: Lesson 7 – Panda’s Travel - Visual
For Student:
● A computer with mBlock software installed or access to the mBlock software website
Standards
● CSTA 2-AP-13: Decompose problems and subproblems into parts to facilitate the design,
implementation, and review of programs.
● ISTE-1D: Students understand the fundamental concepts of technology operations, demonstrate
the ability to choose, use and troubleshoot current technologies and are able to transfer their
knowledge to explore emerging technologies.
© education.makeblock.com
1
● ISTE-5C: Students break problems into component parts, extract key information, and develop
descriptive models to understand complex systems or facilitate problem-solving.
● ISTE-6A: Students choose the appropriate platforms and tools for meeting the desired objectives
of their creation or communication.
● ISTE-6B: Students create original works or responsibly repurpose or remix digital resources into
new creations.
● ISTE-6D: Students publish or present content that customizes the message and medium for their
intended audiences.
Lesson Plan
Panda is learning so much about our culture during his time on Earth. But Panda wants to learn more. So
Panda decided to take a site-seeing trip and took many pictures along the way. Help Panda prepare a
slideshow of all of the exciting places visited on his trip.
© education.makeblock.com
2
Explore a mBlock Program – Panda’s Travels
1. Play the video recording of the program Panda’s Travels.
2. Have the students write an explanation of the program. Use the following to guide the student if they
need additional support.
■ Panda bounces/moves in the opposite direction when reaching the edge of the stage.
■ Panda rotates or flips to the opposite direction when reaching the edge of the stage.
■ Background changes when Panda reaches the edge of the stage.
Note, this example program is the example for the Independent Practice for this lesson. Take care not to
show the code to the students during this portion of the lesson. A video recording of the program has been
provided for your convenience.
Assessment
● Review the students' work. Were they able to describe the functionality of the program?
© education.makeblock.com
3
Assessment
Have students write a paragraph or diagram comparing and contrasting the programs above. You can also
have students write out a pseudocode (a short description) of each of these programs.
Make sure students provide an accurate description of the following blocks:
Some of the observations about the blocks above that students should be able to explain are:
● These blocks allow a sprite to appear to turn around instead of getting stuck at the edge of the
stage.
● The left-right rotation style keeps the sprite from turning upside down when it bounces on the edge.
If time permits, encourage students to try the other two rotation forms and observe the different effects.
© education.makeblock.com
4
Conditional Statements
Play a game similar to Simon Says with your class to demonstrate conditional statements.
With your students, read each statement below and have the students obey the command. (Feel free to
write your own commands for your students.)
1. IF your name has the letter “S” in it, THEN raise your hand.
2. IF you have a pet cat, THEN clap your hands.
3. IF you play a sport, THEN stomp your feet.
4. IF you are wearing socks, THEN touch your feet.
5. IF your favorite ice cream is chocolate, THEN say “Yum.”
Share with students that these commands are examples of conditional statements. In programming, conditional
statements are used to perform specific actions if a condition is true.
In previous lessons, Event blocks were used to trigger a program. We have learned to use these two Event
Program Description
Blocks
Block Function
Area
© education.makeblock.com
5
Sensing block used in a conditional
statement to determine if a condition is
met.
Instruct the students to write their program according to the steps below:
1 Find and select the appropriate blocks from the Block Area to create the following program.
2 Click the in the Stage Area to run the program. Move the mouse pointer back and forth over
Panda to observe the effect of the program.
3 Have students describe what happens when the mouse is moved around the stage.
Notice that the example program has the conditional statement nested inside of a loop.
Could this program have worked if the blocks weren’t inside the loop? Review the examples and
explanations below:
© education.makeblock.com
6
With a Forever Loop Block
1. Start the program.
2. Show the sprite.
3. Check if the condition is true. If the
condition is true, run the code inside
the conditional block.
4. Repeat steps 2 & 3 until the program
is stopped.
Notice, these blocks are very similar to the blocks used to change a sprite’s costume. Encourage your
students to use their prior knowledge of programming a sprite to change costumes to the Panda’s Travels
project.
Independent Practice
Instruct the students to complete the program, Panda’s Travels. Their final project should do the
following:
● Trigger Panda to walk across the stage (while changing costumes).
© education.makeblock.com
7
● Program Panda to turn around instead of walking off the edge of the stage. Make sure Panda
doesn’t turn upside down.
● If Panda touches the edge, change the backdrop to a new location. Showcase at least 5
different locations Panda has visited.
If your students need additional assistance, provide them with this list of blocks below that they can
use to complete the Panda’s Travels program.
Extension Activity
Challenge students with remaining time to do one or more of the following:
© education.makeblock.com
8
● Add a new sprite to create a title for Panda’s Travels slideshow.
Wrap-Up [5 min]
Quiz
(1) Which of the programs below can make the character to speak “Hello” for 2 second?
Answer: C
A. When the green flag is clicked B. When the character touches the mouse pointer
C. When the stage touches the mouse pointer D. When blocks touch the mouse pointer
Answer: B
© education.makeblock.com
9
Answer: A
© education.makeblock.com
10