File: /home/mmtprep/public_html/mathzen.mmtprep.com/assets/_Exercice_conversions-BQusS6Dj.js
import{E as H,b6 as Q,aj as A,r as n,h as x,W as $,c as m,ax as L,w as s,a as w,cx as C,s as _,l as D,T as F}from"./index-hc8lvKav.js";import{d as N}from"./deprecatedFractions-crf_vsDW.js";import{t}from"./texTexte-OFaJDKFQ.js";const j=!0,B="mathLive",I=!0,P="AMCNum",U="17/09/2022";function W(T=1){H.call(this),this.sup=T,this.sup2=!1,this.titre="Convert lengths, masses, capacity, prices or computer units",this.consigne="Complete :",this.spacing=2,this.correction_avec_des_fractions=!1,this.nouvelleVersion=function(){this.listeQuestions=[],this.listeCorrections=[];const g=[],M=[["da",10],["h",100],["k",1e3]],f=[["d",10],["c",100],["m",1e3]];let c=[];c[0]=this.sup,Q(c,5)>0&&(c=F(1,4)),c=A(c,this.nbQuestions);const k=A([!0,!1],this.nbQuestions);for(let o=0,i,a,h,r,e,l,b,p,y=0;o<this.nbQuestions&&y<50;){switch(a=n(0,2),c[o]){case 1:h=!1;break;case 2:h=!0;break;case 3:h=k[o];break;case 4:p=["bytes","ko","MB","Go","To"];break}if(this.sup2?i=x([$(n(1,19)+n(1,9)/10,1),$(n(1,9)/10,1),$(n(1,9)/100,2),$(n(1,9)+n(1,9)/10+n(1,9)/100,2)]):i=x([n(1,9),n(1,9)*10,n(1,9)*100,n(1,9)*10+n(1,9)]),!h&&c[o]<4)a<2?e=x(["m","L","g"]):a===2?m.isHtml?e=x(["m","L","g"]):e=x(["m","L","g","€"]):e="o",r=L(i*M[a][1]),l="$"+s(i)+t(M[a][0]+e)+" = "+(this.interactif&&m.isHtml?`$${w(this,o,"width25 inline",{texteApres:"$"+t(e)+"$"})}`:`\\dotfill ${t(e)}$`),b="$"+s(i)+t(M[a][0]+e)+" = "+s(i)+"\\times"+s(M[a][1])+t(e)+" = "+s(r)+t(e)+"$";else if(h&&c[o]<4&&this.correction_avec_des_fractions)e=x(["m","L","g"]),r=$(i/f[a][1],12),l="$"+s(i)+t(f[a][0]+e)+" = "+(this.interactif&&m.isHtml?`$${w(this,o,"width25 inline",{texteApres:" $"+t(e)+"$"})}`:` \\dotfill ${t(e)}$`),b="$"+s(i)+t(f[a][0]+e)+" = "+N(s(i),s(f[a][1]))+t(e)+" = "+C(r)+t(e)+"$";else if(h&&c[o]<4)e=x(["m","L","g"]),r=$(i/f[a][1],12),l="$"+s(i)+t(f[a][0]+e)+" = "+(this.interactif&&m.isHtml?`$${w(this,o,"width25 inline",{texteApres:" $"+t(e)+"$"})}`:` \\dotfill ${t(e)}$`),b="$"+s(i)+t(f[a][0]+e)+" = "+s(i)+"\\div"+s(f[a][1])+t(e)+" = "+C(r)+t(e)+"$";else{h=this.sup2?k[o]:!1;let d,u;h?(d=n(1,4),u=n(0,d-1)):(u=n(1,4),d=n(0,u-1));const v=u-d;d===0&&i%1!==0&&(i=n(3,100)),h?(i=$(i*Math.pow(10,n(-3*v-1,-3*v+1)),12),r=$(i/Math.pow(10,-3*v),12),e=p[d],l="$"+s(i)+t(p[u])+" = "+(this.interactif&&m.isHtml?`$${w(this,o,"width25 inline",{texteApres:" $"+t(e)+"$"})}`:`\\dotfill ${t(e)}$`),b="$"+s(i)+t(p[u])+" = "+s(i)+"\\div"+s(Math.pow(10,-3*v))+t(e)+" = "+C(r)+t(e)+"$"):(r=L(i*Math.pow(10,3*v)),e=p[d],l="$"+s(i)+t(p[u])+" = "+(this.interactif&&m.isHtml?`$${w(this,o,"width25 inline",{texteApres:" $"+t(e)+"$"})}`:` \\dotfill ${t(e)}$`),b="$"+s(i)+t(p[u])+" = "+s(i)+"\\times"+s(Math.pow(10,3*v))+t(e)+" = "+s(r)+t(e)+"$")}g.indexOf(r)===-1&&(_(this,o,r),g[o]=r,m.vue==="slide"&&(l=l.replace("= \\dotfill","\\text{ en }")),m.isHtml&&(l=l.replace("\\dotfill",".................................................")),this.listeQuestions.push(l),this.listeCorrections.push(b),o++),y++}D(this)},this.besoinFormulaireNumerique=["Difficulty level",5,`1: From da, h, k to the reference unit
2: From d, c, m to the reference unit
3: Multiplications or divisions to the reference unit
4: Conversions with bytes
5 : Blend`],this.besoinFormulaire2CaseACocher=["With decimal numbers"]}export{I as amcReady,P as amcType,U as dateDeModifImportante,W as default,j as interactifReady,B as interactifType};
//# sourceMappingURL=_Exercice_conversions-BQusS6Dj.js.map