File: /home/mmtprep/public_html/mathzen.mmtprep.com/assets/6N12-Ubgl4WQJ.js.map
{"version":3,"file":"6N12-Ubgl4WQJ.js","sources":["../../src/exercices/6e/6N12.js"],"sourcesContent":["import { choice, combinaisonListes } from '../../lib/outils/arrayOutils'\nimport { modalUrl } from '../../lib/outils/modales.js'\nimport { nombreDeChiffresDansLaPartieEntiere } from '../../lib/outils/nombres'\nimport { sp } from '../../lib/outils/outilString.js'\nimport { texNombre } from '../../lib/outils/texNombre'\nimport Exercice from '../deprecatedExercice.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 = 'Multiply or divide an integer by 10, 100, 1000... (integer result)'\nexport const interactifReady = true\nexport const interactifType = 'mathLive'\nexport const amcReady = true\nexport const amcType = 'AMCNum'\n\nexport const dateDeModifImportante = '09/08/2022'\n\n/**\n * Un nombre à 2 chiffres (non multiple de 10) + 9\n * @author Rémi Angot\n * Référence 6N12\n * Ajout de la division par Guillaume Valmont le 09/08/2022\n */\nexport const uuid = 'bb9d8'\nexport const ref = '6N12'\nexport default function MultiplierEntierPar101001000 () {\n Exercice.call(this) // Héritage de la classe Exercice()\n this.consigne = 'Calculate.'\n this.nbQuestions = 8\n this.nbCols = 2\n this.nbColsCorr = 2\n this.sup = 2\n this.sup2 = 1\n\n this.nouvelleVersion = function (numeroExercice) {\n this.boutonAide = modalUrl(numeroExercice, 'https://mathix.org/glisse-nombre/index.html',\n 'Number slide'\n )\n this.listeQuestions = [] // Liste de questions\n this.listeCorrections = [] // Liste de questions corrigées\n this.autoCorrection = []\n const typesDeQuestionsDisponibles = [1, 2, 3, 4, choice([5, 6]), 7, 8, 9]\n const listeTypeDeQuestions = combinaisonListes(\n typesDeQuestionsDisponibles,\n this.nbQuestions\n ) // Tous les types de questions sont posées mais l'ordre diffère à chaque 'cycle'\n let listeDeB = []\n if (parseInt(this.sup) === 2) {\n listeDeB = combinaisonListes([10, 100, 1000, 10000, 100000], this.nbQuestions)\n } else {\n listeDeB = combinaisonListes([10, 100, 1000], this.nbQuestions)\n }\n let typeQuestionsDisponibles = ['multiplication', 'division']\n if (this.sup2 === 1) typeQuestionsDisponibles = ['multiplication']\n else if (this.sup2 === 2) typeQuestionsDisponibles = ['division']\n else typeQuestionsDisponibles = ['multiplication', 'division']\n const listeTypeQuestions = combinaisonListes(typeQuestionsDisponibles, this.nbQuestions)\n for (\n let i = 0, texte, texteCorr, a, b, cpt = 0;\n i < this.nbQuestions && cpt < 50;\n ) {\n switch (listeTypeDeQuestions[i]) {\n case 1:\n a = randint(1, 9)\n break\n case 2:\n a = randint(2, 9) * 10\n break\n case 3:\n a = randint(2, 9) * 100\n break\n case 4:\n a = randint(2, 9) * 1000\n break\n case 5:\n a = randint(1, 9) * 100 + randint(1, 9)\n break\n case 6:\n a = randint(1, 9) * 1000 + randint(1, 9)\n break\n case 7:\n a = randint(1, 9) * 100 + randint(1, 9) * 10 + randint(1, 9)\n break\n case 8:\n a = randint(1, 9) * 10000 + randint(1, 9) * 100\n break\n case 9:\n a = randint(1, 9) * 10 + randint(1, 9)\n break\n }\n\n b = listeDeB[i]\n switch (listeTypeQuestions[i]) {\n case 'multiplication':\n if (choice([true, false])) {\n const c = a\n a = b\n b = c\n }\n texte = `$${texNombre(a)}\\\\times${texNombre(b)}$`\n setReponse(this, i, [texNombre(a * b), a * b])\n texteCorr = `$${texNombre(a)}\\\\times${texNombre(b)}=${texNombre(a * b)}$`\n break\n case 'division':\n texte = `$${texNombre(a * b)}\\\\div${texNombre(b)}$`\n setReponse(this, i, a)\n texteCorr = `$${texNombre(a * b)}\\\\div${texNombre(b)}=${texNombre(a)}$`\n break\n }\n texte += ajouteChampTexteMathLive(this, i, 'largeur25 inline college6eme', { texteAvant: `${sp(2)}=` })\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: texteCorr // Si vide, le texte est la correction de l'exercice.\n }\n ],\n reponse: {\n texte: 'the text displayed above the numeric form in AMC', // facultatif\n // value: [a * b], // obligatory (the numerical answer to compare to that of the student), DO NOT PUT A STRING with a comma! 4.9 and not 4.9. This value must be passed in an array hence the need for brackets.\n valeur: [listeTypeQuestions[i] === 'division' ? a : a * b], // 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(listeTypeQuestions[i] === 'division' ? a : a * b), // 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 // digits: 7, // mandatory for AMC (the number of digits for AMC, if digits is set to 0, then it will be determined to stick to the requested decimal number)\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\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.besoinFormulaireNumerique = ['Difficulty level', 2, '1: Multiplication or division by 10, 100 or 1,000\\n2: Multiplication or division by 10, 100, 1,000, 10,000 or 100,000']\n this.besoinFormulaire2Numerique = ['Multiplication or division', 3, '1: Multiplication\\n2: Division\\n3: Mixing']\n}\n"],"names":["titre","interactifReady","interactifType","amcReady","amcType","dateDeModifImportante","uuid","ref","MultiplierEntierPar101001000","Exercice","numeroExercice","modalUrl","typesDeQuestionsDisponibles","choice","listeTypeDeQuestions","combinaisonListes","listeDeB","typeQuestionsDisponibles","listeTypeQuestions","i","texte","texteCorr","a","b","cpt","randint","c","texNombre","setReponse","ajouteChampTexteMathLive","sp","context","nbDigitsSupplementaires","nombreDeChiffresDansLaPartieEntiere","listeQuestionsToContenu"],"mappings":"0JAWY,MAACA,EAAQ,qEACRC,EAAkB,GAClBC,EAAiB,WACjBC,EAAW,GACXC,EAAU,SAEVC,EAAwB,aAQxBC,EAAO,QACPC,EAAM,OACJ,SAASC,GAAgC,CACtDC,EAAS,KAAK,IAAI,EAClB,KAAK,SAAW,aAChB,KAAK,YAAc,EACnB,KAAK,OAAS,EACd,KAAK,WAAa,EAClB,KAAK,IAAM,EACX,KAAK,KAAO,EAEZ,KAAK,gBAAkB,SAAUC,EAAgB,CAC/C,KAAK,WAAaC,EAASD,EAAgB,8CACzC,cACD,EACD,KAAK,eAAiB,CAAE,EACxB,KAAK,iBAAmB,CAAE,EAC1B,KAAK,eAAiB,CAAE,EACxB,MAAME,EAA8B,CAAC,EAAG,EAAG,EAAG,EAAGC,EAAO,CAAC,EAAG,CAAC,CAAC,EAAG,EAAG,EAAG,CAAC,EAClEC,EAAuBC,EAC3BH,EACA,KAAK,WACN,EACD,IAAII,EAAW,CAAE,EACb,SAAS,KAAK,GAAG,IAAM,EACzBA,EAAWD,EAAkB,CAAC,GAAI,IAAK,IAAM,IAAO,GAAM,EAAG,KAAK,WAAW,EAE7EC,EAAWD,EAAkB,CAAC,GAAI,IAAK,GAAI,EAAG,KAAK,WAAW,EAEhE,IAAIE,EAA2B,CAAC,iBAAkB,UAAU,EACxD,KAAK,OAAS,EAAGA,EAA2B,CAAC,gBAAgB,EACxD,KAAK,OAAS,EAAGA,EAA2B,CAAC,UAAU,EAC3DA,EAA2B,CAAC,iBAAkB,UAAU,EAC7D,MAAMC,EAAqBH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