I Want 2 Study
Mathematics

Task 1: One possible solution", // > Custom code page: Pedagogy Solver - line 11 lead: "Strategy: choose three outer cards whose total is divisible by 3, because the center must be their average.", // > Custom code page: Pedagogy Solver - line 12 finish: "This is one valid solution. Many other solutions are possible.", // > Custom code page: Pedagogy Solver - line 13 steps: [ // > Custom code page: Pedagogy Solver - line 14 { text: "Place 1 in a circle.", move: { value: 1, group: 0, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 15 { text: "Place 2 in another circle.", move: { value: 2, group: 0, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 16 { text: "Place 9 in the last circle. The outer total is now 1 + 2 + 9 = 12.", move: { value: 9, group: 0, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 17 { text: "Now divide by 3. Since 12 / 3 = 4, place 4 in the triangle.", move: { value: 4, group: 0, slot: 0 } } // > Custom code page: Pedagogy Solver - line 18 ] // > Custom code page: Pedagogy Solver - line 19 }, // > Custom code page: Pedagogy Solver - line 20 2: { // > Custom code page: Pedagogy Solver - line 21 title: "Task 2: Solve one shape at a time", // > Custom code page: Pedagogy Solver - line 22 lead: "A good strategy is to complete one pattern first, then use a second average relationship for the other pattern.", // > Custom code page: Pedagogy Solver - line 23 finish: "This is one valid arrangement of 9 different cards. Students can look for other working sets too.", // > Custom code page: Pedagogy Solver - line 24 steps: [ // > Custom code page: Pedagogy Solver - line 25 { text: "Start with the triangle. Place 1 in a circle.", move: { value: 1, group: 0, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 26 { text: "Place 2 in the next triangle circle.", move: { value: 2, group: 0, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 27 { text: "Place 6 in the last triangle circle. The outer total is 1 + 2 + 6 = 9.", move: { value: 6, group: 0, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 28 { text: "The average is 9 / 3 = 3, so place 3 in the triangle.", move: { value: 3, group: 0, slot: 0 } }, // > Custom code page: Pedagogy Solver - line 29 { text: "Now solve the square. Place 4 on the square.", move: { value: 4, group: 1, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 30 { text: "Add 5 to the square.", move: { value: 5, group: 1, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 31 { text: "Add 8 to the square.", move: { value: 8, group: 1, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 32 { text: "Place 11 in the last square circle. The outer total is 4 + 5 + 8 + 11 = 28.", move: { value: 11, group: 1, slot: 4 } }, // > Custom code page: Pedagogy Solver - line 33 { text: "The square center must be 28 / 4 = 7, so place 7 in the square.", move: { value: 7, group: 1, slot: 0 } } // > Custom code page: Pedagogy Solver - line 34 ] // > Custom code page: Pedagogy Solver - line 35 }, // > Custom code page: Pedagogy Solver - line 36 3: { // > Custom code page: Pedagogy Solver - line 37 title: "Task 3: Work backward from the given cards", // > Custom code page: Pedagogy Solver - line 38 lead: "Here the three given cards fix the outer total, so the missing card is determined by the average rule.", // > Custom code page: Pedagogy Solver - line 39 finish: "The missing card is 16 because it is the average of 13, 17 and 18.", // > Custom code page: Pedagogy Solver - line 40 steps: [ // > Custom code page: Pedagogy Solver - line 41 { text: "Place the given card 13 in a circle.", move: { value: 13, group: 0, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 42 { text: "Place the given card 17 in another circle.", move: { value: 17, group: 0, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 43 { text: "Place the given card 18 in the last circle. Their total is 13 + 17 + 18 = 48.", move: { value: 18, group: 0, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 44 { text: "Divide by 3. Since 48 / 3 = 16, the missing card must be 16.", move: { value: 16, group: 0, slot: 0 } } // > Custom code page: Pedagogy Solver - line 45 ] // > Custom code page: Pedagogy Solver - line 46 }, // > Custom code page: Pedagogy Solver - line 47 4: { // > Custom code page: Pedagogy Solver - line 48 title: "Task 4: Why there is no solution", // > Custom code page: Pedagogy Solver - line 49 lead: "The fastest route is to reason algebraically instead of guessing and checking.", // > Custom code page: Pedagogy Solver - line 50 finish: "So no set of four consecutive cards can satisfy the triangle-average rule.", // > Custom code page: Pedagogy Solver - line 51 steps: [ // > Custom code page: Pedagogy Solver - line 52 { text: "Call the four consecutive cards n, n + 1, n + 2 and n + 3." }, // > Custom code page: Pedagogy Solver - line 53 { text: "Their total is 4n + 6." }, // > Custom code page: Pedagogy Solver - line 54 { text: "If one card were the average of the other three, then all four cards together would total 4 times the center card." }, // > Custom code page: Pedagogy Solver - line 55 { text: "That means the total would have to be a multiple of 4." }, // > Custom code page: Pedagogy Solver - line 56 { text: "But 4n + 6 always leaves remainder 2 when divided by 4, so it can never be a multiple of 4." } // > Custom code page: Pedagogy Solver - line 57 ] // > Custom code page: Pedagogy Solver - line 58 }, // > Custom code page: Pedagogy Solver - line 59 5: { // > Custom code page: Pedagogy Solver - line 60 title: "Task 5: Use all 8 cards across two triangles", // > Custom code page: Pedagogy Solver - line 61 lead: "Solve one triangle cleanly, then use the remaining cards to complete the second triangle.", // > Custom code page: Pedagogy Solver - line 62 finish: "This uses each number from 1 to 8 exactly once. A second solution also exists.", // > Custom code page: Pedagogy Solver - line 63 steps: [ // > Custom code page: Pedagogy Solver - line 64 { text: "For the first triangle, place 1 in a circle.", move: { value: 1, group: 0, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 65 { text: "Place 3 in another circle.", move: { value: 3, group: 0, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 66 { text: "Place 8 in the last circle. The outer total is 1 + 3 + 8 = 12.", move: { value: 8, group: 0, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 67 { text: "So the first center is 12 / 3 = 4. Place 4 in the triangle.", move: { value: 4, group: 0, slot: 0 } }, // > Custom code page: Pedagogy Solver - line 68 { text: "Now use the remaining cards on the second triangle. Place 2 in a circle.", move: { value: 2, group: 1, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 69 { text: "Place 6 in another circle.", move: { value: 6, group: 1, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 70 { text: "Place 7 in the last circle. The outer total is 2 + 6 + 7 = 15.", move: { value: 7, group: 1, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 71 { text: "So the second center is 15 / 3 = 5. Place 5 in the triangle.", move: { value: 5, group: 1, slot: 0 } } // > Custom code page: Pedagogy Solver - line 72 ] // > Custom code page: Pedagogy Solver - line 73 }, // > Custom code page: Pedagogy Solver - line 74 6: { // > Custom code page: Pedagogy Solver - line 75 title: "Task 6: Build each pentagon from an average of 5 cards", // > Custom code page: Pedagogy Solver - line 76 lead: "For each pentagon, add the five outer cards first. The center must be one fifth of that total.", // > Custom code page: Pedagogy Solver - line 77 finish: "This is one valid arrangement. There are many more because several outer totals can work.", // > Custom code page: Pedagogy Solver - line 78 steps: [ // > Custom code page: Pedagogy Solver - line 79 { text: "For the first pentagon, place 1 on the outside.", move: { value: 1, group: 0, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 80 { text: "Add 2 to the outside.", move: { value: 2, group: 0, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 81 { text: "Add 3 to the outside.", move: { value: 3, group: 0, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 82 { text: "Add 6 to the outside.", move: { value: 6, group: 0, slot: 4 } }, // > Custom code page: Pedagogy Solver - line 83 { text: "Add 8 to the last outside spot. The outer total is 1 + 2 + 3 + 6 + 8 = 20.", move: { value: 8, group: 0, slot: 5 } }, // > Custom code page: Pedagogy Solver - line 84 { text: "So the first center is 20 / 5 = 4. Place 4 in the pentagon.", move: { value: 4, group: 0, slot: 0 } }, // > Custom code page: Pedagogy Solver - line 85 { text: "Now solve the second pentagon. Place 5 on the outside.", move: { value: 5, group: 1, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 86 { text: "Add 7 to the outside.", move: { value: 7, group: 1, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 87 { text: "Add 10 to the outside.", move: { value: 10, group: 1, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 88 { text: "Add 11 to the outside.", move: { value: 11, group: 1, slot: 4 } }, // > Custom code page: Pedagogy Solver - line 89 { text: "Add 12 to the last outside spot. The outer total is 5 + 7 + 10 + 11 + 12 = 45.", move: { value: 12, group: 1, slot: 5 } }, // > Custom code page: Pedagogy Solver - line 90 { text: "So the second center is 45 / 5 = 9. Place 9 in the pentagon.", move: { value: 9, group: 1, slot: 0 } } // > Custom code page: Pedagogy Solver - line 91 ] // > Custom code page: Pedagogy Solver - line 92 }, // > Custom code page: Pedagogy Solver - line 93 7: { // > Custom code page: Pedagogy Solver - line 94 title: "Task 7: Why there is no solution", // > Custom code page: Pedagogy Solver - line 95 lead: "Use a total-sum argument. It is faster and more convincing than random trial and error.", // > Custom code page: Pedagogy Solver - line 96 finish: "So the cards 1 to 12 cannot be split into three valid triangle-average groups.", // > Custom code page: Pedagogy Solver - line 97 steps: [ // > Custom code page: Pedagogy Solver - line 98 { text: "In any triangle group, the center equals the average of the three outer cards." }, // > Custom code page: Pedagogy Solver - line 99 { text: "So the outer total equals 3 times the center." }, // > Custom code page: Pedagogy Solver - line 100 { text: "That means the total of all four cards in one triangle group is 4 times the center, so it must be a multiple of 4." }, // > Custom code page: Pedagogy Solver - line 101 { text: "If all three triangle groups were valid, the grand total of all 12 cards would also have to be a multiple of 4." }, // > Custom code page: Pedagogy Solver - line 102 { text: "But 1 + 2 + 3 + ... + 12 = 78, and 78 is not a multiple of 4." } // > Custom code page: Pedagogy Solver - line 103 ] // > Custom code page: Pedagogy Solver - line 104 } // > Custom code page: Pedagogy Solver - line 105 }; // > Custom code page: Pedagogy Solver - line 106 // > Custom code page: Pedagogy Solver - line 107 function render Thinking Panel(title, lead, items, conclusion) { // > Custom code page: Pedagogy Solver - line 108 var html = "<b>" + title + "</b><br/>" + lead; // > Custom code page: Pedagogy Solver - line 109 if (items.length > 0) { // > Custom code page: Pedagogy Solver - line 110 html += "<ol>"; // > Custom code page: Pedagogy Solver - line 111 for (var i = 0; i < items.length; i++) { // > Custom code page: Pedagogy Solver - line 112 html += "<li>" + items[i] + "</li>"; // > Custom code page: Pedagogy Solver - line 113 } // > Custom code page: Pedagogy Solver - line 114 html += "</ol>"; // > Custom code page: Pedagogy Solver - line 115 } // > Custom code page: Pedagogy Solver - line 116 if (conclusion) { // > Custom code page: Pedagogy Solver - line 117 html += "<p><b>Conclusion:</b> " + conclusion + "</p>"; // > Custom code page: Pedagogy Solver - line 118 } // > Custom code page: Pedagogy Solver - line 119 return html; // > Custom code page: Pedagogy Solver - line 120 } // > Custom code page: Pedagogy Solver - line 121 // > Custom code page: Pedagogy Solver - line 122 function set Thinking Html(html) { // > Custom code page: Pedagogy Solver - line 123 if (_view && _view.solver Text) { // > Custom code page: Pedagogy Solver - line 124 _view.solver Text.set Property("Text", html); // > Custom code page: Pedagogy Solver - line 125 } // > Custom code page: Pedagogy Solver - line 126 } // > Custom code page: Pedagogy Solver - line 127 // > Custom code page: Pedagogy Solver - line 128 function clear Thinking Timeouts() { // > Custom code page: Pedagogy Solver - line 129 for (var i = 0; i < thinking Timeouts.length; i++) { // > Custom code page: Pedagogy Solver - line 130 window.clear Timeout(thinking Timeouts[i]); // > Custom code page: Pedagogy Solver - line 131 } // > Custom code page: Pedagogy Solver - line 132 thinking Timeouts = []; // > Custom code page: Pedagogy Solver - line 133 } // > Custom code page: Pedagogy Solver - line 134 // > Custom code page: Pedagogy Solver - line 135 function stop Thinking Playback(reset Panel) { // > Custom code page: Pedagogy Solver - line 136 if (reset Panel === undefined) { // > Custom code page: Pedagogy Solver - line 137 reset Panel = true; // > Custom code page: Pedagogy Solver - line 138 } // > Custom code page: Pedagogy Solver - line 139 clear Thinking Timeouts(); // > Custom code page: Pedagogy Solver - line 140 thinking Running = false; // > Custom code page: Pedagogy Solver - line 141 if (thinking Enabled Snapshot.length === enabledposition.length) { // > Custom code page: Pedagogy Solver - line 142 enabledposition = thinking Enabled Snapshot.slice(); // > Custom code page: Pedagogy Solver - line 143 } // > Custom code page: Pedagogy Solver - line 144 thinking Enabled Snapshot = []; // > Custom code page: Pedagogy Solver - line 145 if (reset Panel) { // > Custom code page: Pedagogy Solver - line 146 set Thinking Html(get Thinking Default Html()); // > Custom code page: Pedagogy Solver - line 147 } // > Custom code page: Pedagogy Solver - line 148 _update(); // > Custom code page: Pedagogy Solver - line 149 } // > Custom code page: Pedagogy Solver - line 150 // > Custom code page: Pedagogy Solver - line 151 function get Card Index For Value(value) { // > Custom code page: Pedagogy Solver - line 152 for (var i = 0; i < card Val.length; i++) { // > Custom code page: Pedagogy Solver - line 153 if (card Val[i] === value) { // > Custom code page: Pedagogy Solver - line 154 return i; // > Custom code page: Pedagogy Solver - line 155 } // > Custom code page: Pedagogy Solver - line 156 } // > Custom code page: Pedagogy Solver - line 157 return -1; // > Custom code page: Pedagogy Solver - line 158 } // > Custom code page: Pedagogy Solver - line 159 // > Custom code page: Pedagogy Solver - line 160 function place Card Value In Group(value, group Index, slot Index) { // > Custom code page: Pedagogy Solver - line 161 var card Index = get Card Index For Value(value); // > Custom code page: Pedagogy Solver - line 162 if (card Index < 0 || !group Arr[group Index]) { // > Custom code page: Pedagogy Solver - line 163 return false; // > Custom code page: Pedagogy Solver - line 164 } // > Custom code page: Pedagogy Solver - line 165 if (which Group[card Index] != null) { // > Custom code page: Pedagogy Solver - line 166 which Group[card Index].val[which Circle[card Index]] = -1; // > Custom code page: Pedagogy Solver - line 167 } // > Custom code page: Pedagogy Solver - line 168 var target Group = group Arr[group Index]; // > Custom code page: Pedagogy Solver - line 169 card X[card Index] = target Group.x Pos[slot Index]; // > Custom code page: Pedagogy Solver - line 170 card Y[card Index] = target Group.y Pos[slot Index]; // > Custom code page: Pedagogy Solver - line 171 target Group.val[slot Index] = card Val[card Index]; // > Custom code page: Pedagogy Solver - line 172 which Group[card Index] = target Group; // > Custom code page: Pedagogy Solver - line 173 which Circle[card Index] = slot Index; // > Custom code page: Pedagogy Solver - line 174 card Color[card Index] = "#c5e1a5"; // > Custom code page: Pedagogy Solver - line 175 return true; // > Custom code page: Pedagogy Solver - line 176 } // > Custom code page: Pedagogy Solver - line 177 // > Custom code page: Pedagogy Solver - line 178 function start Thinking Playback() { // > Custom code page: Pedagogy Solver - line 179 var script = thinking Scripts[cur Task]; // > Custom code page: Pedagogy Solver - line 180 if (!script) { // > Custom code page: Pedagogy Solver - line 181 set Thinking Html(get Thinking Default Html()); // > Custom code page: Pedagogy Solver - line 182 return; // > Custom code page: Pedagogy Solver - line 183 } // > Custom code page: Pedagogy Solver - line 184 clear Thinking Timeouts(); // > Custom code page: Pedagogy Solver - line 185 thinking Running = true; // > Custom code page: Pedagogy Solver - line 186 thinking Enabled Snapshot = enabledposition.slice(); // > Custom code page: Pedagogy Solver - line 187 for (var i = 0; i < enabledposition.length; i++) { // > Custom code page: Pedagogy Solver - line 188 enabledposition[i] = "ENABLED_NONE"; // > Custom code page: Pedagogy Solver - line 189 } // > Custom code page: Pedagogy Solver - line 190 var items = []; // > Custom code page: Pedagogy Solver - line 191 var delay = 0; // > Custom code page: Pedagogy Solver - line 192 set Thinking Html(render Thinking Panel(script.title, script.lead, items, "")); // > Custom code page: Pedagogy Solver - line 193 _update(); // > Custom code page: Pedagogy Solver - line 194 for (var step Index = 0; step Index < script.steps.length; step Index++) { // > Custom code page: Pedagogy Solver - line 195 (function(step, current Delay) { // > Custom code page: Pedagogy Solver - line 196 thinking Timeouts.push(window.set Timeout(function() { // > Custom code page: Pedagogy Solver - line 197 if (step.move) { // > Custom code page: Pedagogy Solver - line 198 place Card Value In Group(step.move.value, step.move.group, step.move.slot); // > Custom code page: Pedagogy Solver - line 199 } // > Custom code page: Pedagogy Solver - line 200 items.push(step.text); // > Custom code page: Pedagogy Solver - line 201 set Thinking Html(render Thinking Panel(script.title, script.lead, items, "")); // > Custom code page: Pedagogy Solver - line 202 _update(); // > Custom code page: Pedagogy Solver - line 203 }, current Delay)); // > Custom code page: Pedagogy Solver - line 204 }(script.steps[step Index], delay + (script.steps[step Index].delay || 1400))); // > Custom code page: Pedagogy Solver - line 205 delay += (script.steps[step Index].delay || 1400); // > Custom code page: Pedagogy Solver - line 206 } // > Custom code page: Pedagogy Solver - line 207 thinking Timeouts.push(window.set Timeout(function() { // > Custom code page: Pedagogy Solver - line 208 thinking Running = false; // > Custom code page: Pedagogy Solver - line 209 if (thinking Enabled Snapshot.length === enabledposition.length) { // > Custom code page: Pedagogy Solver - line 210 enabledposition = thinking Enabled Snapshot.slice(); // > Custom code page: Pedagogy Solver - line 211 } // > Custom code page: Pedagogy Solver - line 212 set Thinking Html(render Thinking Panel(script.title, script.lead, items, script.finish)); // > Custom code page: Pedagogy Solver - line 213 _update(); // > Custom code page: Pedagogy Solver - line 214 }, delay + 300)); // > Custom code page: Pedagogy Solver - line 215 } // > Custom code page: Pedagogy Solver - line 216 // > Custom code page: Pedagogy Solver - line 217 function show Thinking Process() { // > Custom code page: Pedagogy Solver - line 218 stop Thinking Playback(false); // > Custom code page: Pedagogy Solver - line 219 _reset(); // > Custom code page: Pedagogy Solver - line 220 is First Try[cur Task - 1] = false; // > Custom code page: Pedagogy Solver - line 221 if (typeof question Append History === "function") { // > Custom code page: Pedagogy Solver - line 222 question Append History("Q" + cur Task, "Guided thinking viewed."); // > Custom code page: Pedagogy Solver - line 223 } // > Custom code page: Pedagogy Solver - line 224 start Thinking Playback(); // > Custom code page: Pedagogy Solver - line 225 } // > Custom code page: Pedagogy Solver - line 226 function on Answer Correct() { // > Custom code page: question - line 1 const qn = `Q${cur Task}`; // > Custom code page: question - line 2 const group Info = group Arr.map(format Group); // > Custom code page: question - line 3 // > Custom code page: question - line 4 start Question(qn); // > Custom code page: question - line 5 add Question History(`Valid answer${is First Try[cur Task - 1] ? " (First try)" : ""}:\n${group Info.join("\n")}\n`); // > Custom code page: question - line 6 award Question Marks(is First Try[cur Task - 1] ? 2 : 1) // > Custom code page: question - line 7 end Question(); // > Custom code page: question - line 8 } // > Custom code page: question - line 9 function on Answer Invalid() { // > Custom code page: question - line 10 const qn = `Q${cur Task}`; // > Custom code page: question - line 11 const group Info = group Arr.map(format Group); // > Custom code page: question - line 12 // > Custom code page: question - line 13 question Append History(qn, `Invalid answer:\n${group Info.join("\n")}\n`); // > Custom code page: question - line 14 } // > Custom code page: question - line 15 function on Answer Incorrect() { // > Custom code page: question - line 16 const qn = `Q${cur Task}`; // > Custom code page: question - line 17 is First Try[cur Task - 1] = false; // > Custom code page: question - line 18 const group Info = group Arr.map(format Group); // > Custom code page: question - line 19 // > Custom code page: question - line 20 question Append History(qn, `Incorrect answer:\n${group Info.join("\n")}\n`); // > Custom code page: question - line 21 } // > Custom code page: question - line 22 // > Custom code page: question - line 23 /** @param {number} value */ // > Custom code page: question - line 24 function format Slot(value) { // > Custom code page: question - line 25 return value === -1 ? "X" : value.to String(); // > Custom code page: question - line 26 } // > Custom code page: question - line 27 // > Custom code page: question - line 28 function format Group(group) { // > Custom code page: question - line 29 const results = ["("]; // > Custom code page: question - line 30 for (let i = 1; i < group.val.length; i++) { // > Custom code page: question - line 31 if (i > 1) results.push(" "); // > Custom code page: question - line 32 results.push(format Slot(group.val[i])); // > Custom code page: question - line 33 } // > Custom code page: question - line 34 results.push(`) Center: ${format Slot(group.val[0])} `); // > Custom code page: question - line 35 switch (group.is Valid()) { // > Custom code page: question - line 36 case -1: // > Custom code page: question - line 37 // do something if group.is Valid() === -1 // > Custom code page: question - line 38 results.push('🤔'); // > Custom code page: question - line 39 break; // > Custom code page: question - line 40 case 0: // > Custom code page: question - line 41 // do something if group.is Valid() === 0 // > Custom code page: question - line 42 results.push('❌'); // > Custom code page: question - line 43 break; // > Custom code page: question - line 44 case 1: // > Custom code page: question - line 45 // do something if group.is Valid() === 1 // > Custom code page: question - line 46 results.push('✅'); // > Custom code page: question - line 47 } // > Custom code page: question - line 48 return results.join(""); // > Custom code page: question - line 49 } // > Custom code page: question - line 50 // > Custom code page: question Lib - line 1 // copy into custom function // > Custom code page: Lib Page - line 1 document.onkeydown = function(evt) { // > Custom code page: Lib Page - line 2 evt = evt || window.event; // > Custom code page: Lib Page - line 3 var is Escape = false; // > Custom code page: Lib Page - line 4 if ("key" in evt) { // > Custom code page: Lib Page - line 5 is Escape = (evt.key === "Escape" || evt.key === "Esc"); // > Custom code page: Lib Page - line 6 } // > Custom code page: Lib Page - line 7 else { // > Custom code page: Lib Page - line 8 is Escape = (evt.key Code === 27); // > Custom code page: Lib Page - line 9 } // > Custom code page: Lib Page - line 10 if (is Escape) { // > Custom code page: Lib Page - line 11 //alert("Escape"); // > Custom code page: Lib Page - line 12 //esc Key Pressed = true // > Custom code page: Lib Page - line 13 esc Key Pressed = !esc Key Pressed; // Toggle esc Key Pressed // > Custom code page: Lib Page - line 14 } // > Custom code page: Lib Page - line 15 // > Custom code page: Lib Page - line 16 } // > Custom code page: Lib Page - line 17 _model.add To Initialization(function() { if (!__pages Enabled['Init Page']) return; // Initialising the cards // > Initialization page: Init Page - line 1 var cur X = -card Width * 9 / 2; // > Initialization page: Init Page - line 2 // > Initialization page: Init Page - line 3 for(var i = 1; i <= 20; i++){ // > Initialization page: Init Page - line 4 let idx = i - 1; // > Initialization page: Init Page - line 5 card Val[idx] = i; // > Initialization page: Init Page - line 6 card X[idx] = cur X; // > Initialization page: Init Page - line 7 if(i <= 10) // > Initialization page: Init Page - line 8 card Y[idx] = card Height * 2; // > Initialization page: Init Page - line 9 else // > Initialization page: Init Page - line 10 card Y[idx] = card Height; // > Initialization page: Init Page - line 11 // > Initialization page: Init Page - line 12 init X[idx] = card X[idx], init Y[idx] = card Y[idx]; // > Initialization page: Init Page - line 13 // > Initialization page: Init Page - line 14 cur X += card Width; // > Initialization page: Init Page - line 15 if(i == 10) // > Initialization page: Init Page - line 16 cur X = -card Width * 9 / 2; // > Initialization page: Init Page - line 17 // > Initialization page: Init Page - line 18 // which Group identifies which group the card is in currently. If the card is not in a group, which Group will be null // > Initialization page: Init Page - line 19 which Group[idx] = null; // > Initialization page: Init Page - line 20 // which Cricle identifies which circle the card is in currently. If the card is not in a cricle, which Cricle will be -1. // > Initialization page: Init Page - line 21 which Circle[idx] = -1; // > Initialization page: Init Page - line 22 } // > Initialization page: Init Page - line 23 // > Initialization page: Init Page - line 24 // > Initialization page: Init Page - line 25 // > Initialization page: Init Page - line 26 // > Initialization page: Init Page - line 27 // > Initialization page: Init Page - line 28 }); _model.add To Initialization(function() { if (!__pages Enabled['init Shape']) return; // shape Points is to define the points that we are going to use for the 2d polygons // > Initialization page: init Shape - line 1 var pen Radius = tri Radius = shape Length / 2; // > Initialization page: init Shape - line 2 shape Points = { // > Initialization page: init Shape - line 3 "triangle": [ // > Initialization page: init Shape - line 4 [0, tri Radius * Math.sin(Math.PI / 3), -tri Radius * Math.sin(Math.PI / 3), 0], // > Initialization page: init Shape - line 5 [tri Radius, -tri Radius * Math.cos(Math.PI / 3), -tri Radius * Math.cos(Math.PI / 3), tri Radius] // > Initialization page: init Shape - line 6 ], // > Initialization page: init Shape - line 7 "square": [ // > Initialization page: init Shape - line 8 [-shape Length / 2, shape Length / 2, shape Length / 2, -shape Le generated-with: Web EJS : The web version of Easy Java Script Simulations, version Web EJS 1.1, build 240815. Visit https://www.um.es/fem/wikis/webejs/ fixed-navbar: false title: ejss_model_astoundingly_average Astoundingly Average Number Game to promote Creative Thinking

