File: /home/mmtprep/public_html/mathzen.mmtprep.com/assets/4P10-1-thtFPBag.js
import{c as R}from"./courbes-oSx9bP9E.js";import{E as G,c as J,aN as W,h as o,r as H,cg as C,o as D,q as s,ax as i,C as x,b4 as r,aq as M,l as V}from"./index-ajJ0B2-K.js";import{r as j}from"./reperes-w_D-727i.js";import{b as P}from"./Personne-zmVSe1SX.js";import{t as a,b as X}from"./style-YtQgMMZt.js";const z="Solve a proportionality problem using a graph",se="c668a",re="4P10-1";function ae(){G.call(this),this.debug=!1,this.debug?this.nbQuestions=2:this.nbQuestions=1,this.titre=z,this.consigne="",this.spacingCorr=2,this.nbCols=1,this.nbColsCorr=1,J.isHtml?this.spacing=2:this.spacing=1;let g;this.nouvelleVersion=function(){this.debug?g=[1]:g=[1],this.listeQuestions=[],this.listeCorrections=[];const Y=W(g,this.nbQuestions);for(let m=0,n,d,S=0;m<this.nbQuestions&&S<50;){const A=o([1.2,1.4,1.6,1.8]),O=o([.6,.8,1.2]),k=[{lieu:"the grocery store",prenom:P(),articles:"oranges",art_articles:"oranges",prix_unitaire:A,qte:"weight",qte_max:10,qte2:3,unite:"kg of",legendeX:"weight in kg",legendeY:"price in €",fig:{},figureCorr:{}},{lieu:"the bakery",prenom:P(),articles:"chopsticks",art_articles:"of chopsticks",prix_unitaire:O,qte:"number",qte_max:10,qte2:3,unite:"",legendeX:"quantity",legendeY:"price in €",fig:{},figureCorr:{}}],e=k[H(0,k.length-1)];let b;const l=1,t=o([1,2,5]);let q;t===1?q=o([.5,.2,.25]):q=o([.5,.2,.25]);const _=[b=j({xMin:0,yMin:0,yMax:C(t,(e.qte_max+1)*e.prix_unitaire+t),xMax:e.qte_max+1,xUnite:1,yUnite:1/t,yThickDistance:t,xLegende:e.legendeX,yLegende:e.legendeY,grille:!0,grilleOpacite:.5,grilleXDistance:1,grilleYDistance:t,grilleXMin:0,grilleYMin:0,grilleSecondaire:!0,grilleSecondaireXDistance:.2,grilleSecondaireYDistance:t/5,grilleSecondaireXMin:0,grilleSecondaireYMin:0,grilleSecondaireXMax:e.qte_max+1,grilleSecondaireYMax:C(t,(e.qte_max+1)*e.prix_unitaire+t),yLegendePosition:[0,C(t,(e.qte_max+1)*e.prix_unitaire+t)/t+.5],xLegendePosition:[e.qte_max+1+.2,0]})],L=N=>e.prix_unitaire*N;_.push(b,R(L,{repere:b,xMin:0,xMax:e.qte_max+1,color:"black",epaisseur:1.5}));const T=D({xmin:-l,ymin:-1,xmax:e.qte_max/l+3,ymax:((e.qte_max+1)*e.prix_unitaire+t)/t+2,pixelsParCm:30},_);e.fig=T;const E=_,U=s(e.qte_max,0),Q=s(e.qte_max,i(e.qte_max*e.prix_unitaire/t)),c=x(U,Q,"red");c.epaisseur=2,c.pointilles=5,c.styleExtremites="->";const v=s(0,i(e.qte_max*e.prix_unitaire/t)),u=x(Q,v,"red");u.epaisseur=2,u.pointilles=5,u.styleExtremites="->";const B=s(e.qte2,0),w=s(e.qte2,i(e.qte2*e.prix_unitaire/t)),p=x(B,w,"blue");p.epaisseur=2,p.pointilles=5,p.styleExtremites="->";const F=s(0,i(e.qte2*e.prix_unitaire/t)),$=x(w,F,"blue");$.epaisseur=2,$.pointilles=5,$.styleExtremites="->",E.push(c,u,p,$);const I=D({xmin:-l,ymin:-1,xmax:e.qte_max/l+3,ymax:(e.qte_max*e.prix_unitaire+4)/t+1,pixelsParCm:30},E);e.figureCorr=I;let f=0,y=0;const h=[];switch(h.push({enonce:`At ${e.lieu}, ${e.prenom} uses the chart below to indicate the price of its ${e.articles}s as a function of ${e.qte} ${e.art_articles}.<br>${e.fig}<br>${r(f++)} Justify that this is a proportionality situation using the chart.<br> ${r(f++)} What is the price of $${e.qte_max}$ ${e.unite} ${e.articles}?<br> ${r(f++)} What is the price of $${e.qte2}$ ${e.unite} ${e.articles}?`,correction:`${r(y++)} This graph is a straight line which passes through the origin.<br> ${M("It is therefore indeed the graph of a situation of proportionality.")}<br> ${r(y++)} By reading graphically, using the red dotted lines of the graph below, ${M(`${e.qte_max} ${e.unite} ${e.articles} cost $\\$$${a(i(e.qte_max*e.prix_unitaire))}.`)}<br> ${e.figureCorr} <br> ${r(y++)} For $${e.qte2}$ ${e.unite} ${e.articles}, the graphical reading is less easy, we will detail two methods.<br><br> ${X("First method by graphic reading:")}<br> It is necessary to take into account that each small square represents $\\$${a(q*t)}$ and use the blue dotted lines.<br><br> ${X("Second method by calculating a fourth proportional:")}<br> $${e.qte_max}$ ${e.unite} ${e.articles} costs $\\$${a(i(e.qte_max*e.prix_unitaire))}$ so $${e.qte2}$ ${e.unite} ${e.articles} costs: <br> $(\\$${a(i(e.qte_max*e.prix_unitaire))}$ $\\div ${e.qte_max}$ ${e.articles} $)\\times (${e.qte2}$ ${e.articles}) $= \\$${a(i(e.qte2*e.prix_unitaire))}$ <br><br>${M(`Regardless of the method used, ${e.qte2} ${e.unite} ${e.articles} costs $\\$$${a(i(e.qte2*e.prix_unitaire)).replace("{.}",".")}.`)}`}),Y[m]){case 1:n=`${h[0].enonce}`,this.debug?(n+="<br>",n+=`<br> =====CORRECTION======<br>${h[0].correction}`,d=""):d=`${h[0].correction}`;break}this.listeQuestions.indexOf(n)===-1&&(this.listeQuestions.push(n),this.listeCorrections.push(d),m++),S++}V(this)}}export{ae as default,re as ref,z as titre,se as uuid};
//# sourceMappingURL=4P10-1-thtFPBag.js.map