File: /home/mmtprep/public_html/mathzen.mmtprep.com/assets/c3I11-4eXIJvsl.js
import{E as z,bE as K,c as s,h as P,r as w,R as V,u as M,q as E,b2 as k,U as x,o as _,aL as A,jV as I,s as X,l as Z}from"./index-XCg2QAX4.js";import{b as Q,c as ee}from"./modales-zNa05bdf.js";import{s as H}from"./scratchblock-zyPlfrki.js";import{p as te,n as ie}from"./noteLaCouleur-ZihiFghT.js";import{c as se,a as j,o as re,b as ae,d as U,e as oe,f as le}from"./2dLutin-EKEss6VU.js";const ne="Note the color (scratch)",me=!0,fe="listeDeroulante",be="27/12/2023",ge="11/04/2021",We="e380b",ke="c3I11";function xe(){z.call(this),this.titre=ne,this.nbQuestions=1,this.nbQuestionsModifiable=!0,this.nbCols=1,this.nbColsCorr=1,this.pasDeVersionLatex=!1,this.pas_de_version_HMTL=!1,this.typeExercice="Scratch",this.listePackages="scratch3",this.sup=1,this.sup2=!0,this.sup3=4,this.sup4=!0,this.relatif=!1,this.correctionDetailleeDisponible=!0,this.correctionDetaillee=!0,this.nouvelleVersion=function(B){const J=[["White","White","White","White","White","White","White","White","White","White"],["White","Black","Orange","Red","Orange","YELLOW","Red","YELLOW","Pink","White"],["White","Pink","Gray","Black","Blue","Green","Blue","Red","Orange","White"],["White","Black","Red","Pink","Green","Orange","Pink","Black","Orange","White"],["White","Orange","Gray","Red","YELLOW","Black","Green","Red","Pink","White"],["White","Blue","YELLOW","Orange","Green","Gray","YELLOW","Gray","Orange","White"],["White","Pink","Blue","YELLOW","Pink","Orange","Red","Blue","Black","White"],["White","White","White","White","White","White","White","White","White","White"]],q=[["White","Black","Red","Blue","Orange","Pink","YELLOW","Green","Gray"],["(0) White","(1) Black","(2) Red","(3) Blue","(4) Orange","(5) Pink","(6) Yellow","(7) Green","(8) Gray"]];this.sup=K(1,4,this.sup,1);const c=.75;this.listeQuestions=[],this.listeCorrections=[];let G,O,a=[],d=[];const T={xmin:-1,ymin:-1,xmax:16,ymax:13,pixelsParCm:30,scale:c};let $;const R=[];let p,o,Y,C,h,S,t,L,m,l,n;s.unitesLutinParCm=13.33,s.pixelsParCm=30;let i;const y=te({type:this.sup,melange:!this.sup4,scale:c,relatif:this.relatif,nx:10,ny:8,pas:20,plateau:J});for(let u=0;u<this.nbQuestions;){d=[],a=[],a.push(y.plateau2d),d.push(y.plateau2d);let f=[],r="",b="",F=0,N,g;$=[["AV20","AV40","AV60","AV80","AV100"],["TD90","TG90","TG180"]];for(let e=0,W;e<5;e++)for(let D=0,v;D<3;D++)W=$[0][e],v=$[1][D],R.push([W,v,"NLC"],[v,W,"NLC"]);for(N=!0;N&&(a.length=1,t=se(),m=P([90,0,-90,180]),l=10+w(1,8)*20,n=10+w(1,6)*20,i=ie({x:l,y:n,orientation:m,plateau:y.plateauNLC,relatif:this.relatif,nx:10,ny:8,pas:20}),t.color=s.isHtml?V("green"):V("black"),t.epaisseur=2,t.pointilles=2,j(l,n,t),re(le(m),t),L=ae(t),U(L),j(l,n,L),a.push(L),U(t),F++,!(F>5));)for(i.codeScratch="",h=[],Y=parseInt(this.sup3),S=[],G=0,g=0,i.codeScratch=`\\begin{scratch}[print,fill,blocks,scale=0.7]
\\blockinit{when \\greenflag is clicked}
`,i.codeScratch+=`\\blockmove{go to x: \\ovalnum{${l}} y: \\ovalnum{${n}}}
\\blockmove{move to \\ovalnum{${m}}}
`,i.currentIndex+=i.codeScratch.length;Y>G&&g<10;){for(g=0,p=P(R),O=i.testSequence(p);!O[0]&&g<10;)g++,p=P(R),O=i.testSequence(p);if(g<10){N=!1;for(let e=0;e<p.length;e++)C=p[e],o=i.testInstruction(C,t),C==="NLC"?(S.push(C),h.push(i.nlc()),G++,i.codeScratch+=o[4]+`
ot`,i.currentIndex+=o[4].length+1,t=o[5],oe(5,t)):(S.push(C),i.currentPos.x=o[1],i.currentPos.y=o[2],i.currentOrientation=o[3],i.codeScratch+=o[4]+`
ot`,i.currentIndex+=o[4].length+1,t=o[5])}else m=P([90,0,-90,180]),l=10+w(1,8)*20,n=10+w(1,6)*20}if(this.sup2){a.push(M(E(l*.075,n*.075)));for(let e=1;e<10;e++)e!==1&&a.push(k(x(20*e),1.5*e,-.3,"medium","black",1.2,"middle",!0,c));for(let e=1;e<12;e++)e!==1&&a.push(k(x(20*e),-.5,1.5*e,"medium","black",1.2,"middle",!0,c))}i.codeScratch+="\\end{scratch}",s.isHtml?(r=`This exercise is taken from the excellent unplugged ${Q(B,"https://www.monclasseurdemaths.fr/profs/algorithmique-scratch/note-la-couleur/","Note the color","info circle")} activity by Jean-Yves Labouche.<br>`,r+="It was designed to extend the possibilities of the sheets offered.<br>",r+=`Do not hesitate to visit Jean-Yves' ${Q(B+1,"https://www.monclasseurdemaths.fr","My Maths.fr workbook","info circle")} website to discover the multitude of resources he offers.<br>`,r+=`To play, look at the rules of the game${ee(B+2,"../../pdf/rulesnlc.pdf","Rules of the game","Rules - PDF","pdf file")}.<br>`):r="",r+="Run the program and find the color sequence.<br><br>",s.isHtml?r+="<table><tr><td>"+H(i.codeScratch)+`</td><td>${this.sup===4||this.sup===2?"Number-color correspondence: <br>0=White; 1=Black; 2=Red; 3=Blue; 4=Orange; 5=Pink; 6=Yellow; 7=Green; 8=Gray<br>":""}`+_(T,objectsStatement)+"</td></tr></table>":(text+=`\\begin{minipage}{.3 \\linewidth}
${H(i.codeScratch)} n \\end{minipage}\\begin{minipage}{.7 \\linewidth}
${this.sup===4||this.sup===2?`Number-color correspondence: \\\\
0=White, 1=Black, 2=Red, 3=Blue, 4=Orange, 5=Pink, 6=Yellow, 7=Green, 8=Gray\\\\ not`:""} ${_(T,a)}
\\end{minipage}`,u<this.nbQuestions-1&&!s.isHtml&&(r+=`
\\newpage`)),f=h,this.sup%2===0&&(f[0]="("+y.traducNum(h[0])+")"+h[0]),b="We obtain the following series of colors:<br>",b+=`${A(f[0])}`,r+=this.interactif?"Color n°1:"+I(this,u,0,q[(this.sup-1)%2],"a color")+"<br>":"";for(let e=1;e<h.length;e++)this.sup%2===0&&(f[e]="("+y.traducNum(h[e])+")"+h[e]),b+=`${A(f[e])}`,r+=this.interactif?"Color no."+(e+1)+" :"+I(this,u,e,q[(this.sup-1)%2],"a color")+"<br>":"";X(this,u,[f]),t.animation=`<radialGradient id="Ball" cx="8" cy="-3" r="20" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#FFFF99"/><stop offset="1" style="stop-color:#FF9400"/></radialGradient> <circle fill="url(#Ball)" r="12" stroke-width="1"x="${t.listeTraces[0][0]*s.pixelsParCm}"y ="${-t.listeTraces[0][1]*s.pixelsParCm}">
<animateMotion path="M ${t.listeTraces[0][0]*s.pixelsParCm} ${-t.listeTraces[0][1]*s.pixelsParCm} L`;for(let e=0;e<t.listeTraces.length;e++){const W=E(t.listeTraces[e][2],t.listeTraces[e][3]);t.animation+=` ${W.xSVG(s.pixelsParCm)} ${W.ySVG(s.pixelsParCm)}`}if(t.animation+='" begin="10s" dur="10s" repeatCount="indefinite" />; </circle>',d.push(M(E(l*.075,n*.075))),this.sup2){for(let e=1;e<10;e++)e!==1&&a.push(k(x(20*e),1.5*e,-.3,"medium","black",1.2,"middle",!0,c));for(let e=1;e<12;e++)e!==1&&a.push(k(x(20*e),-.5,1.5*e,"medium","black",1.2,"middle",!0,c))}if(this.correctionDetaillee){for(let e=1;e<10;e++)e!==1&&d.push(k(x(20*e),1.5*e,-.3,"medium","black",1.2,"middle",!0,c));for(let e=1;e<12;e++)e!==1&&d.push(k(x(20*e),-.5,1.5*e,"medium","black",1.2,"middle",!0,c))}b+="<br><br>"+_(T,d,t),u<this.nbQuestions-1&&!s.isHtml&&(b+=`
\\newpage`),this.questionJamaisPosee(u,l,n,m)&&(this.listeQuestions.push(r),this.listeCorrections.push(b),u++)}Z(this)},this.besoinFormulaireNumerique=["Tray type",4,`1: Color board without number
2: Color board with numbers
3: Black and white board with color names
4: Black and white board with numbers`],this.besoinFormulaire2CaseACocher=["Graduations",!0],this.besoinFormulaire3Numerique=["Number of colors (Maximum 6)",6],this.besoinFormulaire4CaseACocher=["Original game board",!1]}export{be as dateDeModifImportante,ge as dateDePublication,xe as default,me as interactifReady,fe as interactifType,ke as ref,ne as titre,We as uuid};
//# sourceMappingURL=c3I11-4eXIJvsl.js.map