An AI skill that turns books into animated, narrated, interactive web experiences
JavaScript ai-agentsai-educationanimationclaudeclaude-codeclaude-skillsedtecheducationinteractive-textbookscormtext-to-video
feat(math): add percent chapter
yzre046d275b5d1
diff --git a/site/index.html b/site/index.htmlindex a436e0d..6b1c83d 100644--- a/site/index.html+++ b/site/index.html@@ -23,8 +23,8 @@<a class="book-hotspot algebra-book" data-book="elementary-algebra" href="elementary-algebra/" aria-label="Open Elementary Algebra, 68 narrated chapters"><span class="book-caption"><strong>Elementary Algebra <span aria-hidden="true">↗</span></strong><small>68 narrated chapters</small></span></a>- <a class="book-hotspot math-book" data-book="math-notebook" href="math-notebook/" aria-label="Open Elementary Mathematics, 18 narrated chapters">- <span class="book-caption"><strong>Elementary Mathematics <span aria-hidden="true">↗</span></strong><small>18 narrated chapters</small></span>+ <a class="book-hotspot math-book" data-book="math-notebook" href="math-notebook/" aria-label="Open Elementary Mathematics, 19 narrated chapters">+ <span class="book-caption"><strong>Elementary Mathematics <span aria-hidden="true">↗</span></strong><small>19 narrated chapters</small></span></a><span class="physics-pending">Physics · Coming soon</span></section>diff --git a/site/lib/bookshelf.js b/site/lib/bookshelf.jsindex 77205ae..342273a 100644--- a/site/lib/bookshelf.js+++ b/site/lib/bookshelf.js@@ -17,7 +17,7 @@const books = [{ id: 'elementary-algebra', key: 'progress', chapterBase: 'elementary-algebra/', chapters: 68 },{ id: 'math-notebook', key: 'animebook:progress:' + new URL('math-notebook/', location.href).pathname,- chapterBase: 'math-notebook/', chapters: 18 },+ chapterBase: 'math-notebook/', chapters: 19 },];for (const book of books) {const cover = document.querySelector(`[data-book="${book.id}"]`);diff --git a/site/math-notebook/ch18/index.html b/site/math-notebook/ch18/index.htmlindex 542e8df..96a5c8a 100644--- a/site/math-notebook/ch18/index.html+++ b/site/math-notebook/ch18/index.html@@ -2,7 +2,7 @@<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Converting Measurements — Elementary Mathematics</title><link rel="stylesheet" href="../lib/engine.css"><link rel="expect" href="#bar" blocking="render"><style>.band .prompt{font-size:27px}.side .keys{font-size:19px}.screen .blanks .bline{gap:12px}.screen .blanks .box{width:9ch!important}.screen .blanks .why{font-size:22px}.screen .blanks .bline svg tspan{font-style:normal}</style></head><body><script src="../lib/engine.js"></script><script src="audio/en/timings.js"></script><script>'use strict';-const CHAPTER={number:18,title:'Converting Measurements',minutes:13,language:'en'};+const CHAPTER={number:18,title:'Converting Measurements',minutes:13,language:'en', next: '../ch19/' };// Entrances from ch17. Blue marks conserved quantities; amber marks new unit readings.const cvText=(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 cvMath=(p,s,x,y,t=0,size=52,col=COL.chalk)=>{const e=M(p,Array.isArray(s)?s:[s],{x,y,size,fill:col,anchor:'middle',o:0});e.querySelectorAll('tspan').forEach(span=>{if(!/^[xy]$/.test(span.textContent))span.setAttribute('font-style','normal');});show(e,t);return e;};diff --git a/site/math-notebook/ch19/audio/en/back.mp3 b/site/math-notebook/ch19/audio/en/back.mp3new file mode 100644index 0000000..f6aed43Binary files /dev/null and b/site/math-notebook/ch19/audio/en/back.mp3 differdiff --git a/site/math-notebook/ch19/audio/en/beyond.mp3 b/site/math-notebook/ch19/audio/en/beyond.mp3new file mode 100644index 0000000..731ee38Binary files /dev/null and b/site/math-notebook/ch19/audio/en/beyond.mp3 differdiff --git a/site/math-notebook/ch19/audio/en/context.mp3 b/site/math-notebook/ch19/audio/en/context.mp3new file mode 100644index 0000000..13793cfBinary files /dev/null and b/site/math-notebook/ch19/audio/en/context.mp3 differdiff --git a/site/math-notebook/ch19/audio/en/decimal.mp3 b/site/math-notebook/ch19/audio/en/decimal.mp3new file mode 100644index 0000000..30bb5b5Binary files /dev/null and b/site/math-notebook/ch19/audio/en/decimal.mp3 differdiff --git a/site/math-notebook/ch19/audio/en/divide.mp3 b/site/math-notebook/ch19/audio/en/divide.mp3new file mode 100644index 0000000..d78c93aBinary files /dev/null and b/site/math-notebook/ch19/audio/en/divide.mp3 differdiff --git a/site/math-notebook/ch19/audio/en/equivalent.mp3 b/site/math-notebook/ch19/audio/en/equivalent.mp3new file mode 100644index 0000000..1d20d04Binary files /dev/null and b/site/math-notebook/ch19/audio/en/equivalent.mp3 differdiff --git a/site/math-notebook/ch19/audio/en/final1.mp3 b/site/math-notebook/ch19/audio/en/final1.mp3new file mode 100644index 0000000..e993b40Binary files /dev/null and b/site/math-notebook/ch19/audio/en/final1.mp3 differdiff --git a/site/math-notebook/ch19/audio/en/final2.mp3 b/site/math-notebook/ch19/audio/en/final2.mp3new file mode 100644index 0000000..7168c07Binary files /dev/null and b/site/math-notebook/ch19/audio/en/final2.mp3 differdiff --git a/site/math-notebook/ch19/audio/en/final3.mp3 b/site/math-notebook/ch19/audio/en/final3.mp3new file mode 100644index 0000000..f219b77Binary files /dev/null and b/site/math-notebook/ch19/audio/en/final3.mp3 differdiff --git a/site/math-notebook/ch19/audio/en/finish.mp3 b/site/math-notebook/ch19/audio/en/finish.mp3new file mode 100644index 0000000..60c9d5aBinary files /dev/null and b/site/math-notebook/ch19/audio/en/finish.mp3 differdiff --git a/site/math-notebook/ch19/audio/en/fraction.mp3 b/site/math-notebook/ch19/audio/en/fraction.mp3new file mode 100644index 0000000..1f28832Binary files /dev/null and b/site/math-notebook/ch19/audio/en/fraction.mp3 differdiff --git a/site/math-notebook/ch19/audio/en/hundred.mp3 b/site/math-notebook/ch19/audio/en/hundred.mp3new file mode 100644index 0000000..c746906Binary files /dev/null and b/site/math-notebook/ch19/audio/en/hundred.mp3 differdiff --git a/site/math-notebook/ch19/audio/en/intro.mp3 b/site/math-notebook/ch19/audio/en/intro.mp3new file mode 100644index 0000000..81c0a28Binary files /dev/null and b/site/math-notebook/ch19/audio/en/intro.mp3 differdiff --git a/site/math-notebook/ch19/audio/en/partial.mp3 b/site/math-notebook/ch19/audio/en/partial.mp3new file mode 100644index 0000000..0ccc5c1Binary files /dev/null and b/site/math-notebook/ch19/audio/en/partial.mp3 differdiff --git a/site/math-notebook/ch19/audio/en/q1.mp3 b/site/math-notebook/ch19/audio/en/q1.mp3new file mode 100644index 0000000..600cd40Binary files /dev/null and b/site/math-notebook/ch19/audio/en/q1.mp3 differdiff --git a/site/math-notebook/ch19/audio/en/q2.mp3 b/site/math-notebook/ch19/audio/en/q2.mp3new file mode 100644index 0000000..90921d1Binary files /dev/null and b/site/math-notebook/ch19/audio/en/q2.mp3 differdiff --git a/site/math-notebook/ch19/audio/en/q3.mp3 b/site/math-notebook/ch19/audio/en/q3.mp3new file mode 100644index 0000000..a3f41b3Binary files /dev/null and b/site/math-notebook/ch19/audio/en/q3.mp3 differdiff --git a/site/math-notebook/ch19/audio/en/rounding.mp3 b/site/math-notebook/ch19/audio/en/rounding.mp3new file mode 100644index 0000000..6c82534Binary files /dev/null and b/site/math-notebook/ch19/audio/en/rounding.mp3 differdiff --git a/site/math-notebook/ch19/audio/en/timings.js b/site/math-notebook/ch19/audio/en/timings.jsnew file mode 100644index 0000000..abdf005--- /dev/null+++ b/site/math-notebook/ch19/audio/en/timings.js@@ -0,0 +1,705 @@+window.TIMINGS = {+ "intro": {+ "dur": 32.88,+ "marks": {+ "sub": 10.339+ },+ "cues": [+ [+ 0.104,+ "Chapter nineteen."+ ],+ [+ 1.432,+ "Percent."+ ],+ [+ 2.396,+ "You see percents on battery meters, score reports, and progress bars."+ ],+ [+ 7.253,+ "They all use the same comparison: one hundred."+ ],+ [+ 10.339,+ "A percent tells us how much compared with one whole, written as one hundred equal parts."+ ],+ [+ 16.068,+ "In this chapter, we will connect percent, fraction, and decimal forms."+ ],+ [+ 21.172,+ "We will also meet percents with decimal points, percents smaller than one, and percents larger than one hundred."+ ],+ [+ 28.099,+ "Keep an eye on the whole: the same shaded amount can have three different names."+ ]+ ]+ },+ "hundred": {+ "dur": 41.904,+ "marks": {+ "shade": 8.06,+ "names": 16.315,+ "whole": 36.094+ },+ "cues": [+ [+ 0.104,+ "This square is one whole garden plan."+ ],+ [+ 2.721,+ "It has ten rows of ten equal cells: one hundred cells altogether."+ ],+ [+ 8.06,+ "Shade thirty-seven of them."+ ],+ [+ 9.974,+ "Three complete rows give thirty, and seven more cells make thirty-seven."+ ],+ [+ 16.315,+ "Thirty-seven percent means thirty-seven per hundred."+ ],+ [+ 20.026,+ "The fraction is thirty-seven over one hundred, and the decimal is zero point three seven."+ ],+ [+ 26.289,+ "These names describe exactly the same shaded area."+ ],+ [+ 29.987,+ "The percent sign does not mean extra stuff; it tells us the comparison uses one hundred."+ ],+ [+ 36.094,+ "All one hundred cells would be one hundred percent, or one whole."+ ],+ [+ 39.688,+ "No cells would be zero percent."+ ]+ ]+ },+ "fraction": {+ "dur": 40.272,+ "marks": {+ "groups": 6.536,+ "simplify": 13.411,+ "rule": 28.385+ },+ "cues": [+ [+ 0.104,+ "Here, forty of the hundred cells are shaded."+ ],+ [+ 3.268,+ "Forty percent becomes forty over one hundred."+ ],+ [+ 6.536,+ "Outline five equal groups, each containing twenty cells."+ ],+ [+ 11.029,+ "Two of these five groups are shaded."+ ],+ [+ 13.411,+ "So forty over one hundred simplifies to two fifths."+ ],+ [+ 17.318,+ "Divide both the numerator and denominator by twenty."+ ],+ [+ 20.898,+ "The shaded cells have not changed size, count, or position."+ ],+ [+ 25.065,+ "We changed how we grouped them and how we named the fraction."+ ],+ [+ 28.385,+ "To write any percent as a fraction, put its number over one hundred, then simplify if possible."+ ],+ [+ 35.768,+ "Forty percent, two fifths, and zero point four are equal."+ ]+ ]+ },+ "q1": {+ "dur": 5.112,+ "marks": {},+ "cues": [+ [+ 0.104,+ "Quick check."+ ],+ [+ 1.094,+ "Choose the picture that really shows forty percent of one whole."+ ]+ ]+ },+ "equivalent": {+ "dur": 42.36,+ "marks": {+ "split": 7.8,+ "result": 22.878,+ "check": 34.141+ },+ "cues": [+ [+ 0.104,+ "Not every fraction starts with a denominator of one hundred."+ ],+ [+ 4.271,+ "This strip has seven of twenty equal pieces shaded."+ ],+ [+ 7.8,+ "Split each twentieth into five equal pieces."+ ],+ [+ 11.914,+ "The whole now has one hundred equal pieces, and the shaded part has thirty-five."+ ],+ [+ 17.07,+ "The shaded area stays fixed; each old piece becomes five smaller pieces."+ ],+ [+ 22.878,+ "Seven twentieths equals thirty-five hundredths, so it equals thirty-five percent."+ ],+ [+ 28.659,+ "Multiplying both parts of a fraction by five keeps the ratio unchanged."+ ],+ [+ 34.141,+ "This is an equivalent-fraction method."+ ],+ [+ 36.38,+ "It works neatly when the denominator can be scaled to one hundred using a convenient factor."+ ]+ ]+ },+ "divide": {+ "dur": 37.992,+ "marks": {+ "decimal": 6.797,+ "percent": 15.221,+ "cuts": 25.286+ },+ "cues": [+ [+ 0.104,+ "What if the denominator does not turn into one hundred neatly?"+ ],+ [+ 3.997,+ "Here we have three eighths of a whole strip."+ ],+ [+ 6.797,+ "Divide three by eight to get zero point three seven five."+ ],+ [+ 11.419,+ "That is the decimal form of this same shaded area."+ ],+ [+ 15.221,+ "Multiply the decimal by one hundred to express it as a number of hundredths: thirty-seven point five percent."+ ],+ [+ 22.409,+ "A percent does not have to be a whole number."+ ],+ [+ 25.286,+ "With hundredth marks on the same strip, the blue region covers thirty-seven complete hundredths and half of the next hundredth."+ ],+ [+ 33.086,+ "The half cell matters."+ ],+ [+ 34.701,+ "Rounding it away would change an exact answer."+ ]+ ]+ },+ "decimal": {+ "dur": 35.232,+ "marks": {+ "fraction": 5.664,+ "divide": 8.672,+ "same": 20.716+ },+ "cues": [+ [+ 0.104,+ "This battery display shows sixty-eight percent."+ ],+ [+ 3.711,+ "Keep its blue area in view."+ ],+ [+ 5.664,+ "The percent means sixty-eight over one hundred."+ ],+ [+ 8.672,+ "Divide sixty-eight by one hundred: zero point six eight."+ ],+ [+ 12.604,+ "The decimal point moves two places left because each place is ten times smaller, and two steps make one hundred times smaller."+ ],+ [+ 20.716,+ "Sixty-eight percent and zero point six eight describe the same portion of the battery."+ ],+ [+ 26.276,+ "Sixty-eight without a percent sign would mean sixty-eight wholes, which is much larger."+ ],+ [+ 31.94,+ "Always carry the meaning of the sign with the number."+ ]+ ]+ },+ "q2": {+ "dur": 6.0,+ "marks": {},+ "cues": [+ [+ 0.091,+ "Quick check."+ ],+ [+ 1.081,+ "Match the decimal zero point zero six with its shaded percent picture."+ ]+ ]+ },+ "back": {+ "dur": 39.816,+ "marks": {+ "percent": 4.193,+ "moves": 18.568,+ "meaning": 29.857+ },+ "cues": [+ [+ 0.104,+ "Now start with a decimal: zero point four two of this whole strip."+ ],+ [+ 4.193,+ "The blue area occupies forty-two of one hundred equal pieces, so it is forty-two percent."+ ],+ [+ 11.628,+ "Multiply zero point four two by one hundred to obtain forty-two, then attach the percent sign."+ ],+ [+ 18.568,+ "The decimal point moves two places right."+ ],+ [+ 22.148,+ "A value of zero point zero seven becomes seven percent, and one point two becomes one hundred twenty percent."+ ],+ [+ 29.857,+ "Those numbers look different, but each decimal and its percent partner names the same ratio."+ ],+ [+ 35.586,+ "Check the whole instead of trusting the position of a dot alone."+ ]+ ]+ },+ "partial": {+ "dur": 42.048,+ "marks": {+ "fill": 7.487,+ "zoom": 11.836,+ "convert": 25.651+ },+ "cues": [+ [+ 0.104,+ "Two point five percent is much smaller than twenty-five percent."+ ],+ [+ 4.57,+ "Here one whole strip means one hundred percent."+ ],+ [+ 7.487,+ "The blue area fills two and a half of its hundred equal pieces."+ ],+ [+ 11.836,+ "This enlarged view shows those same three hundredth cells: two full cells and half of the third."+ ],+ [+ 18.672,+ "The inset is drawn larger, so compare fractions of its cells, not its physical width with the top strip."+ ],+ [+ 25.651,+ "Two point five divided by one hundred is zero point zero two five."+ ],+ [+ 30.352,+ "As a fraction, two point five over one hundred equals twenty-five over one thousand, which simplifies to one fortieth."+ ],+ [+ 39.206,+ "A decimal percent still means per hundred."+ ]+ ]+ },+ "tiny": {+ "dur": 46.824,+ "marks": {+ "convert": 5.039,+ "scale": 17.734,+ "fraction": 31.159+ },+ "cues": [+ [+ 0.143,+ "For a very small percent, take the same two-place step carefully."+ ],+ [+ 5.039,+ "Zero point zero zero four percent divided by one hundred becomes zero point zero zero zero zero four."+ ],+ [+ 13.555,+ "There are four zeros after the decimal point before the four."+ ],+ [+ 17.734,+ "This magnified line runs from zero to zero point zero one percent."+ ],+ [+ 22.799,+ "The marked value, zero point zero zero four percent, is four tenths of that tiny interval, not four tenths of a whole."+ ],+ [+ 31.159,+ "Its fraction of one whole is one over twenty-five thousand."+ ],+ [+ 35.13,+ "Leading zeros hold the place value."+ ],+ [+ 37.565,+ "Never erase them while moving the decimal point."+ ],+ [+ 40.677,+ "A useful check: a percent below one becomes a decimal below zero point zero one."+ ]+ ]+ },+ "beyond": {+ "dur": 42.168,+ "marks": {+ "extra": 7.695,+ "names": 16.693,+ "context": 25.052+ },+ "cues": [+ [+ 0.104,+ "One hundred percent is exactly one whole."+ ],+ [+ 3.034,+ "A percent larger than one hundred compares an amount greater than that whole."+ ],+ [+ 7.695,+ "Start with a complete strip, then add sixty hundredths of a second same-sized strip."+ ],+ [+ 13.281,+ "Together they show one hundred sixty percent."+ ],+ [+ 16.693,+ "One hundred sixty over one hundred simplifies to eight fifths, or one and three fifths."+ ],+ [+ 22.721,+ "The decimal is one point six."+ ],+ [+ 25.052,+ "For example, a trail marker at one point six kilometers is one hundred sixty percent of a one-kilometer reference distance."+ ],+ [+ 33.294,+ "The reference is one kilometer; we are comparing lengths, not claiming a battery can hold more than its defined full charge."+ ]+ ]+ },+ "q3": {+ "dur": 5.784,+ "marks": {},+ "cues": [+ [+ 0.104,+ "Quick check."+ ],+ [+ 1.172,+ "Pick the picture showing one hundred sixty percent of the reference whole."+ ]+ ]+ },+ "context": {+ "dur": 40.464,+ "marks": {+ "groups": 6.771,+ "hundred": 14.74,+ "rest": 27.044+ },+ "cues": [+ [+ 0.091,+ "A class planted twelve seeds, and nine sprouted."+ ],+ [+ 3.685,+ "Each equal section stands for one seed."+ ],+ [+ 6.771,+ "Group the twelve sections into four equal groups of three."+ ],+ [+ 10.925,+ "Nine sprouted seeds fill three of the four groups."+ ],+ [+ 14.74,+ "Three fourths is seventy-five hundredths, so seventy-five percent of the seeds sprouted."+ ],+ [+ 20.781,+ "This is a ratio description of the observed count."+ ],+ [+ 24.089,+ "We do not need a formula for finding a missing amount."+ ],+ [+ 27.044,+ "Three seeds did not sprout."+ ],+ [+ 28.945,+ "Their fraction is three twelfths, or one fourth, so twenty-five percent did not sprout."+ ],+ [+ 35.495,+ "Together the two shares make one hundred percent of the same twelve seeds."+ ]+ ]+ },+ "rounding": {+ "dur": 42.84,+ "marks": {+ "decimal": 7.24,+ "percent": 11.276,+ "round": 18.594+ },+ "cues": [+ [+ 0.143,+ "Five of nine sketches in a display use watercolors."+ ],+ [+ 4.427,+ "The exact share is five ninths."+ ],+ [+ 7.24,+ "Five divided by nine gives zero point five repeating."+ ],+ [+ 11.276,+ "Multiplying by one hundred gives fifty-five point five repeating percent."+ ],+ [+ 16.393,+ "If we need the nearest whole percent, write approximately fifty-six percent."+ ],+ [+ 21.302,+ "The exact blue strip stays five ninths full; a fifty-six-percent guide ends just a little farther right."+ ],+ [+ 28.854,+ "That difference is why we use an approximation sign."+ ],+ [+ 32.305,+ "Round at the end, after the conversion, and state the requested precision."+ ],+ [+ 36.901,+ "A rounded label is useful, but it does not change how many sketches were watercolors."+ ]+ ]+ },+ "wrap": {+ "dur": 36.48,+ "marks": {+ "w1": 1.719,+ "w2": 5.781,+ "w3": 12.617,+ "w4": 20.781+ },+ "cues": [+ [+ 0.169,+ "Four ideas to keep."+ ],+ [+ 1.719,+ "Percent means per hundred; identify the reference whole."+ ],+ [+ 5.781,+ "Write the percent number over one hundred to get its fraction form."+ ],+ [+ 9.896,+ "Simplify without changing the value."+ ],+ [+ 12.617,+ "Percent to decimal: divide by one hundred."+ ],+ [+ 15.638,+ "Decimal to percent: multiply by one hundred and include the sign."+ ],+ [+ 20.781,+ "For any fraction, divide the numerator by the denominator, then convert the decimal to percent."+ ],+ [+ 27.396,+ "Keep decimal percents exact unless rounding is requested."+ ],+ [+ 31.927,+ "Use an approximation sign when you round."+ ],+ [+ 34.622,+ "Three forms, one amount."+ ]+ ]+ },+ "final1": {+ "dur": 8.568,+ "marks": {},+ "cues": [+ [+ 0.104,+ "Chapter practice, set one."+ ],+ [+ 2.214,+ "Convert percents to fractions and decimals."+ ],+ [+ 5.925,+ "Give fractions in lowest terms."+ ]+ ]+ },+ "final2": {+ "dur": 8.352,+ "marks": {},+ "cues": [+ [+ 0.104,+ "Chapter practice, set two."+ ],+ [+ 2.279,+ "Convert fractions and decimals to percents."+ ],+ [+ 5.872,+ "Enter the number before the percent sign."+ ]+ ]+ },+ "final3": {+ "dur": 7.68,+ "marks": {},+ "cues": [+ [+ 0.104,+ "Chapter practice, set three."+ ],+ [+ 2.344,+ "Describe observed shares and the share left over."+ ],+ [+ 5.56,+ "Round only where the question asks."+ ]+ ]+ },+ "finish": {+ "dur": 9.624,+ "marks": {},+ "cues": [+ [+ 0.104,+ "Percent chapter complete."+ ],+ [+ 1.849,+ "Your first attempts are recorded here."+ ],+ [+ 3.906,+ "Replay a picture whenever you want to reconnect its fraction, decimal, and percent forms."+ ]+ ]+ }+};diff --git a/site/math-notebook/ch19/audio/en/tiny.mp3 b/site/math-notebook/ch19/audio/en/tiny.mp3new file mode 100644index 0000000..572141eBinary files /dev/null and b/site/math-notebook/ch19/audio/en/tiny.mp3 differdiff --git a/site/math-notebook/ch19/audio/en/wrap.mp3 b/site/math-notebook/ch19/audio/en/wrap.mp3new file mode 100644index 0000000..798346eBinary files /dev/null and b/site/math-notebook/ch19/audio/en/wrap.mp3 differdiff --git a/site/math-notebook/ch19/index.html b/site/math-notebook/ch19/index.htmlnew file mode 100644index 0000000..329450d--- /dev/null+++ b/site/math-notebook/ch19/index.html@@ -0,0 +1,62 @@+<!doctype html>+<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Percent — Elementary Mathematics</title><link rel="stylesheet" href="../lib/engine.css"><link rel="expect" href="#bar" blocking="render"><style>.band .prompt{font-size:27px}.screen .blanks .bline{gap:12px}.screen .blanks .box{width:8ch!important}.screen .blanks .why{font-size:21px}.screen .blanks .bline svg tspan{font-style:normal}</style></head><body>+<script src="../lib/engine.js"></script><script src="audio/en/timings.js"></script><script>+'use strict';+const CHAPTER={number:19,title:'Percent',minutes:13,language:'en'};+// Fixed-area bars from ch06; hundredth cells from ch08. Blue always marks selected amount.+const pcText=(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 pcMath=(p,s,x,y,t=0,size=52,col=COL.chalk)=>{const e=M(p,Array.isArray(s)?s:[s],{x,y,size,fill:col,anchor:'middle',o:0});show(e,t);return e;};+const pcTitle=(p,s,sub='')=>{pcText(p,s,100,110,.1,43);if(sub)pcText(p,sub,100,165,.15,27,COL.dim);};+function pcGrid(p,x,y,size,n,t=0,id='cell'){+ const g=G(p,{x,y,o:0}),cells=[];g.dataset.wholeArea=String(size*size);+ for(let i=0;i<100;i++){const e=mk('rect',{x:i%10*size/10,y:Math.floor(i/10)*size/10,width:size/10,height:size/10,fill:i<n?COL.whole:COL.faint,'fill-opacity':i<n?.55:.14,stroke:COL.chalk,'stroke-width':1.3},g);e.dataset.cellId=id+'-'+i;e.dataset.selected=String(i<n);cells.push(e);}+ show(g,t);return {g,cells,x,y,size};+}+function pcShade(model,n,t){model.cells.slice(0,n).forEach((e,i)=>tw(e,{'c_fill':COL.whole,'a_fill-opacity':.55},t+i*.025,.35));}+function pcBar(p,x,y,w,n,d=100,t=0,h=110){+ const g=G(p,{x,y,o:0});g.dataset.fraction=n+'/'+d;const shade=mk('rect',{width:w*n/d,height:h,fill:COL.whole,'fill-opacity':.55},g);shade.dataset.area=String(w*n/d*h);+ const outline=mk('rect',{width:w,height:h,fill:'none',stroke:COL.chalk,'stroke-width':3},g);const cuts=pcCuts({g,w,h},d,0,COL.dim);show(g,t);return {g,shade,outline,cuts,x,y,w,h,n,d};+}+function pcCuts(b,n,t,col=COL.task){const g=G(b.g,{o:0});g.dataset.parts=String(n);for(let i=1;i<n;i++){const e=path(g,`M${i*b.w/n} 0V${b.h}`,{stroke:col,'stroke-width':n>50?1:2});e.dataset.cut=String(i);e.dataset.position=String(i*b.w/n);}show(g,t,.8);return g;}+function pcGridChoices(p,ns){return ns.map((n,i)=>{const x=170+i*480,g=G(p);const model=pcGrid(g,x,295,250,Math.floor(n));if(n%1){const e=mk('rect',{x:Math.floor(n)%10*25,y:Math.floor(n/10)*25,width:25*(n%1),height:25,fill:COL.whole,'fill-opacity':.55},model.g);e.dataset.partialHundredth=String(n%1);}+ pcText(g,String.fromCharCode(65+i),x+125,255,0,33,COL.dim,'middle');pcText(g,n+' of 100 cells',x+125,610,0,31,COL.whole,'middle');g.dataset.percent=String(n);return {el:g,box:[x-20,230,290,410],label:n+' percent',model};});}+function pcMovePoint(p,from,start,to,x,y,t){const g=G(p),s=50;for(let i=0;i<from.length;i++)pcText(g,from[i],x+i*s,y,0,58);const dot=pcText(g,'.',x+start*s-15,y,0,48,COL.task);tw(dot,{x:x+to*s-15},t,2,io);return dot;}+const BEATS=[+['intro','Percent',(m,D)=>{const g=G(scene,{o:0,y:24});T(g,'Unit 2 · Ratios, Proportions, and Percents · Chapter 19',{x:800,y:220,size:28,fill:COL.dim,anchor:'middle'});T(g,'Percent',{x:800,y:380,size:94,weight:600,anchor:'middle'});pcMath(g,['37% = ',F('37','100'),' = 0.37'],800,525,.3,65,COL.whole);tw(g,{o:1,y:0},.2,1,out);pcText(g,'Three forms · one amount',800,715,m('sub'),40,COL.task,'middle');hide(g,D-.8,.7);}],+['hundred','Per hundred',m=>{const p=panel(0);pcTitle(p,'Percent means per hundred','One square = one whole · 100 equal cells');S.pcHundred=pcGrid(p,210,250,460,0,0,'garden');pcShade(S.pcHundred,37,m('shade'));pcMath(p,['37% = ',F('37','100')],1110,375,m('names'),60,COL.whole);pcMath(p,'= 0.37',1110,510,m('names',2),60);pcText(p,'100% = 1 0% = 0',1110,680,m('whole'),36,COL.task,'middle');pcText(p,'The whole sets the meaning of 100%.',800,825,m('whole',2),34,COL.dim,'middle');}],+['fraction','Simplify without changing area',m=>{const p=panel(0);pcTitle(p,'40% · forty of one hundred cells','The same forty original cells stay shaded.');S.pcForty=pcGrid(p,210,250,460,40,0,'forty');S.pcGroups=G(p,{o:0});for(let i=0;i<5;i++){const e=mk('rect',{x:210,y:250+i*92,width:460,height:92,fill:'none',stroke:COL.task,'stroke-width':4},S.pcGroups);e.dataset.groupCells='20';}show(S.pcGroups,m('groups'));pcMath(p,['40% = ',F('40','100')],1110,340,0,57,COL.whole);pcMath(p,[F('40 ÷ 20','100 ÷ 20'),' = ',F('2','5')],1110,515,m('simplify'),54);pcText(p,'Two of five equal groups',1110,650,m('simplify',2),32,COL.task,'middle');pcText(p,'Percent as fraction: number over 100, then simplify.',800,825,m('rule'),34,COL.dim,'middle');}],+['q1','Choose forty percent',()=>{const p=panel(0);pcTitle(p,'Each square is ONE whole','Same size · 100 equal cells in every square');S.pcChoices=pcGridChoices(p,[40,4,60]);},{ask:done=>quiz(BAND,[{id:'c-hundred',prompt:'Which picture shows 40% of one whole?',build:pickEls(S.pcChoices,0,'40% means forty of one hundred equal cells. Picture A fills four complete rows.',i=>i===1?'Four cells out of one hundred is 4%, not 40%. Forty needs four full rows.':'Sixty cells is 60%. For 40%, fill forty and leave sixty unfilled.')}],done)}],+['equivalent','Build an equivalent fraction',m=>{const p=panel(0);pcTitle(p,'Seven twentieths · same strip, smaller pieces');S.pcEquivalent=pcBar(p,220,290,1120,7,20);S.pcSubcuts=pcCuts(S.pcEquivalent,100,m('split'));pcText(p,'20 × 5 = 100 equal pieces',800,520,m('split',1),38,COL.task,'middle');pcMath(p,[F('7','20'),' = ',F('7 × 5','20 × 5'),' = ',F('35','100'),' = 35%'],800,680,m('result'),61,COL.whole);pcText(p,'Same blue area. Both fraction numbers get the same factor.',800,825,m('check'),32,COL.dim,'middle');}],+['divide','Any fraction can use division',m=>{const p=panel(0);pcTitle(p,'Three eighths is exactly 37.5%','One strip = 1 whole · the half-hundredth is real');S.pcEighth=pcBar(p,220,290,1120,3,8);pcMath(p,[F('3','8'),' = 3 ÷ 8 = 0.375'],800,550,m('decimal'),58);pcMath(p,'0.375 × 100 = 37.5%',800,685,m('percent'),60,COL.whole);pcCuts(S.pcEighth,100,m('cuts'));pcText(p,'37 complete hundredths + ½ of the next',800,825,m('cuts',1),35,COL.task,'middle');}],+['decimal','Percent to decimal',m=>{const p=panel(0);pcTitle(p,'68% battery · the same charge in decimal form');S.pcBattery=pcBar(p,220,275,1120,68);pcMath(p,['68% = ',F('68','100')],420,550,m('fraction'),55);pcMath(p,'68 ÷ 100 = 0.68',1130,550,m('divide'),55,COL.whole);S.pcLeftDot=pcMovePoint(p,'068',3,1,700,720,m('divide'));pcText(p,'÷ 100 · two places LEFT',1060,720,m('divide'),31,COL.task);pcText(p,'The amount stays 68 hundredths of ONE whole.',800,835,m('same'),33,COL.dim,'middle');}],+['q2','Choose six percent',()=>{const p=panel(0);pcTitle(p,'Match 0.06 of one whole','One square = 1 · a partial cell must have its true area');S.pcChoices=pcGridChoices(p,[6,60,.6]);},{ask:done=>quiz(BAND,[{id:'c-decimal',prompt:'Which picture equals the decimal 0.06?',build:pickEls(S.pcChoices,0,'0.06 is six hundredths, so it equals 6%. Six of the hundred cells are filled.',i=>i===1?'Sixty hundredths is 0.60, or 60%. That is ten times the asked share.':'0.6% is six tenths of ONE hundredth cell. Its decimal is 0.006, ten times smaller than 0.06.')}],done)}],+['back','Decimal to percent',m=>{const p=panel(0);pcTitle(p,'0.42 of one whole · forty-two hundredths');S.pcBack=pcBar(p,220,270,1120,42);pcMath(p,'0.42 × 100 = 42%',800,520,m('percent'),62,COL.whole);S.pcRightDot=pcMovePoint(p,'042',1,3,250,670,m('moves'));pcText(p,'× 100 · two places RIGHT',670,670,m('moves'),34,COL.task);pcText(p,'0.07 = 7% 1.2 = 120%',800,770,m('moves',3),40);pcText(p,'Decimal and percent are names for the same ratio.',800,845,m('meaning'),31,COL.dim,'middle');}],+['partial','A percent with a decimal point',m=>{const p=panel(0);pcTitle(p,'2.5% means two and a half hundredths','Top strip: one whole = 100%');S.pcSmall=pcBar(p,260,250,1000,0);tw(S.pcSmall.shade,{'a_width':25},m('fill'),1.5,io);const inset=G(p,{o:0});S.pcInset=pcBar(inset,260,505,600,2.5,3,0,135);show(inset,m('zoom'));pcText(p,'ENLARGED: first three 1% cells',560,475,m('zoom'),28,COL.task,'middle');pcText(p,'Each inset cell = 1% of the whole',560,700,m('zoom',1),29,COL.dim,'middle');pcMath(p,'2.5% = 0.025',1160,550,m('convert'),47,COL.whole);pcMath(p,[F('2.5','100'),' = ',F('25','1000'),' = ',F('1','40')],1160,700,m('convert',2),49);pcText(p,'Divide by 100 even when the percent has a decimal point.',800,835,m('convert',4),32,COL.dim,'middle');}],+['tiny','A tiny percent',m=>{const p=panel(0);pcTitle(p,'0.004% · keep the leading zeros');pcMath(p,'0.004% = 0.004 ÷ 100 = 0.00004',800,300,m('convert'),58,COL.whole);const g=G(p,{o:0});path(g,'M260 555H1260',{stroke:COL.chalk,'stroke-width':3});for(let i=0;i<=5;i++){path(g,`M${260+i*200} 540V570`,{stroke:COL.dim,'stroke-width':2});T(g,(i*.002).toFixed(3)+'%',{x:260+i*200,y:620,size:26,anchor:'middle'});}S.pcTinyDot=mk('circle',{cx:660,cy:555,r:13,fill:COL.whole},g);S.pcTinyDot.dataset.percent='.004';T(g,'0.004%',{x:660,y:505,size:34,fill:COL.whole,anchor:'middle'});show(g,m('scale'));pcText(p,'MAGNIFIED SCALE: 0% to 0.01% only',800,430,m('scale'),32,COL.task,'middle');pcMath(p,['0.00004 = ',F('1','25000')],800,735,m('fraction'),54);pcText(p,'Below 1% means below 0.01 of a whole.',800,835,m('fraction',2),34,COL.dim,'middle');}],+['beyond','More than one hundred percent',m=>{const p=panel(0);pcTitle(p,'160% · one whole plus sixty hundredths','Every full strip is the same reference whole.');S.pcFull=pcBar(p,150,280,600,100);S.pcExtra=pcBar(p,850,280,600,60,100,m('extra'));pcText(p,'100%',450,450,0,40,COL.whole,'middle');pcText(p,'60%',1150,450,m('extra'),40,COL.whole,'middle');pcMath(p,['160% = ',F('160','100'),' = ',F('8','5'),' = 1.6'],800,620,m('names'),62);pcText(p,'1.6 kilometers is 160% of a 1-kilometer reference.',800,770,m('context'),33,COL.task,'middle');pcText(p,'100% identifies the reference whole; it is not always a maximum.',800,840,m('context',2),30,COL.dim,'middle');}],+['q3','Choose one hundred sixty percent',()=>{const p=panel(0);pcTitle(p,'Reference: one full strip = 100%','All strips use the same length scale.');pcBar(p,620,205,180,100,100,0,90);S.pcChoices=[160,16,60].map((n,i)=>{const x=120+i*480,g=G(p);pcBar(g,x,400,180,Math.min(n,100),100,0,90);if(n>100)pcBar(g,x+200,400,180,n-100,100,0,90);pcText(g,String.fromCharCode(65+i),x+170,355,0,32,COL.dim,'middle');pcText(g,n/100+' wholes',x+170,590,0,33,COL.whole,'middle');g.dataset.percent=String(n);return {el:g,box:[x-20,310,410,330],label:n+' percent'};});},{ask:done=>quiz(BAND,[{id:'c-beyond',prompt:'Which picture represents 160% of the reference whole?',build:pickEls(S.pcChoices,0,'160% is 1.6 wholes: one complete strip plus sixty hundredths of another equal strip.',i=>i===1?'0.16 of a whole is 16%. Divide 160 by 100 to get 1.6, not 0.16.':'0.6 of a whole is only 60%. Include the complete first whole as well.')}],done)}],+['context','Observed shares',m=>{const p=panel(0);pcTitle(p,'9 of 12 seeds sprouted','One strip = all 12 seeds · blue = sprouted');S.pcSeeds=pcBar(p,200,280,1200,9,12);pcCuts(S.pcSeeds,4,m('groups'));pcMath(p,[F('9','12'),' = ',F('3','4'),' = ',F('75','100'),' = 75%'],800,565,m('hundred'),61,COL.whole);pcCuts(S.pcSeeds,100,m('hundred'));pcMath(p,[F('3','12'),' = ',F('1','4'),' = 25%'],800,710,m('rest'),53);pcText(p,'Sprouted 75% + not sprouted 25% = 100%',800,830,m('rest',2),37,COL.task,'middle');}],+['rounding','Rounding a percent',m=>{const p=panel(0);pcTitle(p,'5 of 9 sketches use watercolors','Exact share: five ninths · round only the final percent');S.pcRound=pcBar(p,220,255,900,5,9);pcMath(p,[F('5','9'),' = 0.',OV('5')],1290,310,m('decimal'),55);pcMath(p,['0.',OV('5'),' × 100 = 55.',OV('5'),'%'],800,550,m('percent'),56);const guide=G(p,{o:0});path(guide,'M724 240V390',{stroke:COL.task,'stroke-width':3});T(guide,'56% guide',{x:900,y:425,size:30,fill:COL.task,anchor:'middle'});path(guide,'M900 395L724 375',{stroke:COL.task,'stroke-width':2});show(guide,m('round'));S.pcRoundGuide=guide;pcMath(p,'≈ 56% (nearest whole percent)',800,710,m('round'),53,COL.task);pcText(p,'Exact blue endpoint: 55.555…% · rounded guide: 56%',800,835,m('round',2),32,COL.dim,'middle');}],+['wrap','Four percent connections',m=>{const p=panel(0);pcTitle(p,'Three forms · one amount');[['Percent means per hundred. First identify ONE whole.','w1'],['Percent as a fraction: number over 100; simplify.','w2'],['Percent ÷ 100 = decimal. Decimal × 100 = percent number.','w3'],['Fraction: divide top by bottom. Round only when asked.','w4']].forEach(([s,key],i)=>{const g=G(p,{x:-16,y:285+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:31});tw(g,{x:0,o:1},m(key),.6);});}],+['final1','Chapter practice',()=>panel(0),{ask:done=>quiz(SCREEN,[{id:'p-from',prompt:'Convert. Fractions must be in lowest terms; decimals exact.',build:blanks([+{parts:['32% = ',{box:'8/25',lowest:true},' (fraction)'],why:'32/100 simplifies by dividing numerator and denominator by 4: 8/25.'},+{parts:['180% = ',{box:'9/5',lowest:true},' (fraction)'],why:'180/100 = 9/5 = 1 4/5. Values above 100% are greater than one whole.'},+{parts:['7.2% = ',{box:'0.072'},' (decimal)'],why:'7.2 ÷ 100 = 0.072. The decimal point moves two places left.'},+{parts:['0.006% = ',{box:'0.00006'},' (decimal)'],why:'0.006 ÷ 100 = 0.00006. Keep the leading zeros.'}+])}],done,'Chapter practice 1 of 3')}],+['final2','Chapter practice',()=>panel(0),{ask:done=>quiz(SCREEN,[{id:'p-to',prompt:'Write each as a percent. Type the number before the printed % sign.',build:blanks([+{parts:[F('7','20'),' = ',{box:'35'},'%'],why:'7/20 = 35/100 = 35%.'},+{parts:[F('7','16'),' = ',{box:'43.75'},'%'],why:'7 ÷ 16 = 0.4375; multiply by 100 to get 43.75%.'},+{parts:['0.009 = ',{box:'0.9'},'%'],why:'0.009 × 100 = 0.9, so the percent is 0.9%.'},+{parts:['1.35 = ',{box:'135'},'%'],why:'1.35 × 100 = 135, so it is 135% of the reference whole.'}+])}],done,'Chapter practice 2 of 3')}],+['final3','Chapter practice',()=>panel(0),{ask:done=>quiz(SCREEN,[{id:'p-shares',prompt:'Describe each share. Only the vote question asks for rounding.',build:blanks([+{parts:['12 of 15 puzzles solved: ',{box:'80'},'% solved'],why:'12/15 = 4/5 = 0.8 = 80%.'},+{parts:['14 of 20 tiles blue: ',{box:'30'},'% NOT blue'],why:'20 − 14 = 6 tiles are not blue; 6/20 = 0.3 = 30%.'},+{parts:['4 of 7 votes: ≈ ',{box:'57'},'% (nearest whole percent)'],why:'4/7 × 100 = 57.142857…; nearest whole percent is approximately 57%.'},+{parts:['1.5% = ',{box:'3/200',lowest:true},' of a whole (lowest terms)'],why:'1.5/100 = 15/1000 = 3/200. A decimal percent is still per hundred.'}+])}],done,'Chapter practice 3 of 3')}],+['finish','Finished',()=>panel(0),{ask:finishCard}]+].map(([id,title,run,extra])=>({id,title,run,...extra}));+boot();+</script></body></html>diff --git a/site/math-notebook/index.html b/site/math-notebook/index.htmlindex d4b956f..470969a 100644--- a/site/math-notebook/index.html+++ b/site/math-notebook/index.html@@ -230,7 +230,7 @@ main#contents { padding-bottom: 80px; }// Chapters are numbered in order through the units. Add a chapter here when its lesson is ready.const UNITS = [ // [unit title, [[chapter title, minutes], ...]]; chapters are numbered in order. Add a chapter when its lesson is ready.['The Number System', [['Types of Numbers and the Number Line', 9], ['Positive and Negative Numbers', 8], ['Absolute Value', 9], ['Factors and Greatest Common Factor', 11], ['Multiples and Least Common Multiple', 10], ['Fraction Basics: Types of Fractions and Adding and Subtracting Fractions', 13], ['Multiplying and Dividing Fractions', 12], ['Adding and Subtracting Decimals', 11], ['Multiplying Decimals', 12], ['Dividing Decimals', 10], ['Adding Positive and Negative Numbers', 12], ['Subtracting Positive and Negative Numbers', 13], ['Multiplying and Dividing Positive and Negative Numbers', 14], ['Inequalities', 10]]],- ['Ratios, Proportions, and Percents', [['Ratios', 9], ['Unit Rate and Unit Price', 10], ['Proportions', 12], ['Converting Measurements', 13]]],+ ['Ratios, Proportions, and Percents', [['Ratios', 9], ['Unit Rate and Unit Price', 10], ['Proportions', 12], ['Converting Measurements', 13], ['Percent', 13]]],];const HUES = ['#f4a48c', '#86c9e8', '#f3c95c', '#e8a0c8', '#8fd6b0', '#bba8ee', '#f0b45a'];const id = n => 'ch' + String(n).padStart(2, '0');