Explore Description 1 as an interactive EJS simulation for mathematics.

Task 1: One possible solution", // > Custom code page: Pedagogy Solver - line 11 lead: "Strategy: choose three outer cards whose total is divisible by 3, because the center must be their average.", // > Custom code page: Pedagogy Solver - line 12 finish: "This is one valid solution. Many other solutions are possible.", // > Custom code page: Pedagogy Solver - line 13 steps: [ // > Custom code page: Pedagogy Solver - line 14 { text: "Place 1 in a circle.", move: { value: 1, group: 0, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 15 { text: "Place 2 in another circle.", move: { value: 2, group: 0, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 16 { text: "Place 9 in the last circle. The outer total is now 1 + 2 + 9 = 12.", move: { value: 9, group: 0, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 17 { text: "Now divide by 3. Since 12 / 3 = 4, place 4 in the triangle.", move: { value: 4, group: 0, slot: 0 } } // > Custom code page: Pedagogy Solver - line 18 ] // > Custom code page: Pedagogy Solver - line 19 }, // > Custom code page: Pedagogy Solver - line 20 2: { // > Custom code page: Pedagogy Solver - line 21 title: "Task 2: Solve one shape at a time", // > Custom code page: Pedagogy Solver - line 22 lead: "A good strategy is to complete one pattern first, then use a second average relationship for the other pattern.", // > Custom code page: Pedagogy Solver - line 23 finish: "This is one valid arrangement of 9 different cards. Students can look for other working sets too.", // > Custom code page: Pedagogy Solver - line 24 steps: [ // > Custom code page: Pedagogy Solver - line 25 { text: "Start with the triangle. Place 1 in a circle.", move: { value: 1, group: 0, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 26 { text: "Place 2 in the next triangle circle.", move: { value: 2, group: 0, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 27 { text: "Place 6 in the last triangle circle. The outer total is 1 + 2 + 6 = 9.", move: { value: 6, group: 0, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 28 { text: "The average is 9 / 3 = 3, so place 3 in the triangle.", move: { value: 3, group: 0, slot: 0 } }, // > Custom code page: Pedagogy Solver - line 29 { text: "Now solve the square. Place 4 on the square.", move: { value: 4, group: 1, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 30 { text: "Add 5 to the square.", move: { value: 5, group: 1, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 31 { text: "Add 8 to the square.", move: { value: 8, group: 1, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 32 { text: "Place 11 in the last square circle. The outer total is 4 + 5 + 8 + 11 = 28.", move: { value: 11, group: 1, slot: 4 } }, // > Custom code page: Pedagogy Solver - line 33 { text: "The square center must be 28 / 4 = 7, so place 7 in the square.", move: { value: 7, group: 1, slot: 0 } } // > Custom code page: Pedagogy Solver - line 34 ] // > Custom code page: Pedagogy Solver - line 35 }, // > Custom code page: Pedagogy Solver - line 36 3: { // > Custom code page: Pedagogy Solver - line 37 title: "Task 3: Work backward from the given cards", // > Custom code page: Pedagogy Solver - line 38 lead: "Here the three given cards fix the outer total, so the missing card is determined by the average rule.", // > Custom code page: Pedagogy Solver - line 39 finish: "The missing card is 16 because it is the average of 13, 17 and 18.", // > Custom code page: Pedagogy Solver - line 40 steps: [ // > Custom code page: Pedagogy Solver - line 41 { text: "Place the given card 13 in a circle.", move: { value: 13, group: 0, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 42 { text: "Place the given card 17 in another circle.", move: { value: 17, group: 0, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 43 { text: "Place the given card 18 in the last circle. Their total is 13 + 17 + 18 = 48.", move: { value: 18, group: 0, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 44 { text: "Divide by 3. Since 48 / 3 = 16, the missing card must be 16.", move: { value: 16, group: 0, slot: 0 } } // > Custom code page: Pedagogy Solver - line 45 ] // > Custom code page: Pedagogy Solver - line 46 }, // > Custom code page: Pedagogy Solver - line 47 4: { // > Custom code page: Pedagogy Solver - line 48 title: "Task 4: Why there is no solution", // > Custom code page: Pedagogy Solver - line 49 lead: "The fastest route is to reason algebraically instead of guessing and checking.", // > Custom code page: Pedagogy Solver - line 50 finish: "So no set of four consecutive cards can satisfy the triangle-average rule.", // > Custom code page: Pedagogy Solver - line 51 steps: [ // > Custom code page: Pedagogy Solver - line 52 { text: "Call the four consecutive cards n, n + 1, n + 2 and n + 3." }, // > Custom code page: Pedagogy Solver - line 53 { text: "Their total is 4n + 6." }, // > Custom code page: Pedagogy Solver - line 54 { text: "If one card were the average of the other three, then all four cards together would total 4 times the center card." }, // > Custom code page: Pedagogy Solver - line 55 { text: "That means the total would have to be a multiple of 4." }, // > Custom code page: Pedagogy Solver - line 56 { text: "But 4n + 6 always leaves remainder 2 when divided by 4, so it can never be a multiple of 4." } // > Custom code page: Pedagogy Solver - line 57 ] // > Custom code page: Pedagogy Solver - line 58 }, // > Custom code page: Pedagogy Solver - line 59 5: { // > Custom code page: Pedagogy Solver - line 60 title: "Task 5: Use all 8 cards across two triangles", // > Custom code page: Pedagogy Solver - line 61 lead: "Solve one triangle cleanly, then use the remaining cards to complete the second triangle.", // > Custom code page: Pedagogy Solver - line 62 finish: "This uses each number from 1 to 8 exactly once. A second solution also exists.", // > Custom code page: Pedagogy Solver - line 63 steps: [ // > Custom code page: Pedagogy Solver - line 64 { text: "For the first triangle, place 1 in a circle.", move: { value: 1, group: 0, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 65 { text: "Place 3 in another circle.", move: { value: 3, group: 0, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 66 { text: "Place 8 in the last circle. The outer total is 1 + 3 + 8 = 12.", move: { value: 8, group: 0, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 67 { text: "So the first center is 12 / 3 = 4. Place 4 in the triangle.", move: { value: 4, group: 0, slot: 0 } }, // > Custom code page: Pedagogy Solver - line 68 { text: "Now use the remaining cards on the second triangle. Place 2 in a circle.", move: { value: 2, group: 1, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 69 { text: "Place 6 in another circle.", move: { value: 6, group: 1, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 70 { text: "Place 7 in the last circle. The outer total is 2 + 6 + 7 = 15.", move: { value: 7, group: 1, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 71 { text: "So the second center is 15 / 3 = 5. Place 5 in the triangle.", move: { value: 5, group: 1, slot: 0 } } // > Custom code page: Pedagogy Solver - line 72 ] // > Custom code page: Pedagogy Solver - line 73 }, // > Custom code page: Pedagogy Solver - line 74 6: { // > Custom code page: Pedagogy Solver - line 75 title: "Task 6: Build each pentagon from an average of 5 cards", // > Custom code page: Pedagogy Solver - line 76 lead: "For each pentagon, add the five outer cards first. The center must be one fifth of that total.", // > Custom code page: Pedagogy Solver - line 77 finish: "This is one valid arrangement. There are many more because several outer totals can work.", // > Custom code page: Pedagogy Solver - line 78 steps: [ // > Custom code page: Pedagogy Solver - line 79 { text: "For the first pentagon, place 1 on the outside.", move: { value: 1, group: 0, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 80 { text: "Add 2 to the outside.", move: { value: 2, group: 0, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 81 { text: "Add 3 to the outside.", move: { value: 3, group: 0, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 82 { text: "Add 6 to the outside.", move: { value: 6, group: 0, slot: 4 } }, // > Custom code page: Pedagogy Solver - line 83 { text: "Add 8 to the last outside spot. The outer total is 1 + 2 + 3 + 6 + 8 = 20.", move: { value: 8, group: 0, slot: 5 } }, // > Custom code page: Pedagogy Solver - line 84 { text: "So the first center is 20 / 5 = 4. Place 4 in the pentagon.", move: { value: 4, group: 0, slot: 0 } }, // > Custom code page: Pedagogy Solver - line 85 { text: "Now solve the second pentagon. Place 5 on the outside.", move: { value: 5, group: 1, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 86 { text: "Add 7 to the outside.", move: { value: 7, group: 1, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 87 { text: "Add 10 to the outside.", move: { value: 10, group: 1, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 88 { text: "Add 11 to the outside.", move: { value: 11, group: 1, slot: 4 } }, // > Custom code page: Pedagogy Solver - line 89 { text: "Add 12 to the last outside spot. The outer total is 5 + 7 + 10 + 11 + 12 = 45.", move: { value: 12, group: 1, slot: 5 } }, // > Custom code page: Pedagogy Solver - line 90 { text: "So the second center is 45 / 5 = 9. Place 9 in the pentagon.", move: { value: 9, group: 1, slot: 0 } } // > Custom code page: Pedagogy Solver - line 91 ] // > Custom code page: Pedagogy Solver - line 92 }, // > Custom code page: Pedagogy Solver - line 93 7: { // > Custom code page: Pedagogy Solver - line 94 title: "Task 7: Why there is no solution", // > Custom code page: Pedagogy Solver - line 95 lead: "Use a total-sum argument. It is faster and more convincing than random trial and error.", // > Custom code page: Pedagogy Solver - line 96 finish: "So the cards 1 to 12 cannot be split into three valid triangle-average groups.", // > Custom code page: Pedagogy Solver - line 97 steps: [ // > Custom code page: Pedagogy Solver - line 98 { text: "In any triangle group, the center equals the average of the three outer cards." }, // > Custom code page: Pedagogy Solver - line 99 { text: "So the outer total equals 3 times the center." }, // > Custom code page: Pedagogy Solver - line 100 { text: "That means the total of all four cards in one triangle group is 4 times the center, so it must be a multiple of 4." }, // > Custom code page: Pedagogy Solver - line 101 { text: "If all three triangle groups were valid, the grand total of all 12 cards would also have to be a multiple of 4." }, // > Custom code page: Pedagogy Solver - line 102 { text: "But 1 + 2 + 3 + ... + 12 = 78, and 78 is not a multiple of 4." } // > Custom code page: Pedagogy Solver - line 103 ] // > Custom code page: Pedagogy Solver - line 104 } // > Custom code page: Pedagogy Solver - line 105 }; // > Custom code page: Pedagogy Solver - line 106 // > Custom code page: Pedagogy Solver - line 107 function render Thinking Panel(title, lead, items, conclusion) { // > Custom code page: Pedagogy Solver - line 108 var html = "<b>" + title + "</b><br/>" + lead; // > Custom code page: Pedagogy Solver - line 109 if (items.length > 0) { // > Custom code page: Pedagogy Solver - line 110 html += "<ol>"; // > Custom code page: Pedagogy Solver - line 111 for (var i = 0; i < items.length; i++) { // > Custom code page: Pedagogy Solver - line 112 html += "<li>" + items[i] + "</li>"; // > Custom code page: Pedagogy Solver - line 113 } // > Custom code page: Pedagogy Solver - line 114 html += "</ol>"; // > Custom code page: Pedagogy Solver - line 115 } // > Custom code page: Pedagogy Solver - line 116 if (conclusion) { // > Custom code page: Pedagogy Solver - line 117 html += "<p><b>Conclusion:</b> " + conclusion + "</p>"; // > Custom code page: Pedagogy Solver - line 118 } // > Custom code page: Pedagogy Solver - line 119 return html; // > Custom code page: Pedagogy Solver - line 120 } // > Custom code page: Pedagogy Solver - line 121 // > Custom code page: Pedagogy Solver - line 122 function set Thinking Html(html) { // > Custom code page: Pedagogy Solver - line 123 if (_view && _view.solver Text) { // > Custom code page: Pedagogy Solver - line 124 _view.solver Text.set Property("Text", html); // > Custom code page: Pedagogy Solver - line 125 } // > Custom code page: Pedagogy Solver - line 126 } // > Custom code page: Pedagogy Solver - line 127 // > Custom code page: Pedagogy Solver - line 128 function clear Thinking Timeouts() { // > Custom code page: Pedagogy Solver - line 129 for (var i = 0; i < thinking Timeouts.length; i++) { // > Custom code page: Pedagogy Solver - line 130 window.clear Timeout(thinking Timeouts[i]); // > Custom code page: Pedagogy Solver - line 131 } // > Custom code page: Pedagogy Solver - line 132 thinking Timeouts = []; // > Custom code page: Pedagogy Solver - line 133 } // > Custom code page: Pedagogy Solver - line 134 // > Custom code page: Pedagogy Solver - line 135 function stop Thinking Playback(reset Panel) { // > Custom code page: Pedagogy Solver - line 136 if (reset Panel === undefined) { // > Custom code page: Pedagogy Solver - line 137 reset Panel = true; // > Custom code page: Pedagogy Solver - line 138 } // > Custom code page: Pedagogy Solver - line 139 clear Thinking Timeouts(); // > Custom code page: Pedagogy Solver - line 140 thinking Running = false; // > Custom code page: Pedagogy Solver - line 141 if (thinking Enabled Snapshot.length === enabledposition.length) { // > Custom code page: Pedagogy Solver - line 142 enabledposition = thinking Enabled Snapshot.slice(); // > Custom code page: Pedagogy Solver - line 143 } // > Custom code page: Pedagogy Solver - line 144 thinking Enabled Snapshot = []; // > Custom code page: Pedagogy Solver - line 145 if (reset Panel) { // > Custom code page: Pedagogy Solver - line 146 set Thinking Html(get Thinking Default Html()); // > Custom code page: Pedagogy Solver - line 147 } // > Custom code page: Pedagogy Solver - line 148 _update(); // > Custom code page: Pedagogy Solver - line 149 } // > Custom code page: Pedagogy Solver - line 150 // > Custom code page: Pedagogy Solver - line 151 function get Card Index For Value(value) { // > Custom code page: Pedagogy Solver - line 152 for (var i = 0; i < card Val.length; i++) { // > Custom code page: Pedagogy Solver - line 153 if (card Val[i] === value) { // > Custom code page: Pedagogy Solver - line 154 return i; // > Custom code page: Pedagogy Solver - line 155 } // > Custom code page: Pedagogy Solver - line 156 } // > Custom code page: Pedagogy Solver - line 157 return -1; // > Custom code page: Pedagogy Solver - line 158 } // > Custom code page: Pedagogy Solver - line 159 // > Custom code page: Pedagogy Solver - line 160 function place Card Value In Group(value, group Index, slot Index) { // > Custom code page: Pedagogy Solver - line 161 var card Index = get Card Index For Value(value); // > Custom code page: Pedagogy Solver - line 162 if (card Index < 0 || !group Arr[group Index]) { // > Custom code page: Pedagogy Solver - line 163 return false; // > Custom code page: Pedagogy Solver - line 164 } // > Custom code page: Pedagogy Solver - line 165 if (which Group[card Index] != null) { // > Custom code page: Pedagogy Solver - line 166 which Group[card Index].val[which Circle[card Index]] = -1; // > Custom code page: Pedagogy Solver - line 167 } // > Custom code page: Pedagogy Solver - line 168 var target Group = group Arr[group Index]; // > Custom code page: Pedagogy Solver - line 169 card X[card Index] = target Group.x Pos[slot Index]; // > Custom code page: Pedagogy Solver - line 170 card Y[card Index] = target Group.y Pos[slot Index]; // > Custom code page: Pedagogy Solver - line 171 target Group.val[slot Index] = card Val[card Index]; // > Custom code page: Pedagogy Solver - line 172 which Group[card Index] = target Group; // > Custom code page: Pedagogy Solver - line 173 which Circle[card Index] = slot Index; // > Custom code page: Pedagogy Solver - line 174 card Color[card Index] = "#c5e1a5"; // > Custom code page: Pedagogy Solver - line 175 return true; // > Custom code page: Pedagogy Solver - line 176 } // > Custom code page: Pedagogy Solver - line 177 // > Custom code page: Pedagogy Solver - line 178 function start Thinking Playback() { // > Custom code page: Pedagogy Solver - line 179 var script = thinking Scripts[cur Task]; // > Custom code page: Pedagogy Solver - line 180 if (!script) { // > Custom code page: Pedagogy Solver - line 181 set Thinking Html(get Thinking Default Html()); // > Custom code page: Pedagogy Solver - line 182 return; // > Custom code page: Pedagogy Solver - line 183 } // > Custom code page: Pedagogy Solver - line 184 clear Thinking Timeouts(); // > Custom code page: Pedagogy Solver - line 185 thinking Running = true; // > Custom code page: Pedagogy Solver - line 186 thinking Enabled Snapshot = enabledposition.slice(); // > Custom code page: Pedagogy Solver - line 187 for (var i = 0; i < enabledposition.length; i++) { // > Custom code page: Pedagogy Solver - line 188 enabledposition[i] = "ENABLED_NONE"; // > Custom code page: Pedagogy Solver - line 189 } // > Custom code page: Pedagogy Solver - line 190 var items = []; // > Custom code page: Pedagogy Solver - line 191 var delay = 0; // > Custom code page: Pedagogy Solver - line 192 set Thinking Html(render Thinking Panel(script.title, script.lead, items, "")); // > Custom code page: Pedagogy Solver - line 193 _update(); // > Custom code page: Pedagogy Solver - line 194 for (var step Index = 0; step Index < script.steps.length; step Index++) { // > Custom code page: Pedagogy Solver - line 195 (function(step, current Delay) { // > Custom code page: Pedagogy Solver - line 196 thinking Timeouts.push(window.set Timeout(function() { // > Custom code page: Pedagogy Solver - line 197 if (step.move) { // > Custom code page: Pedagogy Solver - line 198 place Card Value In Group(step.move.value, step.move.group, step.move.slot); // > Custom code page: Pedagogy Solver - line 199 } // > Custom code page: Pedagogy Solver - line 200 items.push(step.text); // > Custom code page: Pedagogy Solver - line 201 set Thinking Html(render Thinking Panel(script.title, script.lead, items, "")); // > Custom code page: Pedagogy Solver - line 202 _update(); // > Custom code page: Pedagogy Solver - line 203 }, current Delay)); // > Custom code page: Pedagogy Solver - line 204 }(script.steps[step Index], delay + (script.steps[step Index].delay || 1400))); // > Custom code page: Pedagogy Solver - line 205 delay += (script.steps[step Index].delay || 1400); // > Custom code page: Pedagogy Solver - line 206 } // > Custom code page: Pedagogy Solver - line 207 thinking Timeouts.push(window.set Timeout(function() { // > Custom code page: Pedagogy Solver - line 208 thinking Running = false; // > Custom code page: Pedagogy Solver - line 209 if (thinking Enabled Snapshot.length === enabledposition.length) { // > Custom code page: Pedagogy Solver - line 210 enabledposition = thinking Enabled Snapshot.slice(); // > Custom code page: Pedagogy Solver - line 211 } // > Custom code page: Pedagogy Solver - line 212 set Thinking Html(render Thinking Panel(script.title, script.lead, items, script.finish)); // > Custom code page: Pedagogy Solver - line 213 _update(); // > Custom code page: Pedagogy Solver - line 214 }, delay + 300)); // > Custom code page: Pedagogy Solver - line 215 } // > Custom code page: Pedagogy Solver - line 216 // > Custom code page: Pedagogy Solver - line 217 function show Thinking Process() { // > Custom code page: Pedagogy Solver - line 218 stop Thinking Playback(false); // > Custom code page: Pedagogy Solver - line 219 _reset(); // > Custom code page: Pedagogy Solver - line 220 is First Try[cur Task - 1] = false; // > Custom code page: Pedagogy Solver - line 221 if (typeof question Append History === "function") { // > Custom code page: Pedagogy Solver - line 222 question Append History("Q" + cur Task, "Guided thinking viewed."); // > Custom code page: Pedagogy Solver - line 223 } // > Custom code page: Pedagogy Solver - line 224 start Thinking Playback(); // > Custom code page: Pedagogy Solver - line 225 } // > Custom code page: Pedagogy Solver - line 226 function on Answer Correct() { // > Custom code page: question - line 1 const qn = `Q${cur Task}`; // > Custom code page: question - line 2 const group Info = group Arr.map(format Group); // > Custom code page: question - line 3 // > Custom code page: question - line 4 start Question(qn); // > Custom code page: question - line 5 add Question History(`Valid answer${is First Try[cur Task - 1] ? " (First try)" : ""}:\n${group Info.join("\n")}\n`); // > Custom code page: question - line 6 award Question Marks(is First Try[cur Task - 1] ? 2 : 1) // > Custom code page: question - line 7 end Question(); // > Custom code page: question - line 8 } // > Custom code page: question - line 9 function on Answer Invalid() { // > Custom code page: question - line 10 const qn = `Q${cur Task}`; // > Custom code page: question - line 11 const group Info = group Arr.map(format Group); // > Custom code page: question - line 12 // > Custom code page: question - line 13 question Append History(qn, `Invalid answer:\n${group Info.join("\n")}\n`); // > Custom code page: question - line 14 } // > Custom code page: question - line 15 function on Answer Incorrect() { // > Custom code page: question - line 16 const qn = `Q${cur Task}`; // > Custom code page: question - line 17 is First Try[cur Task - 1] = false; // > Custom code page: question - line 18 const group Info = group Arr.map(format Group); // > Custom code page: question - line 19 // > Custom code page: question - line 20 question Append History(qn, `Incorrect answer:\n${group Info.join("\n")}\n`); // > Custom code page: question - line 21 } // > Custom code page: question - line 22 // > Custom code page: question - line 23 /** @param {number} value */ // > Custom code page: question - line 24 function format Slot(value) { // > Custom code page: question - line 25 return value === -1 ? "X" : value.to String(); // > Custom code page: question - line 26 } // > Custom code page: question - line 27 // > Custom code page: question - line 28 function format Group(group) { // > Custom code page: question - line 29 const results = ["("]; // > Custom code page: question - line 30 for (let i = 1; i < group.val.length; i++) { // > Custom code page: question - line 31 if (i > 1) results.push(" "); // > Custom code page: question - line 32 results.push(format Slot(group.val[i])); // > Custom code page: question - line 33 } // > Custom code page: question - line 34 results.push(`) Center: ${format Slot(group.val[0])} `); // > Custom code page: question - line 35 switch (group.is Valid()) { // > Custom code page: question - line 36 case -1: // > Custom code page: question - line 37 // do something if group.is Valid() === -1 // > Custom code page: question - line 38 results.push('🤔'); // > Custom code page: question - line 39 break; // > Custom code page: question - line 40 case 0: // > Custom code page: question - line 41 // do something if group.is Valid() === 0 // > Custom code page: question - line 42 results.push('❌'); // > Custom code page: question - line 43 break; // > Custom code page: question - line 44 case 1: // > Custom code page: question - line 45 // do something if group.is Valid() === 1 // > Custom code page: question - line 46 results.push('✅'); // > Custom code page: question - line 47 } // > Custom code page: question - line 48 return results.join(""); // > Custom code page: question - line 49 } // > Custom code page: question - line 50 // > Custom code page: question Lib - line 1 // copy into custom function // > Custom code page: Lib Page - line 1 document.onkeydown = function(evt) { // > Custom code page: Lib Page - line 2 evt = evt || window.event; // > Custom code page: Lib Page - line 3 var is Escape = false; // > Custom code page: Lib Page - line 4 if ("key" in evt) { // > Custom code page: Lib Page - line 5 is Escape = (evt.key === "Escape" || evt.key === "Esc"); // > Custom code page: Lib Page - line 6 } // > Custom code page: Lib Page - line 7 else { // > Custom code page: Lib Page - line 8 is Escape = (evt.key Code === 27); // > Custom code page: Lib Page - line 9 } // > Custom code page: Lib Page - line 10 if (is Escape) { // > Custom code page: Lib Page - line 11 //alert("Escape"); // > Custom code page: Lib Page - line 12 //esc Key Pressed = true // > Custom code page: Lib Page - line 13 esc Key Pressed = !esc Key Pressed; // Toggle esc Key Pressed // > Custom code page: Lib Page - line 14 } // > Custom code page: Lib Page - line 15 // > Custom code page: Lib Page - line 16 } // > Custom code page: Lib Page - line 17 _model.add To Initialization(function() { if (!__pages Enabled['Init Page']) return; // Initialising the cards // > Initialization page: Init Page - line 1 var cur X = -card Width * 9 / 2; // > Initialization page: Init Page - line 2 // > Initialization page: Init Page - line 3 for(var i = 1; i <= 20; i++){ // > Initialization page: Init Page - line 4 let idx = i - 1; // > Initialization page: Init Page - line 5 card Val[idx] = i; // > Initialization page: Init Page - line 6 card X[idx] = cur X; // > Initialization page: Init Page - line 7 if(i <= 10) // > Initialization page: Init Page - line 8 card Y[idx] = card Height * 2; // > Initialization page: Init Page - line 9 else // > Initialization page: Init Page - line 10 card Y[idx] = card Height; // > Initialization page: Init Page - line 11 // > Initialization page: Init Page - line 12 init X[idx] = card X[idx], init Y[idx] = card Y[idx]; // > Initialization page: Init Page - line 13 // > Initialization page: Init Page - line 14 cur X += card Width; // > Initialization page: Init Page - line 15 if(i == 10) // > Initialization page: Init Page - line 16 cur X = -card Width * 9 / 2; // > Initialization page: Init Page - line 17 // > Initialization page: Init Page - line 18 // which Group identifies which group the card is in currently. If the card is not in a group, which Group will be null // > Initialization page: Init Page - line 19 which Group[idx] = null; // > Initialization page: Init Page - line 20 // which Cricle identifies which circle the card is in currently. If the card is not in a cricle, which Cricle will be -1. // > Initialization page: Init Page - line 21 which Circle[idx] = -1; // > Initialization page: Init Page - line 22 } // > Initialization page: Init Page - line 23 // > Initialization page: Init Page - line 24 // > Initialization page: Init Page - line 25 // > Initialization page: Init Page - line 26 // > Initialization page: Init Page - line 27 // > Initialization page: Init Page - line 28 }); _model.add To Initialization(function() { if (!__pages Enabled['init Shape']) return; // shape Points is to define the points that we are going to use for the 2d polygons // > Initialization page: init Shape - line 1 var pen Radius = tri Radius = shape Length / 2; // > Initialization page: init Shape - line 2 shape Points = { // > Initialization page: init Shape - line 3 "triangle": [ // > Initialization page: init Shape - line 4 [0, tri Radius * Math.sin(Math.PI / 3), -tri Radius * Math.sin(Math.PI / 3), 0], // > Initialization page: init Shape - line 5 [tri Radius, -tri Radius * Math.cos(Math.PI / 3), -tri Radius * Math.cos(Math.PI / 3), tri Radius] // > Initialization page: init Shape - line 6 ], // > Initialization page: init Shape - line 7 "square": [ // > Initialization page: init Shape - line 8 [-shape Length / 2, shape Length / 2, shape Length / 2, -shape Le generated-with: Web EJS : The web version of Easy Java Script Simulations, version Web EJS 1.1, build 240815. Visit https://www.um.es/fem/wikis/webejs/ fixed-navbar: false title: ejss_model_astoundingly_average Astoundingly Average Number Game to promote Creative Thinking preview image

