(Francais) D4: Conditionals - If/Then, Part 1
Level D, Lesson 4: Students will explore the benefits of using conditionals in their code. They will use Blockly preset programs and Challenge Cards to practice their new skills. Objectives Students w

Independent Practice
Instructions
Have students work on the following activities in small groups (ideally 2-3 students per robot).
Encourage students to share tablet and robot time. Have them establish and rotate through roles such as:
- Lead Programmer: Holds the tablet and manipulates the code.
- Robot Wrangler: Retrieves and resets the robot after every program attempt.
- Documentarian: Records group results, thoughts, and progress. Illustrates group designs and ideas.
When students work together while coding, they're able to help each other identify mistakes and develop creative solutions!
Scaredy Cat Extension
- Have students use the Wonder Journal: Dash Planning and/or General Planning worksheet to design ways to add to or alter the Square Dance preset program. They can:
- Change the cues that are used.
- Change the sounds and/or animations.
- Change the speed or direction of Dash.
- After they finish revising the program, have students:
- Complete a Wonder Journal: Reflection worksheet.
- Take a screenshot of their Blockly code.
- Take a video of Dash while the code is running.
Challenge Cards
- You can purchase our Learn to Code Challenge Card sets and Curriculum Guide here: https://logicsacademy.com/store/
- Have students complete the following Challenge Cards:
- 3.1: Fire Monster!
- 3.2: Big and Scary!
- 3.3: Curious Fire Monster
- For each challenge, encourage students to:
- Use the Wonder Journal: Dash Planning, Dot Planning, and/or General Planning worksheet to discuss how they can complete the challenge.
- Review the Troubleshooting and Problem Solving & Debugging worksheets if they run into any problems with their code.
- After they finish each challenge, have students:
- Complete a Wonder Journal: Reflection worksheet.
- Take a screenshot of their Blockly code.
- Take a video of Dash and/or Dot while the code is running.
- Update their Challenge Card Checklists.
Review
Conditionals Review
- Briefly review how conditionals were used in the previous lesson by asking, "What is a conditional?" (Sample response: "A conditional is a statement that shows that something will happen only if something else happens.")
- Ask students to give examples of when conditionals are used in their lives. (Sample response: "If I'm hungry, then I eat.")
- Ask, "What are events?" (Sample response: "Events are behaviors that the computer constantly searches for.")
- Ask, "What are some events that Dash and Dot can sense?" (Sample response: "Dash Sees Dot," "Top Button Pressed," "Dot Shake")
Code.Org Connections [Optional]
Review Code.org's Course D, Lesson 11: https://curriculum.code.org/csf/coursed/11/. Then ask:
- "How did you use conditionals in these puzzles?" (Sample response: "We used conditionals to tell the zombie that If there was a path, then he should take it.")
- "Did using conditionals make writing your program easier or more challenging?" (Sample response: "The program was easier to write as it was significantly shorter using an If/Then statement.")
Educational Standards
CSTA
ISTE
NGSS
Common Core
Wrap Up
Student Presentations
- Have student groups take turns sharing one of their programs with the class. Encourage them to:
- Explain their design thinking. (E.g., “We added (different events) to the program because we wanted Dash to respond to being picked up,” “We changed the Repeat Forever block here to solve the challenge because we wanted to repeat the program only 3 times.”)
- Share any obstacles and difficulties they overcame during the activity. (E.g., “At first, we didn’t know how to make Dash move backwards, but then we remembered we had to put an obstacle in front of Dash.”)
- Encourage students to ask each other how they accomplished different objectives and give each other feedback on their programs. Possible questions/feedback includes:
- "How did you (get Dash to respond to your voice)?"
- "I like how you (changed the animation)."
- "What if you (added another If statement)?"
Follow-Up Questions/Discussion
- How did the Repeat Forever block help you with your program?
- Why was it important to know what event Dash would respond to when you ran your program?
- What if you used the Repeat block instead of the Repeat Forever block? How would that have changed the program?
Assessment
- Use our Evaluation Rubric to review students' work and presentations.
- [Optional] Share your students' work with the world using @logicsacademy and #dashanddot!
Guided Practice
Activity: Scaredy Cat
- Project your tablet screen, open the Blockly app, and go to the menu at the top left of the screen.
- Go to the Create New Project menu and select the Scaredy Cat preset program. Then tap "create."

- Ask the students to look at the program and predict what they think will happen when it is run.
- Run the program to see if the students' predictions were correct.
- Ask, "What happens if Dash does not detect an obstacle behind or in front?" (Sample response: “Dash does not perform any of the commands in the If blocks and just plays the Help animation.”)
- Ask, "What happens if I change the events in the If blocks?" (Sample response: “Dash will only perform the commands in the If blocks if Dash senses the new events .”)
Quick Check
- Where is the If block located in Blockly? (Sample response: "In the Control menu.")
- Why are If blocks important? (Sample response: "They allow computer programs to make decisions.")
- What makes games with conditionals fun? Why or why not? (Sample response: "Games with conditionals are more interesting.")
Instruction
Introduction
- Say, "So far we've explored many ways to tell computers what to do through coding languages. Now we're going to learn a new way to code with conditionals."
- Show and/or review Code.org's video about conditionals: https://studio.code.org/s/course3/stage/8/puzzle/3. Then ask:
- "What did Bill Gates say a conditional statement was?" (Sample response: "An If statement is something that helps a computer make a decision.")
- "How did Bill Gates say he used conditional statements in his life?" (Sample response: “He used conditional statements to write a program for playing tic-tac-toe. His program said that if his opponent was about to win, then the program should block his opponent.”)
Quick Check
- What is a conditional?
- Where do you find the If blocks in Blockly?
- Review a real-life example where you would use a conditional:
- You look at the school lunch menu. If the lunch being served is pizza, then you will buy your lunch.
- You look at the guide for the television. If you see your favorite TV show is on, then you turn to that channel.
Before the Lesson
Prior Experience
It is recommended that students complete:
- Level A-C Lessons: All
- Level D: Lessons 1-3
- [Optional] Level A-C Challenge Cards: All
- [Optional] Level D Challenge Cards: D 1.1-2.3
You can purchase our Learn to Code Challenge Card sets and Curriculum Guide here: https://store.makewonder.com/#/education
Preparation
- Fully charge the tablets and robots.
- Install the Wonder Workshop Blockly app on each tablet.
