An AI skill that turns books into animated, narrated, interactive web experiences
JavaScript ai-agentsai-educationanimationclaudeclaude-codeclaude-skillsedtecheducationinteractive-textbookscormtext-to-video
<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Multiplying and Dividing 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:13,title:'Multiplying and Dividing Positive and Negative Numbers',minutes:14,language:'en', next: '../ch14/' };
const smColor=v=>v>0?POS:v<0?NEG:COL.chalk;
const smV=v=>({t:num(v),fill:smColor(v)}),smOperand=v=>({t:v<0?'('+num(v)+')':num(v),fill:smColor(v)});
const smText=(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 smMath=(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 smTitle=(p,s,sub='')=>{smText(p,s,100,110,.1,43);if(sub)smText(p,sub,100,162,.15,27,COL.dim);};
function smEq(p,parts,t=0,y=780,xEq=800,size=52){const k=parts.indexOf(' = '),a=tokens(p,parts.slice(0,k),{x:xEq-size*.65,y,size,anchor:'end'}),b=tokens(p,parts.slice(k+1),{x:xEq+size*.65,y,size,anchor:'start'}),r=[...a,...b];r.forEach(e=>{put(e,{o:0});show(e,t)});r.eq=smMath(p,'=',xEq,y,t,size);return r;}
const smCalc=(p,a,op,b,c,t=0,y=780,size=56,xEq=800)=>smEq(p,[op==='×'?smOperand(a):smV(a),' '+op+' ',smOperand(b),' = ',smV(c)],t,y,xEq,size);
// The equation with '?' from t0; at t1 the answer takes its place. Tokens that keep their text and place stay put.
function smAsk(p,parts,ans,t0,t1,y,xEq=800,size=52){const fill=x=>x==='?'?ans:x,key=x=>JSON.stringify(x),q=smEq(p,parts.map(x=>x==='?'?{t:'?',fill:COL.task}:x),t0,y,xEq,size),a=smEq(p,parts.map(fill),t1,y,xEq,size),ks=parts.filter(x=>x!==' = ');a.eq.remove();q.forEach((e,i)=>{if(ks[i]!=='?'&&Math.abs(e._px-a[i]._px)<.5)a[i].remove();else hide(e,t1,.25);});return a;}
function smLine(p,lo=-8,hi=8,u=70,y=560,o=800){const g=G(p);path(g,`M${o+(lo-.4)*u} ${y}H${o+(hi+.4)*u}`,{stroke:COL.chalk,'stroke-width':3});for(let v=lo;v<=hi;v++){path(g,`M${o+v*u} ${y-8}V${y+8}`,{stroke:COL.dim,'stroke-width':2});T(g,num(v),{x:o+v*u,y:y+42,size:27,font:MATH,anchor:'middle',fill:v===0?COL.chalk:COL.dim});}const dot=G(g,{x:o,y}),circle=mk('circle',{r:11,fill:COL.chalk},dot);return {g,u,y,o,x:v=>o+v*u,dot,circle};}
function smArrow(p,a,b,u,y,t=0,id='arrow',o=800){const d=b-a,dir=Math.sign(d),g=G(p,{x:o+a*u,y,o:0});g.dataset.arrowId=id;const shaft=path(g,`M0 0H${d*u}`,{stroke:smColor(d),'stroke-width':5,'vector-effect':'non-scaling-stroke'});const head=path(g,`M${d*u-12*dir} -9L${d*u} 0L${d*u-12*dir} 9`,{stroke:smColor(d),'stroke-width':5,fill:'none','vector-effect':'non-scaling-stroke'});show(g,t,.35);return {g,shaft,head,a,b,u};}
function smHops(l,n,delta,t=0){const arrows=[];for(let i=0;i<n;i++)arrows.push(smArrow(l.g,i*delta,(i+1)*delta,l.u,l.y-110,t+i*.35,'hop-'+i,l.o));tw(l.dot,{x:l.x(n*delta)},t,1.5,lin);tw(l.circle,{c_fill:smColor(n*delta)},t,1.5,lin);return arrows;}
function smTile(p,sign,id,x,y,t=0){const e=tile(p,sign,x,y);e.dataset.tileId=id;tw(e,{o:1,s:1},t,.3,back);return e;}
function smRows(p,n,k,sign,t=0,x=470,y=265,gap=75,rowgap=95){const g=G(p),tiles=[];for(let r=0;r<n;r++){smText(g,'Group '+(r+1),x-115,y+r*rowgap+10,t,25,COL.dim,'end');for(let c=0;c<k;c++)tiles.push(smTile(g,sign,'row-'+r+'-'+c,x+c*gap,y+r*rowgap,t+.04*(r*k+c)));}return {g,tiles,n,k,sign};}
function smReversal(p,m){const l=smLine(p),arrows=smHops(l,3,-2,0);smText(p,'Each arrow: 2 units',280,275,0,30,COL.task,'middle');const original=G(p);smCalc(original,3,'×',-2,-6,0,705,48);const t=m('reverse');hide(original,t-.2,.2);// Each arrow folds into its tail and regrows the other way while the tail slides across zero; the chain stays joined on its row.
arrows.forEach((a,i)=>{tw(a.g,{x:l.x(2*i),s:-1},t,2.4,io);tw(a.shaft,{c_stroke:POS},t,2.4,io);tw(a.head,{c_stroke:POS},t,2.4,io);});tw(l.dot,{x:l.x(6)},t,2.4,io);tw(l.circle,{c_fill:POS},t,2.4,io);show(original,m('result'));smCalc(p,-3,'×',-2,6,m('result'),820,55);return {l,arrows,original};}
const smBlanks=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;};
function smArrowOptions(p){return [-2,2,1].map((d,j)=>{const x=320+j*480,u=32,g=G(p),letter=String.fromCharCode(65+j);smText(g,letter,x,370,0,36,COL.dim,'middle');path(g,`M${x-205} 520H${x+205}`,{stroke:COL.dim,'stroke-width':2});for(let v=-6;v<=6;v++){path(g,`M${x+v*u} ${v%2?514:510}V${v%2?526:530}`,{stroke:COL.dim,'stroke-width':2});if(v%2===0)smText(g,num(v),x+v*u,565,0,25,v===0?COL.chalk:COL.dim,'middle');}const arrows=[];for(let i=0;i<3;i++)arrows.push(smArrow(g,i*d,(i+1)*d,u,480,0,'choice-'+j+'-'+i,x));return {el:g,box:[x-215,325,430,265],label:'Picture '+letter+': three moves of '+num(d),arrows};});}
const BEATS=[
['intro','Products, quotients, and signs',(m,D)=>{const g=G(scene,{o:0,y:24});T(g,'Unit 1 · The Number System · Chapter 13',{x:800,y:215,size:28,fill:COL.dim,anchor:'middle'});T(g,'Multiplying and Dividing',{x:800,y:325,size:67,weight:600,anchor:'middle'});T(g,'Positive and Negative Numbers',{x:800,y:420,size:64,weight:600,anchor:'middle'});tw(g,{o:1,y:0},.2,1,out);tokens(g,[{t:'+',fill:POS},' × ',{t:'−',fill:NEG},' ÷'],{x:800,y:565,size:76,anchor:'middle'});smText(g,'Groups · opposites · missing factors',800,685,m('sub'),34,COL.dim,'middle');hide(g,D-.8,.7);}],
['groups','Equal positive groups',m=>{const p=panel(0);smTitle(p,'3 × 4','Three groups · four positive units in each');S.smModel=smRows(p,3,4,1,0,540,270);smText(p,'12 positive tiles',1100,370,m('count'),31,POS,'middle');const l=smLine(p,0,12,83,620,255);S.smLine=l;smHops(l,3,4,m('total'));smCalc(p,3,'×',4,12,m('count'),810);}],
['signedGroups','Positive groups of negative values',m=>{const p=panel(0);smTitle(p,'3 × (−2)','Three groups · negative two in each');S.smModel=smRows(p,3,2,-1,0,650,250,75,80);const l=smLine(p,-8,8,70,600);S.smLine=l;smHops(l,3,-2,m('move'));smCalc(p,3,'×',-2,-6,m('result'),810);}],
['q1','Quick check',()=>{const p=panel(0);smTitle(p,'3 × (−2)','Three rows of two negative tiles');S.smModel=smRows(p,3,2,-1,0,620,240,75,80);const l=smLine(p,-8,8,70,560);S.smLine=l;S.smChoices=[-6,-5,6].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)-28,l.y-30,56,60],label:num(v)};});},{ask:done=>quiz(BAND,[{id:'c-negative-groups',prompt:'Choose the endpoint for three negative-two groups.',build:pickEls(S.smChoices,0,'Six negative units total −6. Three groups means three equal moves of −2.',i=>i===1?'Count both negative units in each of the three groups: 3×2=6.':'Each group has negative value. A positive group count does not reverse the sign.',()=>pulseFx(S.smChoices[0].el,1.2))}],done)}],
['opposite','Why a negative multiplier reverses',m=>{const p=panel(0);smTitle(p,'Opposite multipliers need opposite products','Distribute multiplication over a sum.');smEq(p,[smV(3),' + ',smOperand(-3),' = ',smV(0)],m('zero'),285,600,64);for(let i=0;i<3;i++){const x=1160+i*95;smTile(p,1,'proof-positive-'+i,x,250,m('zero'));smTile(p,-1,'proof-negative-'+i,x,325,m('zero'));}smMath(p,'(3 + (−3)) × (−2) = 0',800,420,m('zero',3.8),49);smMath(p,'3 × (−2) + (−3) × (−2) = 0',800,550,m('gives'),47);smEq(p,[smV(-6),' + ','?', ' = ',smV(0)],m('opposite'),690,800,64);smText(p,'The missing product must be +6.',800,820,m('opposite',3.4),38,POS,'middle');}],
['reverse','Reverse the original directed moves',m=>{const p=panel(0);smTitle(p,'(−3) × (−2)','Opposite of 3 × (−2): reverse direction, preserve length.');S.smReversal=smReversal(p,m);}],
['q2','Quick check',()=>{const p=panel(0);smTitle(p,'(−3) × (−2)','Choose the opposite of three −2 moves. Same two-unit arrow length.');S.smChoices=smArrowOptions(p);},{ask:done=>quiz(BAND,[{id:'c-reversed-arrows',prompt:'Which picture represents the reversed product?',build:pickEls(S.smChoices,1,'Picture B reverses each two-unit move: +2,+2,+2 end at +6.',i=>i===0?'Picture A is still 3×(−2). A negative multiplier takes its opposite.':'Picture C reverses direction but changes each length from two units to one. Keep the magnitude.',()=>pulseFx(S.smChoices[1].el,1.04))}],done)}],
['signPairs','Four sign pairs',m=>{const p=panel(0);smTitle(p,'Nonzero factors: same signs +, different signs −');const cases=[[2,3,6,'pp'],[2,-3,-6,'pn'],[-2,3,-6,'np'],[-2,-3,6,'nn']];S.smSignArrows=[];cases.forEach(([a,b,c,k],i)=>{const y=300+i*150,t=m(k),x=1180,u=35,ax=G(p,{o:0});smCalc(p,a,'×',b,c,t,y,49,620);path(ax,`M${x-235} ${y-17}H${x+235}`,{stroke:COL.dim,'stroke-width':2});for(let v=-6;v<=6;v++)path(ax,`M${x+v*u} ${y-(v?24:28)}V${y-(v?10:6)}`,{stroke:v?COL.dim:COL.chalk,'stroke-width':2});T(ax,'0',{x,y:y+22,size:24,anchor:'middle',fill:COL.chalk});show(ax,t);S.smSignArrows.push(smArrow(p,0,c,u,y-17,t,'pair-'+i,x));});}],
['division','Division as a missing factor',m=>{const p=panel(0);smTitle(p,'−12 ÷ 3','Share twelve negative tiles among three groups.');const g=G(p),tiles=[];for(let i=0;i<12;i++)tiles.push(smTile(g,-1,'share-'+i,390+i*68,290,.03*i));for(let j=0;j<3;j++){mk('rect',{x:230+j*430,y:440,width:260,height:195,rx:18,fill:'none',stroke:COL.dim,'stroke-width':2},g);smText(g,'Group '+(j+1),360+j*430,670,0,27,COL.dim,'middle');}tiles.forEach((e,i)=>{const j=i%3,k=Math.floor(i/3);tw(e,{x:320+j*430+(k%2)*80,y:495+Math.floor(k/2)*85},m('share'),1.6,io);});smCalc(p,-12,'÷',3,-4,m('result'),745,54);smCalc(p,3,'×',-4,-12,m('result',2),840,45);S.smDivision={g,tiles};}],
['negativeDivisor','Check a quotient by multiplication',m=>{const p=panel(0);smTitle(p,'A negative divisor: find the missing factor');smAsk(p,[smV(-12),' ÷ ',smOperand(-3),' = ','?'],smV(4),0,m('four'),290,800,58);smAsk(p,[smOperand(-3),' × ','?',' = ',smV(-12)],smV(4),m('same',2.5),m('four'),390,800,49);smText(p,'Four groups of −3 total −12',800,460,m('groups'),31,NEG,'middle');const boxes=G(p,{o:0});show(boxes,m('groups'));for(let r=0;r<4;r++){const x=400+r*265;mk('rect',{x:x-108,y:487,width:216,height:85,rx:13,fill:'none',stroke:COL.dim,'stroke-width':2},boxes);for(let c=0;c<3;c++)smTile(p,-1,'inverse-'+r+'-'+c,x+(c-1)*60,530,m('groups'));}smAsk(p,[smV(12),' ÷ ',smOperand(-3),' = ','?'],smV(-4),m('different'),m('neg4'),695,800,58);smAsk(p,[smOperand(-3),' × ','?',' = ',smV(12)],smOperand(-4),m('different',2.5),m('neg4'),800,800,49);}],
['q3','Quick check',()=>{const p=panel(0);smTitle(p,'−15 ÷ (−5) = ?','The divisor is −5. Which picture shows groups of −5 totaling −15?');S.smChoices=[[-1,3,5],[1,3,5],[-1,5,3]].map(([sign,n,k],j)=>{const x=320+j*490,g=G(p);smText(g,String.fromCharCode(65+j),x,230,0,28,COL.dim,'middle');for(let r=0;r<n;r++){mk('rect',{x:x-165,y:260+r*72,width:330,height:65,rx:12,fill:'none',stroke:COL.dim,'stroke-width':1},g);for(let c=0;c<k;c++)smTile(g,sign,'q3-'+j+'-'+r+'-'+c,x+(c-(k-1)/2)*60,292+r*72);}smText(g,n+' groups of '+(sign>0?'+':'−')+k,x,650,0,28,smColor(sign),'middle');return {el:g,box:[x-185,250,370,375],label:n+' groups of '+sign*k};});},{ask:done=>quiz(BAND,[{id:'c-division-factor',prompt:'Choose the picture that checks (−5) × quotient = −15.',build:pickEls(S.smChoices,0,'Three groups each worth −5 total −15, so the quotient is +3.',i=>i===1?'Three groups of +5 total +15. The divisor and dividend here are negative.':'Five groups of −3 total −15, but each group must have value −5, the divisor.',()=>pulseFx(S.smChoices[0].el,1.03))}],done)}],
['magnitude','Compute magnitude, then sign',m=>{const p=panel(0);smTitle(p,'Signed fractions and decimals follow the same rule');smAsk(p,[smOperand(-1.5),' × ',smV(4),' = ','?'],smV(-6),0,m('sign'),280,470,53);smText(p,'Magnitude: 1.5 × 4 = 6',470,365,m('decimal',2.5),31,COL.task,'middle');smCalc(p,4,'×',-1.5,-6,m('order'),280,53,1130);const l=smLine(p,-6,6,85,570);S.smLine=l;smHops(l,4,-1.5,m('order',1.5));smAsk(p,[smV(-18),' ÷ ',smV(6),' = ','?'],smV(-3),m('divide'),m('sign2',2),730,800,56);smText(p,'Magnitude: 18 ÷ 6 = 3',560,825,m('divide',2),31,COL.task,'middle');smText(p,'Different signs → negative',1060,825,m('sign2'),31,NEG,'middle');}],
['parity','Pair the negative reversals',m=>{const p=panel(0);smTitle(p,'Count negative factors only for NONZERO results');const row=tokens(p,[smOperand(-2),' × ',smV(3),' × ',smOperand(-4)],{x:800,y:370,size:65,anchor:'middle'});row.forEach(e=>{put(e,{o:0});show(e,m('pair'))});const ring=G(p,{o:0});for(const e of [row[0],row[4]])mk('rect',{x:e._px-e._w/2-10,y:290,width:e._w+20,height:115,rx:18,fill:'none',stroke:COL.chalk,'stroke-width':3,'stroke-dasharray':'8 6'},ring);show(ring,m('pair'));smText(p,'2 negative factors: even → +24',800,500,m('pair',9.6),37,POS,'middle');smMath(p,'(−2) × 3 × (−4) × (−1)',800,650,m('odd'),56);smText(p,'3 negative factors: odd → −24',800,775,m('odd',4.5),37,NEG,'middle');}],
['chain','Equal priority: left to right',m=>{const p=panel(0);smTitle(p,'Multiplication and division have EQUAL priority');const r=tokens(p,[smV(-24),' ÷ ',smOperand(-3),' × ',smOperand(-2)],{x:800,y:275,size:61,anchor:'middle'});const first=G(p,{o:0});const bx=r[0]._px-r[0]._w/2-16,bw=r[2]._px+r[2]._w/2-bx+16;mk('rect',{x:bx,y:202,width:bw,height:95,rx:14,fill:'none',stroke:COL.chalk,'stroke-width':2,'stroke-dasharray':'7 5'},first);show(first,m('first'));hide(first,m('next'),.2);S.smChain={tokens:r,first,bx,bw};smCalc(p,-24,'÷',-3,8,m('first'),390,51);smCalc(p,8,'×',-2,-16,m('next'),495,51);smText(p,'Parentheses change the grouping:',800,595,m('parentheses'),29,COL.dim,'middle');smMath(p,'−24 ÷ ((−3) × (−2))',800,685,m('parentheses'),54);smCalc(p,-24,'÷',6,-4,m('parentheses',3),805,54);}],
['zero','Zero is neither positive nor negative',m=>{const p=panel(0);smTitle(p,'Zero is a value, not a positive sign');smCalc(p,-7,'×',0,0,0,315,65);for(let j=0;j<7;j++){mk('rect',{x:280+j*150,y:375,width:125,height:100,rx:15,fill:'none',stroke:COL.dim,'stroke-width':2},p);smText(p,'0',342.5+j*150,435,m('product'),30,COL.chalk,'middle');}smText(p,'Seven empty groups total 0; the opposite of 0 is 0',800,550,m('product'),29,COL.chalk,'middle');smCalc(p,0,'÷',-5,0,m('dividend'),695,61);smCalc(p,-5,'×',0,0,m('dividend',1.5),820,49);}],
['divideZero','Division by zero is undefined',m=>{const p=panel(0);smTitle(p,'A divisor of zero never gives a unique quotient');smMath(p,'9 ÷ 0 : 0 × ? = 9',800,300,0,64);smText(p,'No number works.',800,390,m('impossible'),36,COL.dim,'middle');smMath(p,'0 ÷ 0 : 0 × ? = 0',800,550,m('many'),64);smText(p,'Every number works; no unique answer.',800,640,m('many'),34,COL.dim,'middle');smText(p,'Both are UNDEFINED.',800,815,m('undefined'),47,COL.chalk,'middle');}],
['loss','Signed loss or positive amount?',m=>{const p=panel(0);smTitle(p,'Six equal daily changes of −$8','Each block is one day.');const g=G(p),segments=[];for(let i=0;i<6;i++){const e=G(g,{x:190+i*207,y:300});mk('rect',{width:128,height:70,rx:9,fill:mix(COL.board,NEG,.45),stroke:NEG,'stroke-width':2},e);smText(e,'Day '+(i+1),64,-20,0,25,COL.dim,'middle');smText(e,'−$8',64,45,0,29,NEG,'middle');e.dataset.dayId='day-'+i;segments.push(e);tw(e,{x:416+i*128,y:435},m('total'),1.4,io);}smCalc(p,6,'×',-8,-48,m('total'),625,51);smCalc(p,-48,'÷',6,-8,m('daily'),725,51);smText(p,'Daily signed change: −$8',800,805,m('daily'),31,NEG,'middle');smText(p,'Amount lost each day: $8',800,865,m('amount'),31,COL.task,'middle');S.smLoss={g,segments};}],
['wrap','Keep four ideas together',m=>{const p=panel(0);smTitle(p,'Multiply and divide signed values with a reason');[['Nonzero: same signs +; different signs −.','w1'],['Negative multiplier: opposite. Division: missing factor.','w2'],['Nonzero sign count: even +; odd −.','w3'],['Zero separately; no division by 0; × and ÷ left to right.','w4']].forEach(([s,k],i)=>{const g=G(p,{x:-16,y:300+i*155,o:0});mk('circle',{cx:130,cy:-11,r:28,fill:COL.task},g);T(g,String(i+1),{x:130,y:0,size:32,anchor:'middle',fill:COL.board});T(g,s,{x:195,size:36});tw(g,{x:0,o:1},m(k),.6);});}],
['final1','Chapter practice',()=>panel(0),{ask:done=>quiz(SCREEN,[{id:'p-multiply-signs',prompt:'Multiply with all four sign pairs.',build:smBlanks([
{parts:['6 × 7 = ',{box:'42'}],why:'Positive times positive is positive; 6×7=42.'},
{parts:['6 × (−7) = ',{box:'-42'}],why:'Different signs: negative. The magnitude is 42.'},
{parts:['(−6) × 7 = ',{box:'-42'}],why:'The opposite of 6×7 is −42.'},
{parts:['(−6) × (−7) = ',{box:'42'}],why:'The opposite of 6×(−7), or −42, is +42.'}
])},{id:'p-divide-signs',prompt:'Divide. Check the result by multiplying by the divisor.',build:smBlanks([
{parts:['45 ÷ 5 = ',{box:'9'}],why:'5×9=45.'},
{parts:['45 ÷ (−5) = ',{box:'-9'}],why:'(−5)×(−9)=45.'},
{parts:['−45 ÷ 5 = ',{box:'-9'}],why:'5×(−9)=−45.'},
{parts:['−45 ÷ (−5) = ',{box:'9'}],why:'(−5)×9=−45.'}
])}],done,'Chapter practice · set 1 of 3')}],
['final2','Chapter practice',()=>panel(0),{ask:done=>quiz(SCREEN,[{id:'p-chains',prompt:'Use nonzero sign parity, left-to-right order, and parentheses.',build:smBlanks([
{parts:['(−2) × (−3) × (−4) = ',{box:'-24'}],why:'Three negative factors: odd gives negative; magnitude 2×3×4=24.'},
{parts:['−36 ÷ (−3) × (−2) = ',{box:'-24'}],why:'Left to right: −36÷(−3)=12; 12×(−2)=−24.'},
{parts:['−36 ÷ ((−3) × (−2)) = ',{box:'-6'}],why:'Parentheses first: (−3)×(−2)=6; −36÷6=−6.'},
{parts:['(−1.5) × 2 = ',{box:'-3'}],why:'Magnitude 1.5×2=3; different signs give −3.'}
])},{id:'p-zero',prompt:'Classify the value. Zero is neither positive nor negative; a zero divisor is undefined.',build:grid([
{parts:['(−11) × 0'],ans:['z'],why:'A product with zero is zero, irrespective of negative signs.'},
{parts:['0 ÷ (−8)'],ans:['z'],why:'The divisor is nonzero: (−8)×0=0, so the quotient is zero.'},
{parts:['−8 ÷ 0'],ans:['u'],why:'No number multiplied by zero gives −8. Division by zero is undefined.'},
{parts:['0 ÷ 0'],ans:['u'],why:'Every number multiplied by zero gives zero; no unique quotient. Undefined.'}
],[['p','positive',POS],['n','negative',NEG],['z','zero',COL.chalk],['u','undefined',COL.dim]],{multi:false})}],done,'Chapter practice · set 2 of 3')}],
['final3','Chapter practice',()=>panel(0),{ask:done=>quiz(SCREEN,[{id:'p-depth',prompt:'A camera starts at sea level (0 m). Its height changes by −3 m each second for 7 seconds.',build:smBlanks([
{parts:['Signed position = ',{box:'-21'},' m'],why:'7×(−3)=−21, so −21 m relative to sea level.'},
{parts:['Positive depth below sea level = ',{box:'21'},' m'],why:'The distance below sea level is the magnitude, 21 m.'}
])},{id:'p-loss',prompt:'A shop has a total signed change of −$63 over 7 days, with the same loss each day.',build:smBlanks([
{parts:['Daily signed change = $ ',{box:'-9'}],why:'−63÷7=−9 dollars per day.'},
{parts:['Positive amount lost each day = $ ',{box:'9'}],why:'The daily loss amount is the magnitude, 9 dollars.'}
])}],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>