1. Watch or Launch

Launch the Interactive

Open the simulation, adjust the controls, and compare what changes on screen before answering the concept-check questions.

Launch Interactive

Advertisement

2. Big Ideas

Key idea This interactive model helps learners test a prediction, observe the result, and explain the relationship shown in Task 1: One possible solution", // > Custom code page: Pedagogy Solver - line 11 lead: "Strategy: choose three outer cards whose total is divisible by 3, because the center must be their average.", // > Custom code page: Pedagogy Solver - line 12 finish: "This is one valid solution. Many other solutions are possible.", // > Custom code page: Pedagogy Solver - line 13 steps: [ // > Custom code page: Pedagogy Solver - line 14 { text: "Place 1 in a circle.", move: { value: 1, group: 0, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 15 { text: "Place 2 in another circle.", move: { value: 2, group: 0, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 16 { text: "Place 9 in the last circle. The outer total is now 1 + 2 + 9 = 12.", move: { value: 9, group: 0, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 17 { text: "Now divide by 3. Since 12 / 3 = 4, place 4 in the triangle.", move: { value: 4, group: 0, slot: 0 } } // > Custom code page: Pedagogy Solver - line 18 ] // > Custom code page: Pedagogy Solver - line 19 }, // > Custom code page: Pedagogy Solver - line 20 2: { // > Custom code page: Pedagogy Solver - line 21 title: "Task 2: Solve one shape at a time", // > Custom code page: Pedagogy Solver - line 22 lead: "A good strategy is to complete one pattern first, then use a second average relationship for the other pattern.", // > Custom code page: Pedagogy Solver - line 23 finish: "This is one valid arrangement of 9 different cards. Students can look for other working sets too.", // > Custom code page: Pedagogy Solver - line 24 steps: [ // > Custom code page: Pedagogy Solver - line 25 { text: "Start with the triangle. Place 1 in a circle.", move: { value: 1, group: 0, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 26 { text: "Place 2 in the next triangle circle.", move: { value: 2, group: 0, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 27 { text: "Place 6 in the last triangle circle. The outer total is 1 + 2 + 6 = 9.", move: { value: 6, group: 0, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 28 { text: "The average is 9 / 3 = 3, so place 3 in the triangle.", move: { value: 3, group: 0, slot: 0 } }, // > Custom code page: Pedagogy Solver - line 29 { text: "Now solve the square. Place 4 on the square.", move: { value: 4, group: 1, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 30 { text: "Add 5 to the square.", move: { value: 5, group: 1, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 31 { text: "Add 8 to the square.", move: { value: 8, group: 1, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 32 { text: "Place 11 in the last square circle. The outer total is 4 + 5 + 8 + 11 = 28.", move: { value: 11, group: 1, slot: 4 } }, // > Custom code page: Pedagogy Solver - line 33 { text: "The square center must be 28 / 4 = 7, so place 7 in the square.", move: { value: 7, group: 1, slot: 0 } } // > Custom code page: Pedagogy Solver - line 34 ] // > Custom code page: Pedagogy Solver - line 35 }, // > Custom code page: Pedagogy Solver - line 36 3: { // > Custom code page: Pedagogy Solver - line 37 title: "Task 3: Work backward from the given cards", // > Custom code page: Pedagogy Solver - line 38 lead: "Here the three given cards fix the outer total, so the missing card is determined by the average rule.", // > Custom code page: Pedagogy Solver - line 39 finish: "The missing card is 16 because it is the average of 13, 17 and 18.", // > Custom code page: Pedagogy Solver - line 40 steps: [ // > Custom code page: Pedagogy Solver - line 41 { text: "Place the given card 13 in a circle.", move: { value: 13, group: 0, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 42 { text: "Place the given card 17 in another circle.", move: { value: 17, group: 0, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 43 { text: "Place the given card 18 in the last circle. Their total is 13 + 17 + 18 = 48.", move: { value: 18, group: 0, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 44 { text: "Divide by 3. Since 48 / 3 = 16, the missing card must be 16.", move: { value: 16, group: 0, slot: 0 } } // > Custom code page: Pedagogy Solver - line 45 ] // > Custom code page: Pedagogy Solver - line 46 }, // > Custom code page: Pedagogy Solver - line 47 4: { // > Custom code page: Pedagogy Solver - line 48 title: "Task 4: Why there is no solution", // > Custom code page: Pedagogy Solver - line 49 lead: "The fastest route is to reason algebraically instead of guessing and checking.", // > Custom code page: Pedagogy Solver - line 50 finish: "So no set of four consecutive cards can satisfy the triangle-average rule.", // > Custom code page: Pedagogy Solver - line 51 steps: [ // > Custom code page: Pedagogy Solver - line 52 { text: "Call the four consecutive cards n, n + 1, n + 2 and n + 3." }, // > Custom code page: Pedagogy Solver - line 53 { text: "Their total is 4n + 6." }, // > Custom code page: Pedagogy Solver - line 54 { text: "If one card were the average of the other three, then all four cards together would total 4 times the center card." }, // > Custom code page: Pedagogy Solver - line 55 { text: "That means the total would have to be a multiple of 4." }, // > Custom code page: Pedagogy Solver - line 56 { text: "But 4n + 6 always leaves remainder 2 when divided by 4, so it can never be a multiple of 4." } // > Custom code page: Pedagogy Solver - line 57 ] // > Custom code page: Pedagogy Solver - line 58 }, // > Custom code page: Pedagogy Solver - line 59 5: { // > Custom code page: Pedagogy Solver - line 60 title: "Task 5: Use all 8 cards across two triangles", // > Custom code page: Pedagogy Solver - line 61 lead: "Solve one triangle cleanly, then use the remaining cards to complete the second triangle.", // > Custom code page: Pedagogy Solver - line 62 finish: "This uses each number from 1 to 8 exactly once. A second solution also exists.", // > Custom code page: Pedagogy Solver - line 63 steps: [ // > Custom code page: Pedagogy Solver - line 64 { text: "For the first triangle, place 1 in a circle.", move: { value: 1, group: 0, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 65 { text: "Place 3 in another circle.", move: { value: 3, group: 0, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 66 { text: "Place 8 in the last circle. The outer total is 1 + 3 + 8 = 12.", move: { value: 8, group: 0, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 67 { text: "So the first center is 12 / 3 = 4. Place 4 in the triangle.", move: { value: 4, group: 0, slot: 0 } }, // > Custom code page: Pedagogy Solver - line 68 { text: "Now use the remaining cards on the second triangle. Place 2 in a circle.", move: { value: 2, group: 1, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 69 { text: "Place 6 in another circle.", move: { value: 6, group: 1, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 70 { text: "Place 7 in the last circle. The outer total is 2 + 6 + 7 = 15.", move: { value: 7, group: 1, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 71 { text: "So the second center is 15 / 3 = 5. Place 5 in the triangle.", move: { value: 5, group: 1, slot: 0 } } // > Custom code page: Pedagogy Solver - line 72 ] // > Custom code page: Pedagogy Solver - line 73 }, // > Custom code page: Pedagogy Solver - line 74 6: { // > Custom code page: Pedagogy Solver - line 75 title: "Task 6: Build each pentagon from an average of 5 cards", // > Custom code page: Pedagogy Solver - line 76 lead: "For each pentagon, add the five outer cards first. The center must be one fifth of that total.", // > Custom code page: Pedagogy Solver - line 77 finish: "This is one valid arrangement. There are many more because several outer totals can work.", // > Custom code page: Pedagogy Solver - line 78 steps: [ // > Custom code page: Pedagogy Solver - line 79 { text: "For the first pentagon, place 1 on the outside.", move: { value: 1, group: 0, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 80 { text: "Add 2 to the outside.", move: { value: 2, group: 0, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 81 { text: "Add 3 to the outside.", move: { value: 3, group: 0, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 82 { text: "Add 6 to the outside.", move: { value: 6, group: 0, slot: 4 } }, // > Custom code page: Pedagogy Solver - line 83 { text: "Add 8 to the last outside spot. The outer total is 1 + 2 + 3 + 6 + 8 = 20.", move: { value: 8, group: 0, slot: 5 } }, // > Custom code page: Pedagogy Solver - line 84 { text: "So the first center is 20 / 5 = 4. Place 4 in the pentagon.", move: { value: 4, group: 0, slot: 0 } }, // > Custom code page: Pedagogy Solver - line 85 { text: "Now solve the second pentagon. Place 5 on the outside.", move: { value: 5, group: 1, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 86 { text: "Add 7 to the outside.", move: { value: 7, group: 1, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 87 { text: "Add 10 to the outside.", move: { value: 10, group: 1, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 88 { text: "Add 11 to the outside.", move: { value: 11, group: 1, slot: 4 } }, // > Custom code page: Pedagogy Solver - line 89 { text: "Add 12 to the last outside spot. The outer total is 5 + 7 + 10 + 11 + 12 = 45.", move: { value: 12, group: 1, slot: 5 } }, // > Custom code page: Pedagogy Solver - line 90 { text: "So the second center is 45 / 5 = 9. Place 9 in the pentagon.", move: { value: 9, group: 1, slot: 0 } } // > Custom code page: Pedagogy Solver - line 91 ] // > Custom code page: Pedagogy Solver - line 92 }, // > Custom code page: Pedagogy Solver - line 93 7: { // > Custom code page: Pedagogy Solver - line 94 title: "Task 7: Why there is no solution", // > Custom code page: Pedagogy Solver - line 95 lead: "Use a total-sum argument. It is faster and more convincing than random trial and error.", // > Custom code page: Pedagogy Solver - line 96 finish: "So the cards 1 to 12 cannot be split into three valid triangle-average groups.", // > Custom code page: Pedagogy Solver - line 97 steps: [ // > Custom code page: Pedagogy Solver - line 98 { text: "In any triangle group, the center equals the average of the three outer cards." }, // > Custom code page: Pedagogy Solver - line 99 { text: "So the outer total equals 3 times the center." }, // > Custom code page: Pedagogy Solver - line 100 { text: "That means the total of all four cards in one triangle group is 4 times the center, so it must be a multiple of 4." }, // > Custom code page: Pedagogy Solver - line 101 { text: "If all three triangle groups were valid, the grand total of all 12 cards would also have to be a multiple of 4." }, // > Custom code page: Pedagogy Solver - line 102 { text: "But 1 + 2 + 3 + ... + 12 = 78, and 78 is not a multiple of 4." } // > Custom code page: Pedagogy Solver - line 103 ] // > Custom code page: Pedagogy Solver - line 104 } // > Custom code page: Pedagogy Solver - line 105 }; // > Custom code page: Pedagogy Solver - line 106 // > Custom code page: Pedagogy Solver - line 107 function render Thinking Panel(title, lead, items, conclusion) { // > Custom code page: Pedagogy Solver - line 108 var html = "<b>" + title + "</b><br/>" + lead; // > Custom code page: Pedagogy Solver - line 109 if (items.length > 0) { // > Custom code page: Pedagogy Solver - line 110 html += "<ol>"; // > Custom code page: Pedagogy Solver - line 111 for (var i = 0; i < items.length; i++) { // > Custom code page: Pedagogy Solver - line 112 html += "<li>" + items[i] + "</li>"; // > Custom code page: Pedagogy Solver - line 113 } // > Custom code page: Pedagogy Solver - line 114 html += "</ol>"; // > Custom code page: Pedagogy Solver - line 115 } // > Custom code page: Pedagogy Solver - line 116 if (conclusion) { // > Custom code page: Pedagogy Solver - line 117 html += "<p><b>Conclusion:</b> " + conclusion + "</p>"; // > Custom code page: Pedagogy Solver - line 118 } // > Custom code page: Pedagogy Solver - line 119 return html; // > Custom code page: Pedagogy Solver - line 120 } // > Custom code page: Pedagogy Solver - line 121 // > Custom code page: Pedagogy Solver - line 122 function set Thinking Html(html) { // > Custom code page: Pedagogy Solver - line 123 if (_view && _view.solver Text) { // > Custom code page: Pedagogy Solver - line 124 _view.solver Text.set Property("Text", html); // > Custom code page: Pedagogy Solver - line 125 } // > Custom code page: Pedagogy Solver - line 126 } // > Custom code page: Pedagogy Solver - line 127 // > Custom code page: Pedagogy Solver - line 128 function clear Thinking Timeouts() { // > Custom code page: Pedagogy Solver - line 129 for (var i = 0; i < thinking Timeouts.length; i++) { // > Custom code page: Pedagogy Solver - line 130 window.clear Timeout(thinking Timeouts[i]); // > Custom code page: Pedagogy Solver - line 131 } // > Custom code page: Pedagogy Solver - line 132 thinking Timeouts = []; // > Custom code page: Pedagogy Solver - line 133 } // > Custom code page: Pedagogy Solver - line 134 // > Custom code page: Pedagogy Solver - line 135 function stop Thinking Playback(reset Panel) { // > Custom code page: Pedagogy Solver - line 136 if (reset Panel === undefined) { // > Custom code page: Pedagogy Solver - line 137 reset Panel = true; // > Custom code page: Pedagogy Solver - line 138 } // > Custom code page: Pedagogy Solver - line 139 clear Thinking Timeouts(); // > Custom code page: Pedagogy Solver - line 140 thinking Running = false; // > Custom code page: Pedagogy Solver - line 141 if (thinking Enabled Snapshot.length === enabledposition.length) { // > Custom code page: Pedagogy Solver - line 142 enabledposition = thinking Enabled Snapshot.slice(); // > Custom code page: Pedagogy Solver - line 143 } // > Custom code page: Pedagogy Solver - line 144 thinking Enabled Snapshot = []; // > Custom code page: Pedagogy Solver - line 145 if (reset Panel) { // > Custom code page: Pedagogy Solver - line 146 set Thinking Html(get Thinking Default Html()); // > Custom code page: Pedagogy Solver - line 147 } // > Custom code page: Pedagogy Solver - line 148 _update(); // > Custom code page: Pedagogy Solver - line 149 } // > Custom code page: Pedagogy Solver - line 150 // > Custom code page: Pedagogy Solver - line 151 function get Card Index For Value(value) { // > Custom code page: Pedagogy Solver - line 152 for (var i = 0; i < card Val.length; i++) { // > Custom code page: Pedagogy Solver - line 153 if (card Val[i] === value) { // > Custom code page: Pedagogy Solver - line 154 return i; // > Custom code page: Pedagogy Solver - line 155 } // > Custom code page: Pedagogy Solver - line 156 } // > Custom code page: Pedagogy Solver - line 157 return -1; // > Custom code page: Pedagogy Solver - line 158 } // > Custom code page: Pedagogy Solver - line 159 // > Custom code page: Pedagogy Solver - line 160 function place Card Value In Group(value, group Index, slot Index) { // > Custom code page: Pedagogy Solver - line 161 var card Index = get Card Index For Value(value); // > Custom code page: Pedagogy Solver - line 162 if (card Index < 0 || !group Arr[group Index]) { // > Custom code page: Pedagogy Solver - line 163 return false; // > Custom code page: Pedagogy Solver - line 164 } // > Custom code page: Pedagogy Solver - line 165 if (which Group[card Index] != null) { // > Custom code page: Pedagogy Solver - line 166 which Group[card Index].val[which Circle[card Index]] = -1; // > Custom code page: Pedagogy Solver - line 167 } // > Custom code page: Pedagogy Solver - line 168 var target Group = group Arr[group Index]; // > Custom code page: Pedagogy Solver - line 169 card X[card Index] = target Group.x Pos[slot Index]; // > Custom code page: Pedagogy Solver - line 170 card Y[card Index] = target Group.y Pos[slot Index]; // > Custom code page: Pedagogy Solver - line 171 target Group.val[slot Index] = card Val[card Index]; // > Custom code page: Pedagogy Solver - line 172 which Group[card Index] = target Group; // > Custom code page: Pedagogy Solver - line 173 which Circle[card Index] = slot Index; // > Custom code page: Pedagogy Solver - line 174 card Color[card Index] = "#c5e1a5"; // > Custom code page: Pedagogy Solver - line 175 return true; // > Custom code page: Pedagogy Solver - line 176 } // > Custom code page: Pedagogy Solver - line 177 // > Custom code page: Pedagogy Solver - line 178 function start Thinking Playback() { // > Custom code page: Pedagogy Solver - line 179 var script = thinking Scripts[cur Task]; // > Custom code page: Pedagogy Solver - line 180 if (!script) { // > Custom code page: Pedagogy Solver - line 181 set Thinking Html(get Thinking Default Html()); // > Custom code page: Pedagogy Solver - line 182 return; // > Custom code page: Pedagogy Solver - line 183 } // > Custom code page: Pedagogy Solver - line 184 clear Thinking Timeouts(); // > Custom code page: Pedagogy Solver - line 185 thinking Running = true; // > Custom code page: Pedagogy Solver - line 186 thinking Enabled Snapshot = enabledposition.slice(); // > Custom code page: Pedagogy Solver - line 187 for (var i = 0; i < enabledposition.length; i++) { // > Custom code page: Pedagogy Solver - line 188 enabledposition[i] = "ENABLED_NONE"; // > Custom code page: Pedagogy Solver - line 189 } // > Custom code page: Pedagogy Solver - line 190 var items = []; // > Custom code page: Pedagogy Solver - line 191 var delay = 0; // > Custom code page: Pedagogy Solver - line 192 set Thinking Html(render Thinking Panel(script.title, script.lead, items, "")); // > Custom code page: Pedagogy Solver - line 193 _update(); // > Custom code page: Pedagogy Solver - line 194 for (var step Index = 0; step Index < script.steps.length; step Index++) { // > Custom code page: Pedagogy Solver - line 195 (function(step, current Delay) { // > Custom code page: Pedagogy Solver - line 196 thinking Timeouts.push(window.set Timeout(function() { // > Custom code page: Pedagogy Solver - line 197 if (step.move) { // > Custom code page: Pedagogy Solver - line 198 place Card Value In Group(step.move.value, step.move.group, step.move.slot); // > Custom code page: Pedagogy Solver - line 199 } // > Custom code page: Pedagogy Solver - line 200 items.push(step.text); // > Custom code page: Pedagogy Solver - line 201 set Thinking Html(render Thinking Panel(script.title, script.lead, items, "")); // > Custom code page: Pedagogy Solver - line 202 _update(); // > Custom code page: Pedagogy Solver - line 203 }, current Delay)); // > Custom code page: Pedagogy Solver - line 204 }(script.steps[step Index], delay + (script.steps[step Index].delay || 1400))); // > Custom code page: Pedagogy Solver - line 205 delay += (script.steps[step Index].delay || 1400); // > Custom code page: Pedagogy Solver - line 206 } // > Custom code page: Pedagogy Solver - line 207 thinking Timeouts.push(window.set Timeout(function() { // > Custom code page: Pedagogy Solver - line 208 thinking Running = false; // > Custom code page: Pedagogy Solver - line 209 if (thinking Enabled Snapshot.length === enabledposition.length) { // > Custom code page: Pedagogy Solver - line 210 enabledposition = thinking Enabled Snapshot.slice(); // > Custom code page: Pedagogy Solver - line 211 } // > Custom code page: Pedagogy Solver - line 212 set Thinking Html(render Thinking Panel(script.title, script.lead, items, script.finish)); // > Custom code page: Pedagogy Solver - line 213 _update(); // > Custom code page: Pedagogy Solver - line 214 }, delay + 300)); // > Custom code page: Pedagogy Solver - line 215 } // > Custom code page: Pedagogy Solver - line 216 // > Custom code page: Pedagogy Solver - line 217 function show Thinking Process() { // > Custom code page: Pedagogy Solver - line 218 stop Thinking Playback(false); // > Custom code page: Pedagogy Solver - line 219 _reset(); // > Custom code page: Pedagogy Solver - line 220 is First Try[cur Task - 1] = false; // > Custom code page: Pedagogy Solver - line 221 if (typeof question Append History === "function") { // > Custom code page: Pedagogy Solver - line 222 question Append History("Q" + cur Task, "Guided thinking viewed."); // > Custom code page: Pedagogy Solver - line 223 } // > Custom code page: Pedagogy Solver - line 224 start Thinking Playback(); // > Custom code page: Pedagogy Solver - line 225 } // > Custom code page: Pedagogy Solver - line 226 function on Answer Correct() { // > Custom code page: question - line 1 const qn = `Q${cur Task}`; // > Custom code page: question - line 2 const group Info = group Arr.map(format Group); // > Custom code page: question - line 3 // > Custom code page: question - line 4 start Question(qn); // > Custom code page: question - line 5 add Question History(`Valid answer${is First Try[cur Task - 1] ? " (First try)" : ""}:\n${group Info.join("\n")}\n`); // > Custom code page: question - line 6 award Question Marks(is First Try[cur Task - 1] ? 2 : 1) // > Custom code page: question - line 7 end Question(); // > Custom code page: question - line 8 } // > Custom code page: question - line 9 function on Answer Invalid() { // > Custom code page: question - line 10 const qn = `Q${cur Task}`; // > Custom code page: question - line 11 const group Info = group Arr.map(format Group); // > Custom code page: question - line 12 // > Custom code page: question - line 13 question Append History(qn, `Invalid answer:\n${group Info.join("\n")}\n`); // > Custom code page: question - line 14 } // > Custom code page: question - line 15 function on Answer Incorrect() { // > Custom code page: question - line 16 const qn = `Q${cur Task}`; // > Custom code page: question - line 17 is First Try[cur Task - 1] = false; // > Custom code page: question - line 18 const group Info = group Arr.map(format Group); // > Custom code page: question - line 19 // > Custom code page: question - line 20 question Append History(qn, `Incorrect answer:\n${group Info.join("\n")}\n`); // > Custom code page: question - line 21 } // > Custom code page: question - line 22 // > Custom code page: question - line 23 /** @param {number} value */ // > Custom code page: question - line 24 function format Slot(value) { // > Custom code page: question - line 25 return value === -1 ? "X" : value.to String(); // > Custom code page: question - line 26 } // > Custom code page: question - line 27 // > Custom code page: question - line 28 function format Group(group) { // > Custom code page: question - line 29 const results = ["("]; // > Custom code page: question - line 30 for (let i = 1; i < group.val.length; i++) { // > Custom code page: question - line 31 if (i > 1) results.push(" "); // > Custom code page: question - line 32 results.push(format Slot(group.val[i])); // > Custom code page: question - line 33 } // > Custom code page: question - line 34 results.push(`) Center: ${format Slot(group.val[0])} `); // > Custom code page: question - line 35 switch (group.is Valid()) { // > Custom code page: question - line 36 case -1: // > Custom code page: question - line 37 // do something if group.is Valid() === -1 // > Custom code page: question - line 38 results.push('🤔'); // > Custom code page: question - line 39 break; // > Custom code page: question - line 40 case 0: // > Custom code page: question - line 41 // do something if group.is Valid() === 0 // > Custom code page: question - line 42 results.push('❌'); // > Custom code page: question - line 43 break; // > Custom code page: question - line 44 case 1: // > Custom code page: question - line 45 // do something if group.is Valid() === 1 // > Custom code page: question - line 46 results.push('✅'); // > Custom code page: question - line 47 } // > Custom code page: question - line 48 return results.join(""); // > Custom code page: question - line 49 } // > Custom code page: question - line 50 // > Custom code page: question Lib - line 1 // copy into custom function // > Custom code page: Lib Page - line 1 document.onkeydown = function(evt) { // > Custom code page: Lib Page - line 2 evt = evt || window.event; // > Custom code page: Lib Page - line 3 var is Escape = false; // > Custom code page: Lib Page - line 4 if ("key" in evt) { // > Custom code page: Lib Page - line 5 is Escape = (evt.key === "Escape" || evt.key === "Esc"); // > Custom code page: Lib Page - line 6 } // > Custom code page: Lib Page - line 7 else { // > Custom code page: Lib Page - line 8 is Escape = (evt.key Code === 27); // > Custom code page: Lib Page - line 9 } // > Custom code page: Lib Page - line 10 if (is Escape) { // > Custom code page: Lib Page - line 11 //alert("Escape"); // > Custom code page: Lib Page - line 12 //esc Key Pressed = true // > Custom code page: Lib Page - line 13 esc Key Pressed = !esc Key Pressed; // Toggle esc Key Pressed // > Custom code page: Lib Page - line 14 } // > Custom code page: Lib Page - line 15 // > Custom code page: Lib Page - line 16 } // > Custom code page: Lib Page - line 17 _model.add To Initialization(function() { if (!__pages Enabled['Init Page']) return; // Initialising the cards // > Initialization page: Init Page - line 1 var cur X = -card Width * 9 / 2; // > Initialization page: Init Page - line 2 // > Initialization page: Init Page - line 3 for(var i = 1; i <= 20; i++){ // > Initialization page: Init Page - line 4 let idx = i - 1; // > Initialization page: Init Page - line 5 card Val[idx] = i; // > Initialization page: Init Page - line 6 card X[idx] = cur X; // > Initialization page: Init Page - line 7 if(i <= 10) // > Initialization page: Init Page - line 8 card Y[idx] = card Height * 2; // > Initialization page: Init Page - line 9 else // > Initialization page: Init Page - line 10 card Y[idx] = card Height; // > Initialization page: Init Page - line 11 // > Initialization page: Init Page - line 12 init X[idx] = card X[idx], init Y[idx] = card Y[idx]; // > Initialization page: Init Page - line 13 // > Initialization page: Init Page - line 14 cur X += card Width; // > Initialization page: Init Page - line 15 if(i == 10) // > Initialization page: Init Page - line 16 cur X = -card Width * 9 / 2; // > Initialization page: Init Page - line 17 // > Initialization page: Init Page - line 18 // which Group identifies which group the card is in currently. If the card is not in a group, which Group will be null // > Initialization page: Init Page - line 19 which Group[idx] = null; // > Initialization page: Init Page - line 20 // which Cricle identifies which circle the card is in currently. If the card is not in a cricle, which Cricle will be -1. // > Initialization page: Init Page - line 21 which Circle[idx] = -1; // > Initialization page: Init Page - line 22 } // > Initialization page: Init Page - line 23 // > Initialization page: Init Page - line 24 // > Initialization page: Init Page - line 25 // > Initialization page: Init Page - line 26 // > Initialization page: Init Page - line 27 // > Initialization page: Init Page - line 28 }); _model.add To Initialization(function() { if (!__pages Enabled['init Shape']) return; // shape Points is to define the points that we are going to use for the 2d polygons // > Initialization page: init Shape - line 1 var pen Radius = tri Radius = shape Length / 2; // > Initialization page: init Shape - line 2 shape Points = { // > Initialization page: init Shape - line 3 "triangle": [ // > Initialization page: init Shape - line 4 [0, tri Radius * Math.sin(Math.PI / 3), -tri Radius * Math.sin(Math.PI / 3), 0], // > Initialization page: init Shape - line 5 [tri Radius, -tri Radius * Math.cos(Math.PI / 3), -tri Radius * Math.cos(Math.PI / 3), tri Radius] // > Initialization page: init Shape - line 6 ], // > Initialization page: init Shape - line 7 "square": [ // > Initialization page: init Shape - line 8 [-shape Length / 2, shape Length / 2, shape Length / 2, -shape Le generated-with: Web EJS : The web version of Easy Java Script Simulations, version Web EJS 1.1, build 240815. Visit https://www.um.es/fem/wikis/webejs/ fixed-navbar: false title: ejss_model_astoundingly_average Astoundingly Average Number Game to promote Creative Thinking.

