Skip to content

An AI skill that turns books into animated, narrated, interactive web experiences

18.1 KB
Raw Blame
<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Adding Positive and Negative Numbers — Elementary Mathematics</title><link rel="stylesheet" href="../lib/engine.css"><link rel="expect" href="#bar" blocking="render"><style>.screen .blanks .math{font-size:38px}.side .keys{font-size:20px}</style></head><body>
<script src="../lib/engine.js"></script><script src="../lib/math.js"></script><script src="audio/en/timings.js"></script><script>
'use strict';
const CHAPTER={number:11,title:'Adding Positive and Negative Numbers',minutes:12,language:'en', next: '../ch12/' };
const saColor=v=>v>0?POS:v<0?NEG:COL.chalk;
const saSigned=v=>v>0?'+'+v:num(v);
const saText=(p,s,x,y,t=0,size=30,col=COL.chalk,anchor='start')=>{const e=T(p,s,{x,y,size,fill:col,anchor,o:0});show(e,t);return e;};
const saMath=(p,s,x,y,t=0,size=48,col=COL.chalk,anchor='middle')=>{const e=M(p,Array.isArray(s)?s:[s],{x,y,size,fill:col,anchor,o:0});show(e,t);return e;};
const saTitle=(p,s,sub='')=>{saText(p,s,100,110,.1,43);if(sub)saText(p,sub,100,162,.15,27,COL.dim);};
function saEq(p,a,b,c,t=0,y=750,xEq=800,size=60){const row=tokens(p,[{t:num(a),fill:saColor(a)},' + ',{t:b<0?'('+num(b)+')':num(b),fill:saColor(b)}],{x:xEq-size*.65,y,size,anchor:'end'});row.push(saMath(p,'=',xEq,y,t,size),saMath(p,num(c),xEq+size*.65,y,t,size,saColor(c),'start'));row.slice(0,3).forEach(e=>{put(e,{o:0});show(e,t)});return row;}
function saLine(p,lo=-8,hi=8,u=76,o=800){const y=560;const g=G(p);g.dataset.lineLo=lo;g.dataset.lineHi=hi;g.dataset.unit=u;g.dataset.origin=o;path(g,`M${o+(lo-.55)*u} ${y}H${o+(hi+.55)*u}`,{stroke:COL.chalk,'stroke-width':3});for(const [v,d] of [[lo-.55,-1],[hi+.55,1]])path(g,`M${o+v*u-12*d} ${y-9}L${o+v*u} ${y}L${o+v*u-12*d} ${y+9}`,{stroke:COL.chalk,'stroke-width':3});for(let v=lo;v<=hi;v++){path(g,`M${o+v*u} ${y-9}V${y+9}`,{stroke:COL.dim,'stroke-width':2});T(g,num(v),{x:o+v*u,y:y+45,size:28,font:MATH,anchor:'middle',fill:v===0?COL.chalk:COL.dim});}const dot=G(g,{x:o,y});const circle=mk('circle',{r:11,fill:COL.chalk,stroke:COL.board,'stroke-width':2},dot);return {g,y,u,o,dot,circle,x:v=>o+u*v};}
function saMove(l,a,b,y,t){const c=saColor(b-a),dur=1.4,x1=l.x(a),x2=l.x(b),d=Math.sign(b-a),g=G(l.g);g.dataset.moveFrom=a;g.dataset.moveTo=b;g.dataset.startX=x1;g.dataset.endX=x2;const ln=path(g,`M${x1} ${y}H${x2}`,{stroke:c,'stroke-width':5},{d:0});draw(ln,t,dur);const h=path(g,`M${x2-14*d} ${y-10}L${x2} ${y}L${x2-14*d} ${y+10}`,{stroke:c,'stroke-width':5},{o:0});show(h,t+dur-.12,.15);saText(g,saSigned(b-a),(x1+x2)/2,y-22,t+.1,35,c,'middle');const drop=path(g,`M${x2} ${y+12}V${l.y-15}`,{stroke:c,'stroke-width':2,'stroke-dasharray':'5 5'},{o:0});show(drop,t+dur,.2);tw(l.dot,{x:x2},t,dur,lin);tw(l.circle,{c_fill:saColor(b)},t,dur,lin);return g;}
function saTile(p,sign,id,x,y,t=0,k=1){const e=tile(p,sign,x,y);e.dataset.tileId=id;e.dataset.value=sign;tw(e,{o:1,s:k},t,.35,back);return e;}
function saCancel(p,a,b,tPair,tCancel,{k=1,dim=false}={}){const n=Math.min(a.length,b.length),dy=75*k;a.slice(0,n).forEach((e,i)=>{const f=b[i],x=st(e).x,y=st(e).y;tw(f,{x,y:y+dy},tPair+i*.1,.6);const ring=G(p,{x,y:y+dy/2,o:0});ring.dataset.zeroPair=e.dataset.tileId+','+f.dataset.tileId;mk('rect',{x:-37*k,y:-68*k,width:74*k,height:136*k,rx:16,fill:'none',stroke:COL.chalk,'stroke-width':2,'stroke-dasharray':'6 5'},ring);show(ring,tPair+.65+i*.1);(dim?[e,f]:[e,f,ring]).forEach(q=>tw(q,{o:dim?.3:0},tCancel+i*.12,.5));});return n;}
function saModel(p,a,b,m,{first=0,second=.15}={}){const g=G(p);g.dataset.addends=a+','+b;g.dataset.sum=a+b;const k=1.2,sp=110,x0=800-(Math.max(Math.abs(a),Math.abs(b))-1)*sp/2-60,xs=i=>x0+i*sp;const A=Array.from({length:Math.abs(a)},(_,i)=>saTile(g,Math.sign(a),'a'+i,xs(i),320,first+i*.05,k));const B=Array.from({length:Math.abs(b)},(_,i)=>saTile(g,Math.sign(b),'b'+i,xs(i),490,second+i*.05,k));for(const [v,y,t] of [[a,320,first],[b,490,second]])hide(saText(g,saSigned(v),xs(Math.abs(v)-1)+sp/2+30,y+15,t,46,saColor(v)),m('cancel'),.4);let n=0;if(a*b<0){n=saCancel(g,A,B,m('pair'),m('cancel'),{k});g.dataset.pairs=n;const rem=[...A.slice(n),...B.slice(n)];rem.forEach((e,i)=>tw(e,{x:800+(i-(rem.length-1)/2)*130,y:400,s:1.6},m('left'),.7));saText(g,n+' zero pairs removed · total value unchanged',800,640,m('cancel'),30,COL.dim,'middle');}return {g,A,B,n};}
function saTape(p,a,b,{scale=4,unit='',tB=0,tPair=99,tLeft=99}={}){const g=G(p),x=400,y=300,gap=120,h=58,n=Math.min(Math.abs(a),Math.abs(b)),lab=v=>(v<0?'−':'+')+unit+Math.abs(v);g.dataset.tapeAddends=a+','+b;g.dataset.scale=scale;let other=y;for(const [v,yy,t0] of [[a,y,0],[b,y+gap,tB]]){const row=G(g,{o:t0?0:1});if(t0)show(row,t0);saText(row,lab(v),x-30,yy+42,0,40,saColor(v),'end');const pair=G(row,{x,y:yy});pair.dataset.matchedValue=Math.sign(v)*n;mk('rect',{width:n*scale,height:h,fill:saColor(v),'fill-opacity':.25},pair);tw(pair,{o:.3},tLeft,.6);if(Math.abs(v)>n){const rem=G(row,{x:x+n*scale,y:yy});rem.dataset.remainingValue=Math.sign(v)*(Math.abs(v)-n);mk('rect',{width:(Math.abs(v)-n)*scale,height:h,fill:saColor(v),'fill-opacity':.25},rem);const hl=G(row,{x:x+n*scale,y:yy,o:0});mk('rect',{width:(Math.abs(v)-n)*scale,height:h,fill:saColor(v),'fill-opacity':.35,stroke:saColor(v),'stroke-width':3},hl);show(hl,tPair);}else other=yy;mk('rect',{x,y:yy,width:Math.abs(v)*scale,height:h,fill:'none',stroke:saColor(v),'stroke-width':2},row);}
const ring=G(g,{o:0});ring.dataset.zeroPair=n;mk('rect',{x:x-12,y:y-12,width:n*scale+24,height:gap+h+24,rx:16,fill:'none',stroke:COL.chalk,'stroke-width':2.5,'stroke-dasharray':'8 6'},ring);T(ring,n+' cancels '+n,{x:x+n*scale/2,y:y+gap+h+62,size:36,anchor:'middle'});show(ring,tPair);
saText(g,lab(a+b)+' left over',x+n*scale+36,other+42,tLeft,40,saColor(a+b));return g;}
// Reuse chapter 2's signed-answer normalization, leaving exact grading to the engine.
const saBlanks=rows=>(body,api)=>{const ctl=blanks(rows)(body,api),check=ctl.check;ctl.check=()=>{body.querySelectorAll('input.box').forEach(b=>{b.value=b.value.replace(/^\s*\+\s*/,'').replace(/(\d),(?=\d{3}\b)/g,'$1');});check();};return ctl;};
const BEATS=[
['intro','Combine signed changes',(m,D)=>{const g=G(scene,{o:0,y:24});T(g,'Unit 1 · The Number System · Chapter 11',{x:800,y:235,size:28,fill:COL.dim,anchor:'middle'});T(g,'Adding Positive',{x:800,y:345,size:72,weight:600,anchor:'middle'});T(g,'and Negative Numbers',{x:800,y:440,size:72,weight:600,anchor:'middle'});tw(g,{o:1,y:0},.2,1,out);saTile(g,1,'intro-plus',730,570,.4);saTile(g,-1,'intro-minus',870,570,.5);saText(g,'Directions · zero pairs · magnitudes',800,705,m('sub'),34,COL.dim,'middle');hide(g,D-.8,.7);}],
['direction','A sign gives a direction',m=>{const p=panel(0);saTitle(p,'3 + (−4)','Begin at zero. Each new move starts at the current position.');S.saLine=saLine(p);saMove(S.saLine,0,3,325,m('positive'));saMove(S.saLine,3,-1,440,m('negative'));saEq(p,3,-4,-1,m('result'));}],
['lineMixed','Opposing moves',m=>{const p=panel(0);saTitle(p,'−6 + 4');S.saLine=saLine(p);saMove(S.saLine,0,-6,325,m('first'));saMove(S.saLine,-6,-2,440,m('second'));[6.25,7.51,8.75,10.2].forEach((dt,i)=>{const r=mk('circle',{cx:S.saLine.x(-5+i),cy:S.saLine.y,r:17,fill:'none',stroke:POS,'stroke-width':4},S.saLine.g);put(r,{o:0});show(r,m('second',dt),.2);});saEq(p,-6,4,-2,m('result'));}],
['lineSame','Two leftward changes',m=>{const p=panel(0);saTitle(p,'−2 + (−3)');S.saLine=saLine(p);saMove(S.saLine,0,-2,325,m('first'));saMove(S.saLine,-2,-5,440,m('second'));saEq(p,-2,-3,-5,m('result'));saText(p,'Magnitude: 2 + 3 = 5',800,825,m('result'),31,COL.task,'middle');}],
['q1','Quick check',()=>{const p=panel(0);saTitle(p,'−5 + 2','The first move is shown. Where does the second move end?');const l=saLine(p);saMove(l,0,-5,330,0);S.saPoints=[-7,-3,3].map(v=>{const g=G(p,{x:l.x(v),y:l.y});mk('circle',{r:17,fill:COL.board,stroke:COL.task,'stroke-width':3},g);return {el:g,box:[l.x(v)-34,l.y-35,68,70],label:num(v)};});},{ask:done=>quiz(BAND,[{id:'c-endpoint',prompt:'Choose the endpoint after a move of +2.',build:pickEls(S.saPoints,1,'From −5, move two units RIGHT: −4, then −3.',i=>i===0?'−7 is two units left. A positive addend moves right.':'Start the +2 move at −5, not at zero.',()=>pulseFx(S.saPoints[1].el,1.25))}],done)}],
['tileUnit','Tiles have signed values',m=>{const p=panel(0);saTitle(p,'One tile = one signed unit');for(let i=0;i<3;i++)saTile(p,1,'unit-p'+i,420+i*92,335,i===0?0:m('positive')+i*.08);for(let i=0;i<2;i++)saTile(p,-1,'unit-n'+i,420+i*92,490,m('negative')+i*.08);saText(p,'(+1) + (+1) + (+1) = +3',1080,350,m('positive',3),43,POS,'middle');saText(p,'(−1) + (−1) = −2',1080,505,m('negative',3.2),43,NEG,'middle');saEq(p,3,-2,1,m('total'));}],
['tilePair','A zero pair preserves value',m=>{const p=panel(0);saTitle(p,'+1 and −1 make a ZERO pair');const a=saTile(p,1,'pair-positive',800,310,0,1.3),b=saTile(p,-1,'pair-negative',1150,480,0,1.3);saCancel(p,[a],[b],m('pair'),m('cancel'),{k:1.3,dim:true});saEq(p,1,-1,0,m('zero'),580,830,56);saText(p,'This pair is worth 0',800,680,m('cancel'),42,COL.chalk,'middle');saText(p,'The total value stays the same.',800,765,m('cancel',1),35,COL.dim,'middle');}],
['tileMixed','Remove three zero pairs',m=>{const p=panel(0);saTitle(p,'−5 + 3','Every pair uses one original positive tile and one original negative tile.');S.saTiles=saModel(p,-5,3,m);saEq(p,-5,3,-2,m('left'));}],
['q2','Quick check',()=>{const p=panel(0);saTitle(p,'−5 + 3','Choose the leftover tiles after removing every zero pair.');for(let i=0;i<5;i++)saTile(p,-1,'q2n'+i,515+i*75,255);for(let i=0;i<3;i++)saTile(p,1,'q2p'+i,515+i*75,350);S.saOptions=[[-1,2],[1,2],[-1,8]].map(([sign,n],j)=>{const g=G(p,{x:315+j*490,y:515});g.dataset.optionValue=sign*n;for(let i=0;i<n;i++)saTile(g,sign,'option'+j+'-'+i,(i%4-(Math.min(n,4)-1)/2)*67,Math.floor(i/4)*65,0);saText(g,String.fromCharCode(65+j),0,-70,0,30,COL.dim,'middle');return {el:g,box:[135+j*490,420,360,200],label:n+' '+(sign>0?'positive':'negative')+' tiles'};});},{ask:done=>quiz(BAND,[{id:'c-tiles',prompt:'Which original signed value remains?',build:pickEls(S.saOptions,0,'Three zero pairs remove three negatives and three positives. Two negative tiles remain.',i=>i===1?'The negative group has the larger magnitude, so the leftover tiles must be negative.':'Counting eight objects ignores their signed values. Three positive-negative pairs have value zero.',()=>pulseFx(S.saOptions[0].el,1.08))}],done)}],
['sameSigns','Same signs: add magnitudes',m=>{const p=panel(0);saTitle(p,'−2 + (−4)','No opposite tiles means no zero pairs.');const g=G(p);const A=Array.from({length:2},(_,i)=>saTile(g,-1,'same-a'+i,400+i*92,280)),B=Array.from({length:4},(_,i)=>saTile(g,-1,'same-b'+i,860+i*92,280));[...A,...B].forEach((e,i)=>tw(e,{x:570+i*92},m('join'),.8));saMath(p,'|−2| + |−4| = 2 + 4 = 6',800,410,m('magnitude'),46,COL.task);saEq(p,-2,-4,-6,m('result'),505,800,54);for(let i=0;i<8;i++)saTile(g,1,'same-p'+i,480+i*80+(i>2?40:0),640,m('positive',i>2?3.8:3.4)+(i%5)*.06);saEq(p,3,5,8,m('positive',4.5),775,800,54);}],
['differentSigns','Different signs: count leftovers',m=>{const p=panel(0);saTitle(p,'−3 + 7');S.saTiles=saModel(p,-3,7,m);saEq(p,-3,7,4,m('left'),745);saText(p,'7 − 3 = 4 · larger magnitude is POSITIVE',800,830,m('rule'),31,COL.task,'middle');}],
['opposites','Equal opposites give zero',m=>{const p=panel(0);saTitle(p,'4 + (−4)');const g=G(p);const A=Array.from({length:4},(_,i)=>saTile(g,1,'opp-p'+i,480+i*92,280)),B=Array.from({length:4},(_,i)=>saTile(g,-1,'opp-n'+i,480+i*92,450));saCancel(g,A,B,m('pair'),m('cancel'));hide(g,m('line'),.5);const l=saLine(p);put(l.g,{o:0});show(l.g,m('line'));saMove(l,0,4,340,m('line'));saMove(l,4,0,445,m('line',2));saEq(p,4,-4,0,m('cancel'));}],
['large','Magnitudes work for large numbers',m=>{const p=panel(0);saTitle(p,'−140 + 90');S.saTape=saTape(p,-140,90,{scale:6,tPair:m('pair'),tLeft:m('left')});saMath(p,'|−140| = 140    |90| = 90',800,230,m('absolute'),42,COL.task);saEq(p,-140,90,-50,m('result'),720,800,64);}],
['q3','Quick check',()=>{const p=panel(0);saTitle(p,'−45 + 120','Compare magnitudes. Choose the signed LEFTOVER tape.');const x=500,sc=2.5;for(const [v,y] of [[-45,265],[120,370]]){mk('rect',{x,y,width:Math.abs(v)*sc,height:45,fill:saColor(v),'fill-opacity':.35,stroke:saColor(v),'stroke-width':2},p);saText(p,saSigned(v),x-80,y+35,0,36,saColor(v),'middle');}S.saTapeOptions=[-75,75,165].map((v,j)=>{const g=G(p,{x:130+j*480,y:550});g.dataset.optionValue=v;g.dataset.scale=sc;mk('rect',{width:Math.abs(v)*sc,height:48,fill:saColor(v),'fill-opacity':.45,stroke:saColor(v),'stroke-width':3},g);saText(g,String.fromCharCode(65+j)+' · '+saSigned(v),120,-24,0,34,saColor(v),'middle');return {el:g,box:[100+j*480,490,460,130],label:saSigned(v)};});},{ask:done=>quiz(BAND,[{id:'c-magnitude',prompt:'Which answer tape has the correct magnitude AND sign?',build:pickEls(S.saTapeOptions,1,'120−45=75. The positive addend has larger magnitude, so +75 remains.',i=>i===0?'75 is the correct magnitude, but 120 is positive and larger in magnitude than −45.':'Opposite signs cancel. Subtract the smaller magnitude from the larger; do not add 120 and 45.',()=>pulseFx(S.saTapeOptions[1].el,1.08))}],done)}],
['zero','Zero changes nothing',m=>{const p=panel(0);saTitle(p,'Adding zero');for(let i=0;i<7;i++)saTile(p,-1,'zero-n'+i,505+i*92,310);saEq(p,-7,0,-7,m('zero'),475);for(let i=0;i<5;i++)saTile(p,1,'zero-p'+i,600+i*92,615,m('other'));saEq(p,0,5,5,m('other'),730);saText(p,'a + 0 = a',800,835,m('rule'),42,COL.chalk,'middle');}],
['three','Carry the signed partial sum',m=>{const p=panel(0);saTitle(p,'−4 + 7 + (−2)','First add −4 and 7, then add −2.');const g=G(p);const A=Array.from({length:4},(_,i)=>saTile(g,-1,'three-a'+i,360+i*82,290)),B=Array.from({length:7},(_,i)=>saTile(g,1,'three-b'+i,360+i*82,490));saCancel(g,A,B,m('pair'),m('first')-.7);const survivors=B.slice(4);survivors.forEach((e,i)=>tw(e,{x:540+i*92,y:340},m('first'),.7));saEq(p,-4,7,3,m('first'),355,1010,46);const C=Array.from({length:2},(_,i)=>saTile(g,-1,'three-c'+i,540+i*92,490,m('next')));survivors.slice(0,2).forEach((e,i)=>{const f=C[i],x=540+i*92;tw(f,{x,y:415},m('next',1),.6);const ring=G(g,{x,y:377.5,o:0});ring.dataset.zeroPair=e.dataset.tileId+','+f.dataset.tileId;mk('rect',{x:-37,y:-68,width:74,height:136,rx:16,fill:'none',stroke:COL.chalk,'stroke-width':2,'stroke-dasharray':'6 5'},ring);show(ring,m('next',1.7));[e,f,ring].forEach(k=>hide(k,m('result')-.6,.5));});saEq(p,3,-2,1,m('result'),520,1010,46);tokens(p,[{t:'−4',fill:NEG},' + ',{t:'7',fill:POS},' + ',{t:'(−2)',fill:NEG},' = ',{t:'1',fill:POS}],{x:800,y:755,size:57,anchor:'middle',o:0}).forEach(e=>show(e,m('result')));S.saThree={A,B,C,survivors};}],
['temperature','A starting value and a change',m=>{const p=panel(0);saTitle(p,'−7°C, then a rise of 12°C','Find the final temperature.');const l=saLine(p,-10,10,62);saMove(l,0,-7,325,m('start'));saMove(l,-7,5,440,m('rise'));saEq(p,-7,12,5,m('result'));saText(p,'Final temperature: 5°C',800,825,m('result'),34,POS,'middle');}],
['balance','Balance versus amount owed',m=>{const p=panel(0);saTitle(p,'Signed balance −$32 · payment +$21','A negative balance means money is owed.');saTape(p,-32,21,{scale:20,unit:'$',tB:m('payment'),tPair:m('payment',4.1),tLeft:m('balance')});saText(p,'Signed balance: −$11',800,745,m('balance'),44,NEG,'middle');saText(p,'Amount still owed: $11',800,830,m('owed'),44,COL.chalk,'middle');}],
['wrap','Four reliable ideas',m=>{const p=panel(0);[['Move from the CURRENT position: + right, − left.','w1'],['Zero pairs cancel while preserving the total value.','w2'],['Same signs: add magnitudes; keep the shared sign.','w3'],['Different signs: subtract magnitudes; use the larger’s sign.','w4']].forEach(([s,k],i)=>{const g=G(p,{x:-16,y:235+i*145,o:0});mk('circle',{cx:130,cy:-10,r:26,fill:COL.task},g);T(g,String(i+1),{x:130,y:0,size:30,anchor:'middle',fill:COL.board});T(g,s,{x:195,size:i===3?31:33});tw(g,{x:0,o:1},m(k),.6);});saText(p,'Equal opposite magnitudes → 0',800,850,m('w4',2),31,COL.chalk,'middle');}],
['final1','Chapter practice',()=>panel(0),{ask:done=>quiz(SCREEN,[{id:'p-basic',prompt:'Add. Same signs, opposites, and zero.',build:saBlanks([
{parts:['−8 + (−5) = ',{box:'-13'}],why:'Add magnitudes 8+5=13; keep the negative sign.'},
{parts:['6 + 9 = ',{box:'15'}],why:'Both positive: 6+9=15.'},
{parts:['−12 + 12 = ',{box:'0'}],why:'Twelve zero pairs leave no units.'},
{parts:['−18 + 0 = ',{box:'-18'}],why:'Adding zero does not change the value.'}
])}],done,'Chapter practice · set 1 of 3')}],
['final2','Chapter practice',()=>panel(0),{ask:done=>quiz(SCREEN,[{id:'p-mixed',prompt:'Compare magnitudes. For three addends, track the signed partial sum.',build:saBlanks([
{parts:['−17 + 12 = ',{box:'-5'}],why:'17−12=5; the negative addend has larger magnitude.'},
{parts:['23 + (−9) = ',{box:'14'}],why:'23−9=14; the positive addend has larger magnitude.'},
{parts:['−640 + 385 = ',{box:'-255'}],why:'640−385=255; retain the negative sign.'},
{parts:['−6 + 11 + (−3) = ',{box:'2'}],why:'−6+11=5; then 5+(−3)=2.'}
])}],done,'Chapter practice · set 2 of 3')}],
['final3','Chapter practice',()=>panel(0),{ask:done=>quiz(SCREEN,[
{id:'p-temp',prompt:'The temperature is 0°C. It changes by −18°C, then +5°C. Find the final temperature.',build:saBlanks([{parts:[{box:'-13'},' °C'],why:'0+(−18)+5=−13. A five-degree rise does not undo the full eighteen-degree drop.'}])},
{id:'p-balance',prompt:'A signed balance of −$40 improves by +$24 after a payment. Find the NEW SIGNED BALANCE.',build:saBlanks([{parts:[{box:'-16'},' dollars'],why:'−40+24=−16 dollars. The balance remains negative.'}])},
{id:'p-owed',prompt:'For that new balance of −$16, how much money is still owed? Give the positive amount.',build:saBlanks([{parts:[{box:'16'},' dollars owed'],why:'The signed balance is −16; the amount owed is its magnitude, 16 dollars.'}])},
{id:'p-pairs',prompt:'Combine 7 positive tiles and 5 negative tiles. Remove every zero pair.',build:saBlanks([
{parts:[{box:'5'},' zero pairs are removed.'],why:'Each of the five negative tiles pairs with one positive tile.'},
{parts:['Remaining signed value = ',{box:'2'}],why:'Two positive tiles remain, giving signed value +2.'}
])}
],done,'Chapter practice · set 3 of 3')}],
['finish','Finished',()=>panel(0),{ask:finishCard}]
].map(([id,title,run,extra])=>({id,title,run,...extra}));
boot();
</script></body></html>