(Francais) E2: Conditionals - If/Else
Level E, Lesson 2: Students will learn how and when to use If/Else blocks. They will use Blockly preset programs and Challenge Cards to practice their new skills. Objectives Students will: Define If/E

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!
Take Your Pick Extension
- Have students use the Wonder Journal: Dash Planning or General Planning worksheet to design ways to add to or alter the Take Your Pick preset program. They can:
- Change the cues.
- Add more sounds, lights, or animations.
- Change the movements.
- 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:
- E 2.1: Follow the Leader
- E 2.2: GOOOOAL!
- E 2.3: Ready or Not!
- For each challenge, encourage students to:
- Use the Wonder Journal: Dash Planning or General Planning worksheets to discuss how they can complete the challenge.
- Review the Troubleshooting and Problem Solving & Debugging worksheet 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 while the code is running.
- Update their Challenge Card Checklists.
Guided Practice
Activity: Take Your Pick
- 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 Take Your Pick 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 when Dash is picked up?" (Sample response: "Dash says, 'Uh, oh.'")
- Ask, "What happens when Dash isn't picked up?" (Sample response: "The code progresses to the Else part of the block. Then Dash moves forward and says, 'Whee!'")
- Ask, "How do you change the blocks inside the If/Else block?" (Sample response: "If you want to change the blocks, drag the ones you don't want to use and throw them in the trash. Then choose the blocks you want to add and place them inside the loop.")
- Ask, "Why is using a Repeat Forever block helpful in this program?" (Sample response: "A Repeat Forever block is helpful because it means Dash will constantly look for a cue to be picked up.")
Quick Check
- How did you use the If/Else blocks in your programs?
- How do If/Else blocks work?
- Why are If/Else blocks important?
Before the Lesson
Prior Experience
It is recommended that students complete:
- Level A-D Lessons: All
- Level E: Lesson 1
- [Optional] Level A-D Challenge Cards: All
- [Optional] Level E Challenge Cards: E 1.1-1.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.
Review
Conditionals Review
Briefly review how students used conditionals in the previous lessons by asking:
- "What conditional blocks have you used in the past?" (Sample response: "If blocks.")
- "What is the purpose of conditional blocks?" (Sample response: "To allow computer programs to make choices.")
Code.Org Connections [Optional]
- Show Code.org's video about If blocks.
- Review Code.org's Course D, Lesson 10 about conditionals: https://studio.code.org/s/coursed-draft/stage/10/puzzle/1. Then ask:
- How did you use conditionals in the bee activity? (Sample response: "Conditionals were used to say, 'If there is a flower under the cloud, then collect nectar.'")
- Could you have completed this puzzle WITHOUT conditionals? (Sample response: "No, I would not have been able to complete the activity without using a conditional block, as I was unsure what was beneath the cloud. Using a conditional block allowed the program to make a decision.")
Code.Org Connections [Optional]
Video player coming soon
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 wanted to add (different animations) to the program because . . .," or "We used the If/Else block here to solve the challenge because . . .").
- Share any obstacles and difficulties they overcame during the activity (e.g., "At first, we didn't know how why there were two If/Else blocks, but then we took one of them out. This helped us understand that both blocks were important because nesting them allowed the program to make more than one choice.").
- 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 (program Dash to react in that way)?"
- "I like how you (changed the cues)."
- "What if you (added a Repeat block inside the Else portion of the block)?"
Follow-Up Questions/Discussion
- How did the If/Else block help you with your program?
- Could you have achieved the same result just using an If block?
Assessment
- Use our Evaluation Rubric to review students' work and presentations.
- [Optional] Share your students' work with the world using @logicsacademy and #dashanddot!
Educational Standards
CSTA
ISTE
NGSS
Common Core
Instruction
Introduction
- Say, "We have learned about conditional blocks in past lessons. We know that conditional blocks help computer programs make decisions. In this lesson, we will be learning about a new type of conditional: If/Else blocks. If/Elseblocks allow our programs to make decisions in a different way than If blocks."
- Say, "If/Else blocks tell the computer to make a decision between A and B. If a statement is True, the program will make Decision A. However, if the statement is False, the program will make Decision B."
- Review a real-life If/Else statement, such as:
- If the cafeteria lunch menu says they will be serving pizza, I will buy my lunch at school. If they will be serving something Else (other than pizza), I will bring my lunch from home.
- Ask, "What are some examples of how you use If/Else statements in your life?"
Quick Check
- What are conditionals?
- Where do we find conditionals in Blockly?
- How are If/Else blocks different than If blocks?
