File: /home/mmtprep/public_html/mathzen.mmtprep.com/assets/5L14-4-mEC34v7X.js.map
{"version":3,"file":"5L14-4-mEC34v7X.js","sources":["../../src/exercices/5e/5L14-4.js"],"sourcesContent":["import { texteEnCouleur } from '../../lib/outils/embellissements'\nimport Exercice from '../Exercice.js'\nimport { listeQuestionsToContenu, randint, gestionnaireFormulaireTexte } from '../../modules/outils.js'\nimport ChoisirExpressionLitterale from './_Choisir_expression_litterale.js'\nexport const titre = 'Determine the last operation to perform in a literal expression'\n\n/**\n * Référence 5L14-4\n * Déterminer la dernière opération à effectuer dans une expression littérale\n * @author Sébastien Lozano fork Jean-Claude Lhote\n * Rendu paramétrable et ajout de la structure d'une expression le 14/08/2021 : Guillaume Valmont\n */\nexport const uuid = '97f1a'\nexport const ref = '5L14-4'\nexport default function DeterminerDerniereOperationExpressionLitterale () {\n Exercice.call(this) // Héritage de la classe Exercice()\n this.debug = false\n this.nbQuestions = 4\n this.nbCols = 1\n this.nbColsCorr = 1\n this.sup3 = 5\n this.consigne = 'Determine the last operation to perform if it was necessary to perform the calculation for given values of $x$ and $y$.'\n\n this.nouvelleVersion = function () {\n this.listeQuestions = [] // Liste de questionss\n this.listeCorrections = [] // Liste de questions corrigées\n this.autoCorrection = []\n\n /*\n let typesDeQuestionsDisponibles = []\n if (!this.sup3 || this.sup3 === 'Nope') { // Si aucune liste n'est saisie\n typesDeQuestionsDisponibles = ['5']\n } else {\n if (typeof this.sup3 === 'number') { // Si c'is a number it means there is only one expression\n typesDeQuestionsDisponibles = [contraindreValeur(1, 5, parseInt(this.sup3), 2)]\n } else {\n typesDeQuestionsDisponibles = this.sup3.split('-')// Sinon on créé un tableau à partir des valeurs séparées par des -\n for (let i = 0; i < typesDeQuestionsDisponibles.length; i++) {\n typesDeQuestionsDisponibles[i] = contraindreValeur(1, 5, parseInt(typesDeQuestionsDisponibles[i]), 2)\n }\n }\n }\n const listeTypeDeQuestions = combinaisonListes(typesDeQuestionsDisponibles, this.nbQuestions)\n */\n\n const listeTypeDeQuestions = gestionnaireFormulaireTexte({\n max: 5,\n defaut: randint(1, 5),\n nbQuestions: this.nbQuestions,\n saisie: this.sup3\n })\n\n let expn; let expc; let decimal = 1; let nbOperations; let resultats; let lastOp; let structureExpression\n if (this.sup2) decimal = 10\n for (let i = 0, texte, texteCorr, val1, val2, cpt = 0; i < this.nbQuestions && cpt < 50;) {\n nbOperations = parseInt(listeTypeDeQuestions[i])\n val1 = randint(2, 5)\n val2 = randint(6, 9)\n // results=ChooseALiteralExpressionBis(nbOperations,decimal,val1,val2)\n resultats = ChoisirExpressionLitterale(nbOperations, decimal, val1, val2, this.sup)\n // expf = results[0]\n expn = resultats[1]\n expc = resultats[2]\n // nbval = results[3]\n lastOp = resultats[4]\n structureExpression = resultats[6]\n\n if (expn.indexOf('Or') > 0) expn = expn.substring(0, expn.indexOf('Or')) // on supprime la deuxième expression fractionnaire\n texte = `${expn}`\n if (this.debug) {\n texte += '<br><br>=====CORRECTION======<br>'\n texte += `To fix the ideas, let's choose values for $x$ and $y$, for example $x=${val1}$ and $y=${val2}$.`\n texte += `<br>The calculation would be as follows:<br> ${expc}.`\n texte += '<br>For any values of $x$ and $y$ chosen, the steps are the same, they respect the operational priorities.'\n texte += texteEnCouleur(`<br>The last operation in ${expn} is a ${lastOp}.`)\n texteCorr = ''\n } else {\n texteCorr = `To fix the ideas, let's choose values for $x$ and $y$, for example $x=${val1}$ and $y=${val2}$.`\n texteCorr += `<br>The calculation would be as follows: ${expc}.`\n texteCorr += '<br>For any values of $x$ and $y$ chosen, the steps are the same, they respect the operational priorities.'\n texteCorr += texteEnCouleur(`<br>The last operation in ${expn} is a ${lastOp}.`)\n if (this.consigne === 'Determine whether these expressions are sums, differences, products or quotients.') {\n texteCorr += texteEnCouleur(`<br>This expression is therefore ${structureExpression}.`)\n }\n }\n\n if (this.listeQuestions.indexOf(texte) === -1) { // Si la question n'a jamais été posée, on en créé une autre\n this.listeQuestions.push(texte)\n this.listeCorrections.push(texteCorr)\n i++\n }\n cpt++\n }\n listeQuestionsToContenu(this)\n }\n this.besoinFormulaireCaseACocher = ['Explicit × sign', true]\n this.besoinFormulaire2CaseACocher = ['With decimals.', false]\n this.besoinFormulaire3Texte = ['Number of operations', 'Numbers separated by hyphens\\n1: 1 operation\\n2: 2 operations\\n3: 3 operations\\n4: 4 operations\\n5: Between 2 and 5 operations']\n}\n"],"names":["titre","uuid","ref","DeterminerDerniereOperationExpressionLitterale","Exercice","listeTypeDeQuestions","gestionnaireFormulaireTexte","randint","expn","expc","decimal","nbOperations","resultats","lastOp","structureExpression","i","texte","texteCorr","val1","val2","cpt","ChoisirExpressionLitterale","texteEnCouleur","listeQuestionsToContenu"],"mappings":"2KAIY,MAACA,EAAQ,kEAQRC,EAAO,QACPC,EAAM,SACJ,SAASC,GAAkD,CACxEC,EAAS,KAAK,IAAI,EAClB,KAAK,MAAQ,GACb,KAAK,YAAc,EACnB,KAAK,OAAS,EACd,KAAK,WAAa,EAClB,KAAK,KAAO,EACZ,KAAK,SAAW,0HAEhB,KAAK,gBAAkB,UAAY,CACjC,KAAK,eAAiB,CAAE,EACxB,KAAK,iBAAmB,CAAE,EAC1B,KAAK,eAAiB,CAAE,EAmBxB,MAAMC,EAAuBC,EAA4B,CACvD,IAAK,EACL,OAAQC,EAAQ,EAAG,CAAC,EACpB,YAAa,KAAK,YAClB,OAAQ,KAAK,IACnB,CAAK,EAED,IAAIC,EAAUC,EAAUC,EAAU,EAAOC,EAAkBC,EAAeC,EAAYC,EAClF,KAAK,OAAMJ,EAAU,IACzB,QAASK,EAAI,EAAGC,EAAOC,EAAWC,EAAMC,EAAMC,EAAM,EAAGL,EAAI,KAAK,aAAeK,EAAM,IACnFT,EAAe,SAASN,EAAqBU,CAAC,CAAC,EAC/CG,EAAOX,EAAQ,EAAG,CAAC,EACnBY,EAAOZ,EAAQ,EAAG,CAAC,EAEnBK,EAAYS,EAA2BV,EAAcD,EAASQ,EAAMC,EAAM,KAAK,GAAG,EAElFX,EAAOI,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