Dragon Spells

Students learn coding concepts as they solve these puzzles to train their dragon to find treasure. Request Quote

Course Summary
  • Grades 3 - 5
  • Beginner level
  • 10 lessons
  • Tynker Blocks
    • Web iPad
Course Includes
  • 10 lessons
  • 67 activities
  • Enhanced Creativity Tools
  • Automatic Assessment
  • Tutorials and Reviews
  • Coding Puzzles
  • DIY Projects
  • Quizzes
  • Answer Keys
Prerequisites
No previous coding experience required.

Lesson Plan

Course: Dragon Spells
Lesson 8: The Long Road
Number of Levels: 8
Time: 30+ mins

Introduction

This lesson introduces students to "while" loops, which is a loop that will run while a specific condition is true. Each time the loop reaches the bottom of the code in the loop, it will go back to the beginning and check if the condition is true or false. If the condition is true, the loop will run again. If the condition is false, the loop will stop executing and the program will move onto the code located after the loop. A negated condition can be used in place of a regular condition. This means that the loop will execute while the condition is false and will stop when the condition is true.

New Code Blocks

  • : Repeat the code inside this loop until a goal is reached. In this activity, the dragon will continue repeating the code inside this loop until it reaches the treasure.
  • : Repeat the code inside this loop while a goal is not reached.

Vocabulary

  • Conditional loop: A loop that performs one or more commands as long as the specified condition is met

Objectives

Students will...
  • Apply conditional statements
  • Use loops to solve puzzles

Materials

  • iPads (with installed Tynker app), computers, or laptops

Warm-Up (5 minutes)

Explain to students that a "while" loop is an example of a conditional loop. "while" loops depend on a condition (boolean expression). When the condition is no longer True, the loop stops. Next, pair up students and ask them to discuss a real-world example of a conditional loop. For example, if they're refilling a water bottle, they'll keep adding water to the bottle until it is full.

Activities (30 minutes)

Facilitate as students complete all The Long Road modules:
The Long Road
  • Inform students that this lesson has 8 levels that they need to complete.
  • In level 1, students need to use a "repeat until" loop. Give a hint: Ask students, "What does the dragon need to continue doing until it reaches the treasure?" (Answer: Walk).
  • Level 2 introduces students to "while" loops, which allow the user to perform an action as long as a condition is true.
  • To solve levels 3-4, students need to create their own functions to move the dragon to the treasure.
  • In level 5, students will need to add 3 "if" code blocks inside the "while" loop. Give a hint: Ask students…
    • What does the dragon need to do if there is a bug? (Answer: Eat.)
    • What does the dragon need to do if it reaches the edge of the log? (Answer: Walk, then turn around.)
    • What does the dragon need to do if there is fire? (Answer: Blast.)
  • In level 6, students will need to add 2 "if" code blocks inside the "while" loop. Give a hint: Ask students…
    • What does the dragon need to do if there is a bug? (Answer: Eat.)
    • What does the dragon need to do if it reaches the edge of the log? (Answer: Turn around, then jump.)

Extended Activities (10 minutes)

Discussion
Ask your students…
  • How did you apply conditional loops in today's coding activities? (Answers will vary)
  • What's the difference between conditional loops and conditional statements? (Answers will vary)

U.S. Standards

  • CCSS-Math: K.CC.B.5, 2.OA.B.2, MP.1
  • CCSS-ELA: RF.K.4, RF.1.4, RF.2.4, RF.1.4.A, RF.2.4.A, 1.RI.10, 2.RI.10
  • CSTA: 1A-AP-09, 1A-AP-11, 1B-AP-10, 1B-AP-11, 1B-AP-12, 1B-AP-15
  • CS CA: K-2.AP.13, 3-5.AP.10, 3-5.AP.13, 3-5.AP.14, 3-5.AP.17
  • ISTE: 1.c, 1.d, 4.d, 5.c, 5.d, 6.b

U.K. Standards

Key Stage 1
  • Use logical reasoning to predict the behaviour of simple programs
  • Use technology safely and respectfully, keeping personal information private; identify where to go for help and support when they have concerns about content or contact on the internet or other online technologies
Key Stage 2
  • Design, write and debug programs that accomplish specific goals, including controlling or simulating physical systems; solve problems by decomposing them into smaller parts.
  • Use logical reasoning to explain how some simple algorithms work and to detect and correct errors in algorithms and programs.
  • Understand computer networks, including the internet; how they can provide multiple services, such as the World Wide Web, and the opportunities they offer for communication and collaboration.
  • Use technology safely, respectfully and responsibly; recognise acceptable/unacceptable behaviour; identify a range of ways to report concerns about content and contact.