File: /home/mmtprep/public_html/mathzen.mmtprep.com/assets/5C12-2-XdiHShGS.js
import{E as x,aj as p,r as u,al as l,w as e,l as v,m as a}from"./index-hc8lvKav.js";const w="Using distributiveness for numerical calculation",g="26/11/2022",M="41f23",y="5C12-2";class E extends x{constructor(){super(),this.nbQuestions=6,this.nbQuestionsModifiable=!0,this.nbCols=1,this.nbColsCorr=1,this.pasDeVersionLatex=!1,this.pas_de_version_HMTL=!1,this.consigne="Calculate the following expressions in two different ways."}nouvelleVersion(){this.listeQuestions=[],this.listeCorrections=[];const c=p([1,2,3,4,5,6],this.nbQuestions);function d(t,s,i,r,o,$){let n="bug";return o==="factorized"&&(n=`
$\\textbf{Method 1: with priorities.}$<br>
$${l(t+1)}=${s}\\times (${e(i)} ${$===1?`+ ${e(r)}`:`- ${e(r)}`})$<br>
$${l(t+1)}=${s}\\times ${$===1?e(i+r):e(i-r)}$<br>
$${l(t+1)}=${$===1?e(s*(i+r)):e(s*(i-r))}$<br>
`,n+=`<br>$\\textbf{Method 2: distributing first.}$<br>
$${l(t+1)}=${a(s)}\\times (${e(i)} ${$===1?`+ ${e(r)}`:`- ${e(r)}`})$<br>
$${l(t+1)}=${a(s)}\\times ${e(i)} ${$===1?"+":"-"} ${a(s)}\\times ${r}$<br>
$${l(t+1)}=${e(s*i)} ${$===1?"+":"-"} ${e(s*r)}$<br>
$${l(t+1)}=${$===1?e(s*i+s*r):e(s*i-s*r)}$<br>
`),o==="developed"&&(n=`
$\\textbf{Method 1: with priorities.}$<br>
$${l(t+1)}=${s}\\times ${e(i)} ${$===1?"+":"-"} ${s}\\times ${e(r)}$<br>
$${l(t+1)}=${e(s*i)} ${$===1?"+":"-"} ${e(s*r)}$<br>
$${l(t+1)}=${$===1?e(s*i+s*r):e(s*i-s*r)}$<br>
`,n+=`<br>$\\textbf{Method 2: Factoring first.}$<br>$${l(t+1)}=${a(s)}\\times ${e(i)} ${$===1?"+":"-"} ${a(s)}\\times ${e(r)}$<br>$${l(t+1)}=${a(s)}\\times (${e(i)} ${$===1?`+ ${e(r)} `:`- ${e(r)}`})$<br>$${l(t+1)}=${a(s)}\\times ${$===1?e(i+r):e(i-r)}$<br>$${l(t+1)}=${$===1?e(s*(i+r)):e(s*(i-r))}$<br>`),n}for(let t=0,s,i,r=0;t<this.nbQuestions&&r<50;){s="",i="";let o=u(2,9),$=u(1,9,[o]),n=u(1,9,[o,$]),b;$<n&&(b=$,$=n,n=b);const f=[100,1e3],h=u(1,9);switch(s="",i="",c[t]){case 1:s+=`$${l(t+1)}=${o}\\times (${e($)} + ${e(n)})$`,i+=d(t,o,$,n,"factorized",1);break;case 2:s+=`$${l(t+1)}=${o}\\times ${e($)} + ${o}\\times ${e(n)}$`,i+=d(t,o,$,n,"developed",1);break;case 3:s+=`$${l(t+1)}=${o}\\times (${e($)} - ${e(n)})$`,i+=d(t,o,$,n,"factorized",-1);break;case 4:s+=`$${l(t+1)}=${o}\\times ${e($)} - ${o}\\times ${e(n)}$`,i+=d(t,o,$,n,"developed",-1);break;case 5:{o=u(47,83);const m=u(0,1);n=h,$=f[m]-n,s+=`$${l(t+1)}=${o}\\times ${e($)} + ${o}\\times ${n}$`,i+=d(t,o,$,n,"developed",1);break}case 6:{o=u(47,83);const m=u(0,1);n=h,$=f[m]+n,s+=`$${l(t+1)}=${o}\\times ${e($)} - ${o}\\times ${n}$`,i+=d(t,o,$,n,"developed",-1);break}}this.listeQuestions.indexOf(s)===-1&&(this.listeQuestions.push(s),this.listeCorrections.push(i),t++),r++}v(this)}}export{g as dateDePublication,E as default,y as ref,w as titre,M as uuid};
//# sourceMappingURL=5C12-2-XdiHShGS.js.map