Ruler Ordering
- Lesson plan 4: Rule ordering; Default Value idiom
- Slides for module 4 and PowerPoint source
- Student Ages: 9-14 years old
- Activity Time: 45-60 minutes
- Activity Level: Beginner Coder
Prerequisites
- Download and Installation of Kodu
- Lesson 1: Eating apples
- Lesson 2: Color Filters
- Lesson 3: Indentation and scores
Learning Objectives
- Learn indentation links to the rule above, not below.
- Learn the rule order establishes priority for conflicting actions: the lower numbered rule wins.
- Learn the rule order can be used to establish a default value for an action.
- Learn that the rule with the default value must come after the other rules for that action, so it can be overridden if one of the other rules applies.
Contents
- Lesson plan 4: Rule ordering; Default Value idiom
- Slides for module 4 and PowerPoint source
- CountFish1 exercise: Use of Default Value idiom with “color” action
- Castles1 exercise: Use of Default Value idiom with “move wander”
- Assessment 4: Rule ordering; playing a pursuit sound; Default Value bugs
Student Activities
CountFish1 Exercise: Use of Default Value idiom with “color” action
Explore the Kodu World: “CountFish1”. Student will play cooperatively and observe the character collision. Demonstrate learning by developing new rules to avoid collisions between the objects: kodu and flying fish. Then test the program and score points by avoiding character collision. Complete a journal activity to document and record any observations during the group activity.
Subjects:Math, Computer Science, Design Technology, Digital Literacy, 21st Century Learning Skills
Castles1 Exercise: Use of Default Value idiom with “move wander”
Explore the Kodu World: “Castles1”. Student will play cooperatively and observe the object: the castle. Demonstrate learning by understanding the rules of the game. Notice that if the character moves close to the object, the object may change sizes or dispense objects. The character and object must have a collision for the rules to apply. Then test the program and score points by avoiding character collision. Complete a journal activity to document and record any observations during the group activity.
Subjects: Math, Computer Science, Design Technology, Digital Literacy, 21st Century Learning Skills
Performance Expectations
Assessment 4: Rule ordering; playing a pursuit sound; Default Value bugs Student draw, follow, code and debug code.
- Effective indentation links to the rule above, not below.
- Evaluate priority for conflicting actions
- Establish a default value for an action
- Apply default values after the other rules
Skills
Character, Citizenship, Collaboration, Communication, Creativity, Critical Thinking, Project Based Learning