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/6N10-1-Ki6YcoDd.js.map
{"version":3,"file":"6N10-1-Ki6YcoDd.js","sources":["../../src/exercices/6e/6N10-1.js"],"sourcesContent":["import { combinaisonListes } from '../../lib/outils/arrayOutils'\nimport { nombreDeChiffresDansLaPartieEntiere } from '../../lib/outils/nombres.js'\nimport { texNombre } from '../../lib/outils/texNombre.js'\nimport Exercice from '../Exercice.js'\nimport { listeQuestionsToContenu, randint } from '../../modules/outils.js'\nimport { ajouteChampTexteMathLive } from '../../lib/interactif/questionMathLive.js'\nimport { context } from '../../modules/context.js'\nimport { setReponse } from '../../lib/interactif/gestionInteractif.js'\n\nexport const titre = 'Write a number from its tens, hundreds, thousands...'\nexport const interactifReady = true\nexport const interactifType = 'mathLive'\nexport const amcReady = true\nexport const amcType = 'AMCNum'\n\nexport const dateDeModifImportante = '09/09/2022'\n\n/**\n * Le nombre de dizaines, centaines et milliers étant donné, il faut écrire le nombre.\n *\n * 2 fois sur 5 il y a chevauchement entre les classes\n * @author Rémi Angot (complété par Eric Elter pour mettre des niveaux de difficulté)\n * 6N10-1\n * Relecture : Novembre 2021 par EE\n */\nexport const uuid = '7efdf'\nexport const ref = '6N10-1'\nexport default function ExerciceNumerationEntier () {\n  Exercice.call(this) // Héritage de la classe Exercice()\n  this.nbQuestions = 5\n  this.nbCols = 1\n  this.nbColsCorr = 1\n  this.sup = false\n  this.sup2 = true\n  this.sup3 = 3\n  this.sup4 = 1\n\n  this.nouvelleVersion = function () {\n    this.sup3 = Number(this.sup3)\n    this.sup4 = Number(this.sup4)\n    this.listeQuestions = [] // Liste de questions\n    this.listeCorrections = [] // Liste de questions corrigées\n    this.autoCorrection = []\n    let listeTypeDeQuestions = []\n    if (this.sup2) { // Vers les unités\n      this.consigne = 'Write in numbers'\n      this.consigne += this.nbQuestions === 1 ? 'this number.' : 'each of the numbers.'\n    } else { // Vers les dizaines, centaines, milliers....\n      this.consigne = 'Complete.'\n    }\n    this.consigne += this.interactif ? ' Remember to put the necessary spaces.' : ''\n    if (this.sup) {\n      this.sup3 = 1\n    } // Si entiers à 1 chiffre choisis, chevauchement impossible.\n    if (this.sup3 === 1) { // Sans chevauchement\n      listeTypeDeQuestions = combinaisonListes(\n        [1],\n        this.nbQuestions\n      )\n    } else if (this.sup3 === 2) { // Avec chevauchement\n      listeTypeDeQuestions = combinaisonListes(\n        [2],\n        this.nbQuestions\n      )\n    } else {\n      listeTypeDeQuestions = combinaisonListes( // Avec et sans chevauchement (2 sur 5 sont chevauchees)\n        [1, 1, 1, 2, 2], // Tous les types de questions sont posées mais l'ordre diffère à chaque 'cycle'\n        this.nbQuestions\n      )\n    }\n    for (let i = 0, texte, texteCorr, a, b, rangA, rangB, rangRef, cpt = 0; i < this.nbQuestions && cpt < 50;) {\n      const rangs = [\n        'units',\n        'tens',\n        'hundreds',\n        'thousands',\n        'tens of thousands',\n        'hundreds of thousands',\n        'millions',\n        'tens of millions',\n        'hundreds of millions',\n        'billion',\n        'tens of billions',\n        'hundreds of billions'\n      ]\n      if (this.sup) { // Un chiffre ou deux chiffres ?\n        a = randint(2, 9)\n        b = randint(2, 9, [a])\n      } else {\n        a = randint(2, 8) * 10 + randint(1, 5)\n        b = randint(2, 8) * 10 + randint(1, 5)\n      }\n      if (this.sup2) { // Vers les unités\n        rangA = randint(0, 2)\n      } else { // Vers les dizaines, centaines, milliers....\n        rangRef = randint(1, this.sup4 === 1 ? 4 : 9)\n        rangA = randint(rangRef, this.sup4 === 1 ? 4 : 9)\n      }\n\n      if (listeTypeDeQuestions[i] === 1) { // Sans chevauchement\n        rangB = randint(rangA + 2, this.sup4 === 1 ? 6 : 11)\n      } else { // Avec chevauchement\n        rangB = rangA + 1\n      }\n      if (this.sup2) {\n        texte = `$\\\\text{${b} ${rangs[rangB]} and ${a} ${rangs[rangA]}}$`\n        texteCorr = `$${b} \\\\text{ ${rangs[rangB]} et }${a} \\\\text{ ${rangs[rangA]\n                } : } ${texNombre(b * Math.pow(10, rangB))} + ${texNombre(a * (Math.pow(10, rangA)))} =${texNombre(\n                    b * Math.pow(10, rangB) + a * Math.pow(10, rangA)\n                )}$`\n      } else {\n        texte = `$\\\\text{${b} ${rangs[rangB]} and ${a} ${rangs[rangA]} correspond to }$`\n        texte += !this.interactif ? `$\\\\text{\\\\ldots\\\\ldots\\\\ldots\\\\ldots\\\\ldots\\\\ldots\\\\ldots\\\\ldots\\\\ldots ${rangs[rangRef]}.}$` : ''\n        texteCorr = `$${b} \\\\text{ ${rangs[rangB]} et }${a} \\\\text{ ${rangs[rangA]\n                } correspondent à`\n        texteCorr += ` ${texNombre(b * Math.pow(10, rangB - rangRef))} ${rangs[rangRef]} + ${texNombre(a * (Math.pow(10, rangA - rangRef)))} ${rangs[rangRef]} =${texNombre(\n                    b * Math.pow(10, rangB - rangRef) + a * Math.pow(10, rangA - rangRef)\n                )} ${rangs[rangRef]}}$`\n      }\n      const reponse = this.sup2 ? b * Math.pow(10, rangB) + a * Math.pow(10, rangA) : b * Math.pow(10, rangB - rangRef) + a * Math.pow(10, rangA - rangRef)\n\n      setReponse(this, i, texNombre(reponse), { formatInteractif: 'text' })\n      if (this.sup2) {\n        texte += ajouteChampTexteMathLive(this, i, 'width25 inline college6eme')\n      } else {\n        texte += ajouteChampTexteMathLive(this, i, 'width25 inline college6eme', { texteApres: `$\\\\text{ ${rangs[rangRef]}.}$` })\n      }\n\n      if (context.isAmc) {\n        const nbDigitsSupplementaires = randint(0, 2)\n        this.autoCorrection[i] = {\n          enonce: texte, // Si vide, l'statement is that of'exercice.\n          propositions: [\n            {\n              texte: 'textCorr' // Si vide, le texte est la correction de l'exercice.\n            }\n          ],\n          reponse: {\n            texte: 'AMC', // facultatif\n            valeur: [reponse], // obligatoire (la réponse numérique à comparer à celle de l'student), DO NOT PUT A COMMA STRING! 4.9 and not 4.9. This value must be passed into an array'où la nécessité des crochets.\n            alignement: 'flushleft', // EE : ce champ est facultatif et n\"is functional only for the hybrid. It allows you to choose where the boxes are arranged on the sheet. By default, it is like the text before it. To put left, center or right, choose from ('flushleft\", 'center', 'flushright').\n            param: {\n              digits: nbDigitsSupplementaires + nombreDeChiffresDansLaPartieEntiere(reponse), // obligatoire pour AMC (le nombre de chiffres pour AMC, si digits est mis à 0, alors il sera déterminé pour coller au nombre décimal demandé)\n              decimals: 0, // facultatif. S'he'est pas mis, il sera mis à 0 et sera déterminé automatiquement comme décrit ci-dessus\n              signe: false, // (présence d'une case + ou - pour AMC)\n              approx: 0 // (0 = valeur exacte attendue, sinon valeur de tolérance... voir plus bas pour un point technique non intuitif)\n            }\n          }\n        }\n      }\n      if (this.listeQuestions.indexOf(texte) === -1) {\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.besoinFormulaireCaseACocher = ['Decomposition with only one-digit integers']\n  this.besoinFormulaire2CaseACocher = ['Decomposition to units']\n  this.besoinFormulaire3Numerique = ['Overlapping units', 3, '1: Without overlapping units\\n2: With overlapping units\\n3: Mixture']\n  this.besoinFormulaire4Numerique = ['Variant', 3, '1: Up to millions\\n2: Up to hundreds of billions\\n3: Mixture']\n}\n"],"names":["titre","interactifReady","interactifType","amcReady","amcType","dateDeModifImportante","uuid","ref","ExerciceNumerationEntier","Exercice","listeTypeDeQuestions","combinaisonListes","i","texte","texteCorr","a","b","rangA","rangB","rangRef","cpt","rangs","randint","texNombre","reponse","setReponse","ajouteChampTexteMathLive","context","nbDigitsSupplementaires","nombreDeChiffresDansLaPartieEntiere","listeQuestionsToContenu"],"mappings":"6FASY,MAACA,EAAQ,uDACRC,EAAkB,GAClBC,EAAiB,WACjBC,EAAW,GACXC,EAAU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