File: /home/mmtprep/public_html/mathzen.mmtprep.com/assets/6N41-1-Rot30ncW.js.map
{"version":3,"file":"6N41-1-Rot30ncW.js","sources":["../../src/exercices/6e/6N41-1.js"],"sourcesContent":["import { combinaisonListes } from '../../lib/outils/arrayOutils'\nimport { miseEnEvidence } from '../../lib/outils/embellissements'\nimport { texFractionReduite } from '../../lib/outils/deprecatedFractions.js'\nimport { pgcd } from '../../lib/outils/primalite'\nimport { labyrinthe } from '../../modules/Labyrinthe.js'\nimport Exercice from '../deprecatedExercice.js'\nimport { mathalea2d } from '../../modules/2dGeneralites.js'\nimport { listeQuestionsToContenu, randint, calculANePlusJamaisUtiliser } from '../../modules/outils.js'\nimport { fraction } from '../../modules/fractions.js'\nimport { context } from '../../modules/context.js'\nexport const amcReady = true\nexport const amcType = 'AMCHybride'\nexport const dateDeModifImportante = '05/10/2022' // Le nb de lignes et celui de colonnes du labyrinthe sont paramétrables.\n\nexport const titre = 'Navigate an equal fraction maze'\n\n/**\n * @author Jean-Claude Lhote (remaniée par EE pour la prise en compte du nb de lignes et de colonnes du labyrinthe)\n * Publié le 11/12/2020\n * Ref : 6N41-1\n * Parcourir un labyrinthe de fractions en passant par des fractions égales.\n */\nexport const uuid = 'f8a4d'\nexport const ref = '6N41-1'\nexport default function ExerciceLabyrintheFractionsEgales () {\n Exercice.call(this)\n this.consigne = ''\n this.niveau = '6th'\n this.nbQuestions = 1\n // this.nbQuestionsModifiable = false\n this.nbCols = 1\n this.nbColsCorr = 1\n this.pasDeVersionLatex = false\n this.pas_de_version_HMTL = false\n this.sup2 = 3\n this.sup = 10\n this.sup3 = 1\n this.sup4 = 1\n\n if (this.niveau === 'CM') {\n this.sup = 10\n this.sup2 = 3\n } else {\n this.sup = 13\n this.sup2 = 4\n }\n const tailleChiffre = context.isAmc ? 1.1 : 0.7\n this.nouvelleVersion = function () {\n this.listeCorrections = []\n this.listeQuestions = []\n this.autoCorrection = []\n this.sup = Math.max(2, this.sup)\n for (let i = 0, texte, texteCorr, cpt = 0; i < this.nbQuestions && cpt < 50;) {\n const mesfractions = []\n const nbL = this.sup3 === 1 ? randint(2, 8) : Math.max(2, this.sup3)\n const nbC = this.sup4 === 1 ? randint(3, 11 - nbL) : Math.max(3, this.sup4)\n const laby = labyrinthe({ nbLignes: nbL, nbColonnes: nbC })\n laby.niveau = parseInt(this.sup2) // Le niveau (de 1 à 6=mélange) définit le nombre d'étapes\n const monchemin = laby.choisitChemin(laby.niveau) // On choisi un chemin\n laby.murs2d = laby.construitMurs(monchemin) // On construit le labyrinthe\n laby.chemin2d = laby.traceChemin(monchemin) // On trace le chemin solution\n const table = randint(1, 7) + 1\n let num = randint(1, 2 * table - 1)\n while (pgcd(num, table) !== 1) {\n num = randint(2, 2 * table - 1)\n }\n\n const maximum = this.sup\n texte = `Find the output by passing only the boxes containing fractions equal to $${texFractionReduite(num, table)}$.`\n texteCorr = `Here is the path in color and the output was the number $${miseEnEvidence(nbL - monchemin[monchemin.length - 1][1])}$.<br>`\n // Number table construction area: If they are on my path and only if, they must check the instruction\n let listeMultiples = []\n\n for (let i = 2; i <= maximum; i++) {\n listeMultiples.push(table * i)\n }\n listeMultiples = combinaisonListes(listeMultiples, nbC * nbL)\n for (let i = 0; i < nbC * nbL; i++) {\n mesfractions.push(fraction(calculANePlusJamaisUtiliser(num * listeMultiples[i] / table), listeMultiples[i]))\n }\n for (let i = 0; i < nbC * nbL; i++) {\n switch (randint(1, 3)) {\n case 1: mesfractions.push(fraction(listeMultiples[i], num * listeMultiples[i] / table))\n break\n case 2: mesfractions.push(fraction(calculANePlusJamaisUtiliser(num * listeMultiples[i] / table), listeMultiples[i] - table))\n break\n case 3: mesfractions.push(fraction(calculANePlusJamaisUtiliser(num * listeMultiples[i] / table), listeMultiples[i] - table))\n break\n }\n }\n\n // Once the number table is made, we place the number objects.\n laby.nombres2d = laby.placeNombres(monchemin, mesfractions.slice(0, nbC * nbL - 1), mesfractions.slice(nbC * nbL), tailleChiffre)\n const params = { xmin: -4, ymin: 0, xmax: 5 + 3 * nbC, ymax: 2 + 3 * nbL, pixelsParCm: 20, scale: 0.7 }\n if (context.isAmc) texte += ' Leave traces of the path traveled in the labyrinth.'\n texte += '<br>' + mathalea2d(params, laby.murs2d, laby.nombres2d)\n texteCorr += mathalea2d(params, laby.murs2d, laby.nombres2d, laby.chemin2d)\n if (context.isAmc) {\n this.autoCorrection[0] = {\n enonce: 'here the question(s) is(are) asked',\n enonceAvant: false, // EE : ce champ est facultatif et permet (si false) de supprimer l'énoncé ci-dessus avant la numérotation de chaque question.\n enonceAvantUneFois: false, // EE : ce champ est facultatif et permet (si true) d'display the above statement only once before the numbering of the first question of the exercise. Only works correctly if the mix option is false.\n propositions: [\n {\n type: 'AMCOpen', // on donne le type de la première question-réponse qcmMono, qcmMult, AMCNum, AMCOpen\n propositions: [\n {\n texte: texteCorr,\n statut: 3, // OBLIGATOIRE (ici c'is the number of lines of the frame for the answer of the'élève sur AMC)\n enonce: texte,\n sanscadre: true // EE : ce champ est facultatif et permet (si true) de cacher le cadre et les lignes acceptant la réponse de l'élève\n }\n ]\n }\n ]\n }\n }\n if (this.questionJamaisPosee(i, texte)) {\n // If the question has never been asked, we create another one\n this.listeQuestions.push(texte)\n this.listeCorrections.push(texteCorr)\n i++\n }\n cpt++\n }\n listeQuestionsToContenu(this)\n }\n this.besoinFormulaireNumerique = ['Maximum factor', 20]\n this.besoinFormulaire2Numerique = ['Speed level', 6, '1: Snail\\n2: Turtle\\n3: Hare\\n4: Antelope\\n5: Cheetah\\n6: Random']\n this.besoinFormulaire3Numerique = ['Number of lines in the maze (between 2 and 8 or 1 if you leave it to chance)', 8]\n this.besoinFormulaire4Numerique = ['Number of columns in the maze (between 2 and 8 or 1 if you leave it to chance)', 8]\n}\n"],"names":["amcReady","amcType","dateDeModifImportante","titre","uuid","ref","ExerciceLabyrintheFractionsEgales","Exercice","tailleChiffre","context","i","texte","texteCorr","cpt","mesfractions","nbL","randint","nbC","laby","labyrinthe","monchemin","table","num","pgcd","maximum","texFractionReduite","miseEnEvidence","listeMultiples","combinaisonListes","fraction","calculANePlusJamaisUtiliser","params","mathalea2d","listeQuestionsToContenu"],"mappings":"6MAUY,MAACA,EAAW,GACXC,EAAU,aACVC,EAAwB,aAExBC,EAAQ,kCAQRC,EAAO,QACPC,EAAM,SACJ,SAASC,GAAqC,CAC3DC,EAAS,KAAK,IAAI,EAClB,KAAK,SAAW,GAChB,KAAK,OAAS,MACd,KAAK,YAAc,EAEnB,KAAK,OAAS,EACd,KAAK,WAAa,EAClB,KAAK,kBAAoB,GACzB,KAAK,oBAAsB,GAC3B,KAAK,KAAO,EACZ,KAAK,IAAM,GACX,KAAK,KAAO,EACZ,KAAK,KAAO,EAER,KAAK,SAAW,MAClB,KAAK,IAAM,GACX,KAAK,KAAO,IAEZ,KAAK,IAAM,GACX,KAAK,KAAO,GAEd,MAAMC,EAAgBC,EAAQ,MAAQ,IAAM,GAC5C,KAAK,gBAAkB,UAAY,CACjC,KAAK,iBAAmB,CAAE,EAC1B,KAAK,eAAiB,CAAE,EACxB,KAAK,eAAiB,CAAE,EACxB,KAAK,IAAM,KAAK,IAAI,EAAG,KAAK,GAAG,EAC/B,QAASC,EAAI,EAAGC,EAAOC,EAAWC,EAAM,EAAGH,EAAI,KAAK,aAAeG,EAAM,IAAK,CAC5E,MAAMC,EAAe,CAAE,EACjBC,EAAM,KAAK,OAAS,EAAIC,EAAQ,EAAG,CAAC,EAAI,KAAK,IAAI,EAAG,KAAK,IAAI,EAC7DC,EAAM,KAAK,OAAS,EAAID,EAAQ,EAAG,GAAKD,CAAG,EAAI,KAAK,IAAI,EAAG,KAAK,IAAI,EACpEG,EAAOC,EAAW,CAAE,SAAUJ,EAAK,WAAYE,EAAK,EAC1DC,EAAK,OAAS,SAAS,KAAK,IAAI,EAChC,MAAME,EAAYF,EAAK,cAAcA,EAAK,MAAM,EAChDA,EAAK,OAASA,EAAK,cAAcE,CAAS,EAC1CF,EAAK,SAAWA,EAAK,YAAYE,CAAS,EAC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