HEX
Server: Apache
System: Linux vps.mmtprep.com 4.18.0-477.21.1.el8_8.x86_64 #1 SMP Thu Aug 10 13:51:50 EDT 2023 x86_64
User: mmtprep (1001)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/mmtprep/public_html/mathzen.mmtprep.com/assets/5A11-2-qLLkVIRG.js.map
{"version":3,"file":"5A11-2-qLLkVIRG.js","sources":["../../src/exercices/5e/5A11-2.js"],"sourcesContent":["import { combinaisonListes, combinaisonListesSansChangerOrdre, shuffle } from '../../lib/outils/arrayOutils'\nimport { miseEnEvidence } from '../../lib/outils/embellissements'\nimport { labyrinthe } from '../../modules/Labyrinthe.js'\nimport Exercice from '../Exercice.js'\nimport { mathalea2d } from '../../modules/2dGeneralites.js'\nimport { listeQuestionsToContenu, randint } from '../../modules/outils.js'\nexport const dateDePublication = '16/11/2021'\nexport const dateDeModifImportante = '05/10/2022' // Le nb de lignes et celui de colonnes du labyrinthe sont paramétrables.\nexport const titre = 'Navigate a maze of multiples with balanced chosen criteria'\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 16/11/2021\n * Ref 5A11-2 (clône de 5A11-1 qui datait du 7/12/2020)\n * Sortir du labyrinthe en utilisant les critères de divisibilité.\n */\nexport const uuid = '5618d'\nexport const ref = '5A11-2'\nexport default function ExerciceLabyrintheDivisibilite2 () {\n  Exercice.call(this)\n  this.titre = titre\n  this.consigne = ''\n  this.niveau = '6th'\n  this.nbQuestions = 4\n  this.nbCols = 1\n  this.nbColsCorr = 1\n  this.pasDeVersionLatex = false\n  this.pas_de_version_HMTL = false\n  this.sup = 6\n  this.sup3 = 1\n  this.sup4 = 1\n\n  // this.consigne=`Find the output by only passing through the boxes containing a number divisible by $${parseInt(this.sup)}$.`\n  this.nouvelleVersion = function () {\n    this.sup = Number(this.sup)\n    const tailleChiffre = 0.8\n    this.listeCorrections = []\n    this.listeQuestions = []\n    this.autoCorrection = []\n\n    let texte; let texteCorr; let laby; let monChemin = [[]]\n    const listeCouples = shuffle([[2, 3], [2, 9], [5, 3], [5, 9], [10, 3], [10, 9]])\n    let tables = []\n    for (const couple of listeCouples) {\n      tables.push(couple[0], couple[1])\n    }\n    tables = combinaisonListesSansChangerOrdre(tables, this.nbQuestions)\n    for (let q = 0; q < this.nbQuestions;) {\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      laby = labyrinthe({ nbLignes: nbL, nbColonnes: nbC })\n      laby.niveau = this.sup // Le niveau (de 1 à 6=mélange) définit le nombre d'étapes\n      monChemin = laby.choisitChemin(laby.niveau) // On choisit un chemin\n      laby.murs2d = laby.construitMurs(monChemin, tailleChiffre) // On construit le labyrinthe\n      laby.chemin2d = laby.traceChemin(monChemin) // On trace le chemin solution\n      texte = `Find the output by passing only the boxes containing a number divisible by $${tables[q]}$.<br>`\n      // textCorr = `${texteEnCouleurEtGras(`Voici le chemin en couleur et la sortie était le numéro $${2 - monChemin[monChemin.length - 1][1] + 1}$.`, 'black')}<br>`\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 myPath and only if, they must check the instruction\n      let listeMultiples = []\n      const listeNonMultiples = []\n      for (let i = 200; i <= 12000; i += randint(1, 100)) {\n        listeMultiples.push(tables[q] * i)\n      }\n      for (let i = 1; i <= nbC * nbL; i++) {\n        listeNonMultiples.push(randint(200, 5000) * tables[q] + randint(1, tables[q] - 1))\n      }\n      listeMultiples = combinaisonListes(listeMultiples, 12)\n\n      // We place the number objects.\n      laby.nombres2d = laby.placeNombres(monChemin, listeMultiples, listeNonMultiples, tailleChiffre)\n      const params = { xmin: -4, ymin: 0, xmax: 5 + 3 * nbC, ymax: 2 + 3 * nbL, pixelsParCm: 20, scale: 0.7 }\n      texte += mathalea2d(params, laby.murs2d, laby.nombres2d)\n      texteCorr += mathalea2d(params, laby.murs2d, laby.nombres2d, laby.chemin2d)\n      if (this.questionJamaisPosee(q, listeMultiples[0], listeNonMultiples[0])) {\n        this.listeQuestions.push(texte)\n        this.listeCorrections.push(texteCorr)\n        q++\n      }\n    }\n    listeQuestionsToContenu(this)\n  }\n  this.besoinFormulaireNumerique = ['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":["dateDePublication","dateDeModifImportante","titre","uuid","ref","ExerciceLabyrintheDivisibilite2","Exercice","tailleChiffre","texte","texteCorr","laby","monChemin","listeCouples","shuffle","tables","couple","combinaisonListesSansChangerOrdre","q","nbL","randint","nbC","labyrinthe","miseEnEvidence","listeMultiples","listeNonMultiples","i","combinaisonListes","params","mathalea2d","listeQuestionsToContenu"],"mappings":"oIAMY,MAACA,EAAoB,aACpBC,EAAwB,aACxBC,EAAQ,6DAQRC,EAAO,QACPC,EAAM,SACJ,SAASC,GAAmC,CACzDC,EAAS,KAAK,IAAI,EAClB,KAAK,MAAQJ,EACb,KAAK,SAAW,GAChB,KAAK,OAAS,MACd,KAAK,YAAc,EACnB,KAAK,OAAS,EACd,KAAK,WAAa,EAClB,KAAK,kBAAoB,GACzB,KAAK,oBAAsB,GAC3B,KAAK,IAAM,EACX,KAAK,KAAO,EACZ,KAAK,KAAO,EAGZ,KAAK,gBAAkB,UAAY,CACjC,KAAK,IAAM,OAAO,KAAK,GAAG,EAC1B,MAAMK,EAAgB,GACtB,KAAK,iBAAmB,CAAE,EAC1B,KAAK,eAAiB,CAAE,EACxB,KAAK,eAAiB,CAAE,EAExB,IAAIC,EAAWC,EAAeC,EAAUC,EAAY,CAAC,EAAE,EACvD,MAAMC,E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