What Students Can Learn

  • Identify the main controls and the visible output.
  • Change one setting at a time.
  • Compare two cases using evidence from the screen.
  • State the concept or rule shown by the model.

Guiding Question

What relationship does the model help you see more clearly?

3. Try the Investigation

Predict

Choose one control and predict what will happen before changing it.

Observe

Change one setting and describe exactly what changes on screen.

Compare

Test a second setting and compare the two outcomes.

Explain

Use the evidence from the model to explain the concept or rule being illustrated.

4. Teacher Notes

Lesson Use

Use the simulation as a short inquiry activity: predict first, change one control, observe the result, then explain the relationship shown by the model.

Discussion Prompts

Ask learners what changed, what stayed constant, what evidence they used, and how the model helps them explain the concept more clearly.

5. Concept Check

These questions are generated from the topic and the concept illustrated by the simulation. Use them after students have explored the model.

Concept Score

Correct first attempts build a streak and unlock higher point multipliers on this device.

0page points
0current streak
x1multiplier
0best streak
Answer each question once to build your streak.

1. What should learners do first when using Task 1: One possible solution", // > Custom code page: Pedagogy Solver - line 11 lead: "Strategy: choose three outer cards whose total is divisible by 3, because the center must be their average.", // > Custom code page: Pedagogy Solver - line 12 finish: "This is one valid solution. Many other solutions are possible.", // > Custom code page: Pedagogy Solver - line 13 steps: [ // > Custom code page: Pedagogy Solver - line 14 { text: "Place 1 in a circle.", move: { value: 1, group: 0, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 15 { text: "Place 2 in another circle.", move: { value: 2, group: 0, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 16 { text: "Place 9 in the last circle. The outer total is now 1 + 2 + 9 = 12.", move: { value: 9, group: 0, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 17 { text: "Now divide by 3. Since 12 / 3 = 4, place 4 in the triangle.", move: { value: 4, group: 0, slot: 0 } } // > Custom code page: Pedagogy Solver - line 18 ] // > Custom code page: Pedagogy Solver - line 19 }, // > Custom code page: Pedagogy Solver - line 20 2: { // > Custom code page: Pedagogy Solver - line 21 title: "Task 2: Solve one shape at a time", // > Custom code page: Pedagogy Solver - line 22 lead: "A good strategy is to complete one pattern first, then use a second average relationship for the other pattern.", // > Custom code page: Pedagogy Solver - line 23 finish: "This is one valid arrangement of 9 different cards. Students can look for other working sets too.", // > Custom code page: Pedagogy Solver - line 24 steps: [ // > Custom code page: Pedagogy Solver - line 25 { text: "Start with the triangle. Place 1 in a circle.", move: { value: 1, group: 0, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 26 { text: "Place 2 in the next triangle circle.", move: { value: 2, group: 0, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 27 { text: "Place 6 in the last triangle circle. The outer total is 1 + 2 + 6 = 9.", move: { value: 6, group: 0, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 28 { text: "The average is 9 / 3 = 3, so place 3 in the triangle.", move: { value: 3, group: 0, slot: 0 } }, // > Custom code page: Pedagogy Solver - line 29 { text: "Now solve the square. Place 4 on the square.", move: { value: 4, group: 1, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 30 { text: "Add 5 to the square.", move: { value: 5, group: 1, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 31 { text: "Add 8 to the square.", move: { value: 8, group: 1, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 32 { text: "Place 11 in the last square circle. The outer total is 4 + 5 + 8 + 11 = 28.", move: { value: 11, group: 1, slot: 4 } }, // > Custom code page: Pedagogy Solver - line 33 { text: "The square center must be 28 / 4 = 7, so place 7 in the square.", move: { value: 7, group: 1, slot: 0 } } // > Custom code page: Pedagogy Solver - line 34 ] // > Custom code page: Pedagogy Solver - line 35 }, // > Custom code page: Pedagogy Solver - line 36 3: { // > Custom code page: Pedagogy Solver - line 37 title: "Task 3: Work backward from the given cards", // > Custom code page: Pedagogy Solver - line 38 lead: "Here the three given cards fix the outer total, so the missing card is determined by the average rule.", // > Custom code page: Pedagogy Solver - line 39 finish: "The missing card is 16 because it is the average of 13, 17 and 18.", // > Custom code page: Pedagogy Solver - line 40 steps: [ // > Custom code page: Pedagogy Solver - line 41 { text: "Place the given card 13 in a circle.", move: { value: 13, group: 0, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 42 { text: "Place the given card 17 in another circle.", move: { value: 17, group: 0, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 43 { text: "Place the given card 18 in the last circle. Their total is 13 + 17 + 18 = 48.", move: { value: 18, group: 0, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 44 { text: "Divide by 3. Since 48 / 3 = 16, the missing card must be 16.", move: { value: 16, group: 0, slot: 0 } } // > Custom code page: Pedagogy Solver - line 45 ] // > Custom code page: Pedagogy Solver - line 46 }, // > Custom code page: Pedagogy Solver - line 47 4: { // > Custom code page: Pedagogy Solver - line 48 title: "Task 4: Why there is no solution", // > Custom code page: Pedagogy Solver - line 49 lead: "The fastest route is to reason algebraically instead of guessing and checking.", // > Custom code page: Pedagogy Solver - line 50 finish: "So no set of four consecutive cards can satisfy the triangle-average rule.", // > Custom code page: Pedagogy Solver - line 51 steps: [ // > Custom code page: Pedagogy Solver - line 52 { text: "Call the four consecutive cards n, n + 1, n + 2 and n + 3." }, // > Custom code page: Pedagogy Solver - line 53 { text: "Their total is 4n + 6." }, // > Custom code page: Pedagogy Solver - line 54 { text: "If one card were the average of the other three, then all four cards together would total 4 times the center card." }, // > Custom code page: Pedagogy Solver - line 55 { text: "That means the total would have to be a multiple of 4." }, // > Custom code page: Pedagogy Solver - line 56 { text: "But 4n + 6 always leaves remainder 2 when divided by 4, so it can never be a multiple of 4." } // > Custom code page: Pedagogy Solver - line 57 ] // > Custom code page: Pedagogy Solver - line 58 }, // > Custom code page: Pedagogy Solver - line 59 5: { // > Custom code page: Pedagogy Solver - line 60 title: "Task 5: Use all 8 cards across two triangles", // > Custom code page: Pedagogy Solver - line 61 lead: "Solve one triangle cleanly, then use the remaining cards to complete the second triangle.", // > Custom code page: Pedagogy Solver - line 62 finish: "This uses each number from 1 to 8 exactly once. A second solution also exists.", // > Custom code page: Pedagogy Solver - line 63 steps: [ // > Custom code page: Pedagogy Solver - line 64 { text: "For the first triangle, place 1 in a circle.", move: { value: 1, group: 0, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 65 { text: "Place 3 in another circle.", move: { value: 3, group: 0, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 66 { text: "Place 8 in the last circle. The outer total is 1 + 3 + 8 = 12.", move: { value: 8, group: 0, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 67 { text: "So the first center is 12 / 3 = 4. Place 4 in the triangle.", move: { value: 4, group: 0, slot: 0 } }, // > Custom code page: Pedagogy Solver - line 68 { text: "Now use the remaining cards on the second triangle. Place 2 in a circle.", move: { value: 2, group: 1, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 69 { text: "Place 6 in another circle.", move: { value: 6, group: 1, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 70 { text: "Place 7 in the last circle. The outer total is 2 + 6 + 7 = 15.", move: { value: 7, group: 1, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 71 { text: "So the second center is 15 / 3 = 5. Place 5 in the triangle.", move: { value: 5, group: 1, slot: 0 } } // > Custom code page: Pedagogy Solver - line 72 ] // > Custom code page: Pedagogy Solver - line 73 }, // > Custom code page: Pedagogy Solver - line 74 6: { // > Custom code page: Pedagogy Solver - line 75 title: "Task 6: Build each pentagon from an average of 5 cards", // > Custom code page: Pedagogy Solver - line 76 lead: "For each pentagon, add the five outer cards first. The center must be one fifth of that total.", // > Custom code page: Pedagogy Solver - line 77 finish: "This is one valid arrangement. There are many more because several outer totals can work.", // > Custom code page: Pedagogy Solver - line 78 steps: [ // > Custom code page: Pedagogy Solver - line 79 { text: "For the first pentagon, place 1 on the outside.", move: { value: 1, group: 0, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 80 { text: "Add 2 to the outside.", move: { value: 2, group: 0, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 81 { text: "Add 3 to the outside.", move: { value: 3, group: 0, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 82 { text: "Add 6 to the outside.", move: { value: 6, group: 0, slot: 4 } }, // > Custom code page: Pedagogy Solver - line 83 { text: "Add 8 to the last outside spot. The outer total is 1 + 2 + 3 + 6 + 8 = 20.", move: { value: 8, group: 0, slot: 5 } }, // > Custom code page: Pedagogy Solver - line 84 { text: "So the first center is 20 / 5 = 4. Place 4 in the pentagon.", move: { value: 4, group: 0, slot: 0 } }, // > Custom code page: Pedagogy Solver - line 85 { text: "Now solve the second pentagon. Place 5 on the outside.", move: { value: 5, group: 1, slot: 1 } }, // > Custom code page: Pedagogy Solver - line 86 { text: "Add 7 to the outside.", move: { value: 7, group: 1, slot: 2 } }, // > Custom code page: Pedagogy Solver - line 87 { text: "Add 10 to the outside.", move: { value: 10, group: 1, slot: 3 } }, // > Custom code page: Pedagogy Solver - line 88 { text: "Add 11 to the outside.", move: { value: 11, group: 1, slot: 4 } }, // > Custom code page: Pedagogy Solver - line 89 { text: "Add 12 to the last outside spot. The outer total is 5 + 7 + 10 + 11 + 12 = 45.", move: { value: 12, group: 1, slot: 5 } }, // > Custom code page: Pedagogy Solver - line 90 { text: "So the second center is 45 / 5 = 9. Place 9 in the pentagon.", move: { value: 9, group: 1, slot: 0 } } // > Custom code page: Pedagogy Solver - line 91 ] // > Custom code page: Pedagogy Solver - line 92 }, // > Custom code page: Pedagogy Solver - line 93 7: { // > Custom code page: Pedagogy Solver - line 94 title: "Task 7: Why there is no solution", // > Custom code page: Pedagogy Solver - line 95 lead: "Use a total-sum argument. It is faster and more convincing than random trial and error.", // > Custom code page: Pedagogy Solver - line 96 finish: "So the cards 1 to 12 cannot be split into three valid triangle-average groups.", // > Custom code page: Pedagogy Solver - line 97 steps: [ // > Custom code page: Pedagogy Solver - line 98 { text: "In any triangle group, the center equals the average of the three outer cards." }, // > Custom code page: Pedagogy Solver - line 99 { text: "So the outer total equals 3 times the center." }, // > Custom code page: Pedagogy Solver - line 100 { text: "That means the total of all four cards in one triangle group is 4 times the center, so it must be a multiple of 4." }, // > Custom code page: Pedagogy Solver - line 101 { text: "If all three triangle groups were valid, the grand total of all 12 cards would also have to be a multiple of 4." }, // > Custom code page: Pedagogy Solver - line 102 { text: "But 1 + 2 + 3 + ... + 12 = 78, and 78 is not a multiple of 4." } // > Custom code page: Pedagogy Solver - line 103 ] // > Custom code page: Pedagogy Solver - line 104 } // > Custom code page: Pedagogy Solver - line 105 }; // > Custom code page: Pedagogy Solver - line 106 // > Custom code page: Pedagogy Solver - line 107 function render Thinking Panel(title, lead, items, conclusion) { // > Custom code page: Pedagogy Solver - line 108 var html = "<b>" + title + "</b><br/>" + lead; // > Custom code page: Pedagogy Solver - line 109 if (items.length > 0) { // > Custom code page: Pedagogy Solver - line 110 html += "<ol>"; // > Custom code page: Pedagogy Solver - line 111 for (var i = 0; i < items.length; i++) { // > Custom code page: Pedagogy Solver - line 112 html += "<li>" + items[i] + "</li>"; // > Custom code page: Pedagogy Solver - line 113 } // > Custom code page: Pedagogy Solver - line 114 html += "</ol>"; // > Custom code page: Pedagogy Solver - line 115 } // > Custom code page: Pedagogy Solver - line 116 if (conclusion) { // > Custom code page: Pedagogy Solver - line 117 html += "<p><b>Conclusion:</b> " + conclusion + "</p>"; // > Custom code page: Pedagogy Solver - line 118 } // > Custom code page: Pedagogy Solver - line 119 return html; // > Custom code page: Pedagogy Solver - line 120 } // > Custom code page: Pedagogy Solver - line 121 // > Custom code page: Pedagogy Solver - line 122 function set Thinking Html(html) { // > Custom code page: Pedagogy Solver - line 123 if (_view && _view.solver Text) { // > Custom code page: Pedagogy Solver - line 124 _view.solver Text.set Property("Text", html); // > Custom code page: Pedagogy Solver - line 125 } // > Custom code page: Pedagogy Solver - line 126 } // > Custom code page: Pedagogy Solver - line 127 // > Custom code page: Pedagogy Solver - line 128 function clear Thinking Timeouts() { // > Custom code page: Pedagogy Solver - line 129 for (var i = 0; i < thinking Timeouts.length; i++) { // > Custom code page: Pedagogy Solver - line 130 window.clear Timeout(thinking Timeouts[i]); // > Custom code page: Pedagogy Solver - line 131 } // > Custom code page: Pedagogy Solver - line 132 thinking Timeouts = []; // > Custom code page: Pedagogy Solver - line 133 } // > Custom code page: Pedagogy Solver - line 134 // > Custom code page: Pedagogy Solver - line 135 function stop Thinking Playback(reset Panel) { // > Custom code page: Pedagogy Solver - line 136 if (reset Panel === undefined) { // > Custom code page: Pedagogy Solver - line 137 reset Panel = true; // > Custom code page: Pedagogy Solver - line 138 } // > Custom code page: Pedagogy Solver - line 139 clear Thinking Timeouts(); // > Custom code page: Pedagogy Solver - line 140 thinking Running = false; // > Custom code page: Pedagogy Solver - line 141 if (thinking Enabled Snapshot.length === enabledposition.length) { // > Custom code page: Pedagogy Solver - line 142 enabledposition = thinking Enabled Snapshot.slice(); // > Custom code page: Pedagogy Solver - line 143 } // > Custom code page: Pedagogy Solver - line 144 thinking Enabled Snapshot = []; // > Custom code page: Pedagogy Solver - line 145 if (reset Panel) { // > Custom code page: Pedagogy Solver - line 146 set Thinking Html(get Thinking Default Html()); // > Custom code page: Pedagogy Solver - line 147 } // > Custom code page: Pedagogy Solver - line 148 _update(); // > Custom code page: Pedagogy Solver - line 149 } // > Custom code page: Pedagogy Solver - line 150 // > Custom code page: Pedagogy Solver - line 151 function get Card Index For Value(value) { // > Custom code page: Pedagogy Solver - line 152 for (var i = 0; i < card Val.length; i++) { // > Custom code page: Pedagogy Solver - line 153 if (card Val[i] === value) { // > Custom code page: Pedagogy Solver - line 154 return i; // > Custom code page: Pedagogy Solver - line 155 } // > Custom code page: Pedagogy Solver - line 156 } // > Custom code page: Pedagogy Solver - line 157 return -1; // > Custom code page: Pedagogy Solver - line 158 } // > Custom code page: Pedagogy Solver - line 159 // > Custom code page: Pedagogy Solver - line 160 function place Card Value In Group(value, group Index, slot Index) { // > Custom code page: Pedagogy Solver - line 161 var card Index = get Card Index For Value(value); // > Custom code page: Pedagogy Solver - line 162 if (card Index < 0 || !group Arr[group Index]) { // > Custom code page: Pedagogy Solver - line 163 return false; // > Custom code page: Pedagogy Solver - line 164 } // > Custom code page: Pedagogy Solver - line 165 if (which Group[card Index] != null) { // > Custom code page: Pedagogy Solver - line 166 which Group[card Index].val[which Circle[card Index]] = -1; // > Custom code page: Pedagogy Solver - line 167 } // > Custom code page: Pedagogy Solver - line 168 var target Group = group Arr[group Index]; // > Custom code page: Pedagogy Solver - line 169 card X[card Index] = target Group.x Pos[slot Index]; // > Custom code page: Pedagogy Solver - line 170 card Y[card Index] = target Group.y Pos[slot Index]; // > Custom code page: Pedagogy Solver - line 171 target Group.val[slot Index] = card Val[card Index]; // > Custom code page: Pedagogy Solver - line 172 which Group[card Index] = target Group; // > Custom code page: Pedagogy Solver - line 173 which Circle[card Index] = slot Index; // > Custom code page: Pedagogy Solver - line 174 card Color[card Index] = "#c5e1a5"; // > Custom code page: Pedagogy Solver - line 175 return true; // > Custom code page: Pedagogy Solver - line 176 } // > Custom code page: Pedagogy Solver - line 177 // > Custom code page: Pedagogy Solver - line 178 function start Thinking Playback() { // > Custom code page: Pedagogy Solver - line 179 var script = thinking Scripts[cur Task]; // > Custom code page: Pedagogy Solver - line 180 if (!script) { // > Custom code page: Pedagogy Solver - line 181 set Thinking Html(get Thinking Default Html()); // > Custom code page: Pedagogy Solver - line 182 return; // > Custom code page: Pedagogy Solver - line 183 } // > Custom code page: Pedagogy Solver - line 184 clear Thinking Timeouts(); // > Custom code page: Pedagogy Solver - line 185 thinking Running = true; // > Custom code page: Pedagogy Solver - line 186 thinking Enabled Snapshot = enabledposition.slice(); // > Custom code page: Pedagogy Solver - line 187 for (var i = 0; i < enabledposition.length; i++) { // > Custom code page: Pedagogy Solver - line 188 enabledposition[i] = "ENABLED_NONE"; // > Custom code page: Pedagogy Solver - line 189 } // > Custom code page: Pedagogy Solver - line 190 var items = []; // > Custom code page: Pedagogy Solver - line 191 var delay = 0; // > Custom code page: Pedagogy Solver - line 192 set Thinking Html(render Thinking Panel(script.title, script.lead, items, "")); // > Custom code page: Pedagogy Solver - line 193 _update(); // > Custom code page: Pedagogy Solver - line 194 for (var step Index = 0; step Index < script.steps.length; step Index++) { // > Custom code page: Pedagogy Solver - line 195 (function(step, current Delay) { // > Custom code page: Pedagogy Solver - line 196 thinking Timeouts.push(window.set Timeout(function() { // > Custom code page: Pedagogy Solver - line 197 if (step.move) { // > Custom code page: Pedagogy Solver - line 198 place Card Value In Group(step.move.value, step.move.group, step.move.slot); // > Custom code page: Pedagogy Solver - line 199 } // > Custom code page: Pedagogy Solver - line 200 items.push(step.text); // > Custom code page: Pedagogy Solver - line 201 set Thinking Html(render Thinking Panel(script.title, script.lead, items, "")); // > Custom code page: Pedagogy Solver - line 202 _update(); // > Custom code page: Pedagogy Solver - line 203 }, current Delay)); // > Custom code page: Pedagogy Solver - line 204 }(script.steps[step Index], delay + (script.steps[step Index].delay || 1400))); // > Custom code page: Pedagogy Solver - line 205 delay += (script.steps[step Index].delay || 1400); // > Custom code page: Pedagogy Solver - line 206 } // > Custom code page: Pedagogy Solver - line 207 thinking Timeouts.push(window.set Timeout(function() { // > Custom code page: Pedagogy Solver - line 208 thinking Running = false; // > Custom code page: Pedagogy Solver - line 209 if (thinking Enabled Snapshot.length === enabledposition.length) { // > Custom code page: Pedagogy Solver - line 210 enabledposition = thinking Enabled Snapshot.slice(); // > Custom code page: Pedagogy Solver - line 211 } // > Custom code page: Pedagogy Solver - line 212 set Thinking Html(render Thinking Panel(script.title, script.lead, items, script.finish)); // > Custom code page: Pedagogy Solver - line 213 _update(); // > Custom code page: Pedagogy Solver - line 214 }, delay + 300)); // > Custom code page: Pedagogy Solver - line 215 } // > Custom code page: Pedagogy Solver - line 216 // > Custom code page: Pedagogy Solver - line 217 function show Thinking Process() { // > Custom code page: Pedagogy Solver - line 218 stop Thinking Playback(false); // > Custom code page: Pedagogy Solver - line 219 _reset(); // > Custom code page: Pedagogy Solver - line 220 is First Try[cur Task - 1] = false; // > Custom code page: Pedagogy Solver - line 221 if (typeof question Append History === "function") { // > Custom code page: Pedagogy Solver - line 222 question Append History("Q" + cur Task, "Guided thinking viewed."); // > Custom code page: Pedagogy Solver - line 223 } // > Custom code page: Pedagogy Solver - line 224 start Thinking Playback(); // > Custom code page: Pedagogy Solver - line 225 } // > Custom code page: Pedagogy Solver - line 226 function on Answer Correct() { // > Custom code page: question - line 1 const qn = `Q${cur Task}`; // > Custom code page: question - line 2 const group Info = group Arr.map(format Group); // > Custom code page: question - line 3 // > Custom code page: question - line 4 start Question(qn); // > Custom code page: question - line 5 add Question History(`Valid answer${is First Try[cur Task - 1] ? " (First try)" : ""}:\n${group Info.join("\n")}\n`); // > Custom code page: question - line 6 award Question Marks(is First Try[cur Task - 1] ? 2 : 1) // > Custom code page: question - line 7 end Question(); // > Custom code page: question - line 8 } // > Custom code page: question - line 9 function on Answer Invalid() { // > Custom code page: question - line 10 const qn = `Q${cur Task}`; // > Custom code page: question - line 11 const group Info = group Arr.map(format Group); // > Custom code page: question - line 12 // > Custom code page: question - line 13 question Append History(qn, `Invalid answer:\n${group Info.join("\n")}\n`); // > Custom code page: question - line 14 } // > Custom code page: question - line 15 function on Answer Incorrect() { // > Custom code page: question - line 16 const qn = `Q${cur Task}`; // > Custom code page: question - line 17 is First Try[cur Task - 1] = false; // > Custom code page: question - line 18 const group Info = group Arr.map(format Group); // > Custom code page: question - line 19 // > Custom code page: question - line 20 question Append History(qn, `Incorrect answer:\n${group Info.join("\n")}\n`); // > Custom code page: question - line 21 } // > Custom code page: question - line 22 // > Custom code page: question - line 23 /** @param {number} value */ // > Custom code page: question - line 24 function format Slot(value) { // > Custom code page: question - line 25 return value === -1 ? "X" : value.to String(); // > Custom code page: question - line 26 } // > Custom code page: question - line 27 // > Custom code page: question - line 28 function format Group(group) { // > Custom code page: question - line 29 const results = ["("]; // > Custom code page: question - line 30 for (let i = 1; i < group.val.length; i++) { // > Custom code page: question - line 31 if (i > 1) results.push(" "); // > Custom code page: question - line 32 results.push(format Slot(group.val[i])); // > Custom code page: question - line 33 } // > Custom code page: question - line 34 results.push(`) Center: ${format Slot(group.val[0])} `); // > Custom code page: question - line 35 switch (group.is Valid()) { // > Custom code page: question - line 36 case -1: // > Custom code page: question - line 37 // do something if group.is Valid() === -1 // > Custom code page: question - line 38 results.push('🤔'); // > Custom code page: question - line 39 break; // > Custom code page: question - line 40 case 0: // > Custom code page: question - line 41 // do something if group.is Valid() === 0 // > Custom code page: question - line 42 results.push('❌'); // > Custom code page: question - line 43 break; // > Custom code page: question - line 44 case 1: // > Custom code page: question - line 45 // do something if group.is Valid() === 1 // > Custom code page: question - line 46 results.push('✅'); // > Custom code page: question - line 47 } // > Custom code page: question - line 48 return results.join(""); // > Custom code page: question - line 49 } // > Custom code page: question - line 50 // > Custom code page: question Lib - line 1 // copy into custom function // > Custom code page: Lib Page - line 1 document.onkeydown = function(evt) { // > Custom code page: Lib Page - line 2 evt = evt || window.event; // > Custom code page: Lib Page - line 3 var is Escape = false; // > Custom code page: Lib Page - line 4 if ("key" in evt) { // > Custom code page: Lib Page - line 5 is Escape = (evt.key === "Escape" || evt.key === "Esc"); // > Custom code page: Lib Page - line 6 } // > Custom code page: Lib Page - line 7 else { // > Custom code page: Lib Page - line 8 is Escape = (evt.key Code === 27); // > Custom code page: Lib Page - line 9 } // > Custom code page: Lib Page - line 10 if (is Escape) { // > Custom code page: Lib Page - line 11 //alert("Escape"); // > Custom code page: Lib Page - line 12 //esc Key Pressed = true // > Custom code page: Lib Page - line 13 esc Key Pressed = !esc Key Pressed; // Toggle esc Key Pressed // > Custom code page: Lib Page - line 14 } // > Custom code page: Lib Page - line 15 // > Custom code page: Lib Page - line 16 } // > Custom code page: Lib Page - line 17 _model.add To Initialization(function() { if (!__pages Enabled['Init Page']) return; // Initialising the cards // > Initialization page: Init Page - line 1 var cur X = -card Width * 9 / 2; // > Initialization page: Init Page - line 2 // > Initialization page: Init Page - line 3 for(var i = 1; i <= 20; i++){ // > Initialization page: Init Page - line 4 let idx = i - 1; // > Initialization page: Init Page - line 5 card Val[idx] = i; // > Initialization page: Init Page - line 6 card X[idx] = cur X; // > Initialization page: Init Page - line 7 if(i <= 10) // > Initialization page: Init Page - line 8 card Y[idx] = card Height * 2; // > Initialization page: Init Page - line 9 else // > Initialization page: Init Page - line 10 card Y[idx] = card Height; // > Initialization page: Init Page - line 11 // > Initialization page: Init Page - line 12 init X[idx] = card X[idx], init Y[idx] = card Y[idx]; // > Initialization page: Init Page - line 13 // > Initialization page: Init Page - line 14 cur X += card Width; // > Initialization page: Init Page - line 15 if(i == 10) // > Initialization page: Init Page - line 16 cur X = -card Width * 9 / 2; // > Initialization page: Init Page - line 17 // > Initialization page: Init Page - line 18 // which Group identifies which group the card is in currently. If the card is not in a group, which Group will be null // > Initialization page: Init Page - line 19 which Group[idx] = null; // > Initialization page: Init Page - line 20 // which Cricle identifies which circle the card is in currently. If the card is not in a cricle, which Cricle will be -1. // > Initialization page: Init Page - line 21 which Circle[idx] = -1; // > Initialization page: Init Page - line 22 } // > Initialization page: Init Page - line 23 // > Initialization page: Init Page - line 24 // > Initialization page: Init Page - line 25 // > Initialization page: Init Page - line 26 // > Initialization page: Init Page - line 27 // > Initialization page: Init Page - line 28 }); _model.add To Initialization(function() { if (!__pages Enabled['init Shape']) return; // shape Points is to define the points that we are going to use for the 2d polygons // > Initialization page: init Shape - line 1 var pen Radius = tri Radius = shape Length / 2; // > Initialization page: init Shape - line 2 shape Points = { // > Initialization page: init Shape - line 3 "triangle": [ // > Initialization page: init Shape - line 4 [0, tri Radius * Math.sin(Math.PI / 3), -tri Radius * Math.sin(Math.PI / 3), 0], // > Initialization page: init Shape - line 5 [tri Radius, -tri Radius * Math.cos(Math.PI / 3), -tri Radius * Math.cos(Math.PI / 3), tri Radius] // > Initialization page: init Shape - line 6 ], // > Initialization page: init Shape - line 7 "square": [ // > Initialization page: init Shape - line 8 [-shape Length / 2, shape Length / 2, shape Length / 2, -shape Le generated-with: Web EJS : The web version of Easy Java Script Simulations, version Web EJS 1.1, build 240815. Visit https://www.um.es/fem/wikis/webejs/ fixed-navbar: false title: ejss_model_astoundingly_average Astoundingly Average Number Game to promote Creative Thinking?

2. Which approach best supports concept learning?

3. Why should only one variable be changed at a time?

4. What evidence should students include in their explanation?

5. What makes a good conclusion after using the model?

7. Learning Pulse

Anonymous activity shows this resource is being discovered, revisited, and used by learners in different places.

--currently viewing
--total page views

Where Recent Learners Are From

Country or region is inferred anonymously from server location headers when available. No names, accounts, or IP addresses are shown.

Detecting locations...
Updating anonymous page activity...