File: /home/mmtprep/public_html/mathzen.mmtprep.com/assets/4C37-Rre4BQYe.js.map
{"version":3,"file":"4C37-Rre4BQYe.js","sources":["../../src/exercices/4e/4C37.js"],"sourcesContent":["import { combinaisonListes } from '../../lib/outils/arrayOutils'\nimport Exercice from '../Exercice.js'\nimport { listeQuestionsToContenu, randint } from '../../modules/outils.js'\nimport { propositionsQcm } from '../../lib/interactif/qcm.js'\nexport const amcReady = true\nexport const amcType = 'qcmMono'\nexport const titre = 'Determine the sign of a power'\nexport const interactifReady = true\nexport const interactifType = 'qcm'\nexport const dateDePublication = '30/06/2022' // La date de publication initiale au format 'jj/mm/aaaa' pour affichage temporaire d'un tag\n\n/**\n * Déterminer le signe d'une puissance, on choisira la possibilité d'avoir un nombre positif ou négatif et un\n * exposant positif ou négatif\n * @author Delphine David\n * Référence 4C37\n*/\nexport const uuid = '67432'\nexport const ref = '4C37'\nexport default class SignePuissance extends Exercice {\n constructor () {\n super()\n this.consigne = 'Determine the sign of the following expressions.'\n this.nbQuestions = 5\n this.nbCols = 1\n this.nbColsCorr = 1\n this.interactif = false\n this.interactifReady = interactifReady\n this.interactifType = interactifType\n this.amcType = amcType\n this.amcReady = amcReady\n }\n\n nouvelleVersion () {\n this.listeQuestions = []\n this.listeCorrections = []\n this.autoCorrection = []\n let listeTypeDeQuestions = ['a^n', '-a^n', '(-a)^n', '-(-a)^n']\n listeTypeDeQuestions = combinaisonListes(listeTypeDeQuestions, this.nbQuestions)\n let a = 0\n let n = 0\n for (let i = 0, texte, texteCorr, monQcm, cpt = 0; i < this.nbQuestions && cpt < 50;) {\n switch (listeTypeDeQuestions[i]) {\n case 'a^n':\n a = randint(2, 9)\n n = randint(-9, 9, [-1, 0, 1])\n texte = `$${a}^{${n}}$`\n texteCorr = `$${a}^{${n}}$ is positive because $${a}$ is positive.`\n this.autoCorrection[i] = {}\n this.autoCorrection[i].enonce = `${texte}\\n`\n this.autoCorrection[i].propositions = [\n {\n texte: 'Positive',\n statut: true\n },\n {\n texte: 'Negative',\n statut: false\n }\n ]\n break\n case '-a^n':\n a = randint(2, 9)\n n = 2 * randint(1, 4) // permet de n'avoir que des exposant positif, cas intéressant ici\n texte = `$-${a}^{${n}}$`\n texteCorr = `$-${a}^{${n}}$ is negative. Please note there are no parentheses around $-${a}$.`\n this.autoCorrection[i] = {}\n this.autoCorrection[i].enonce = `${texte}\\n`\n this.autoCorrection[i].propositions = [\n {\n texte: 'Positive',\n statut: false\n },\n {\n texte: 'Negative',\n statut: true\n }\n ]\n break\n case '(-a)^n':\n a = randint(2, 9)\n n = randint(-9, 9, [-1, 0, 1])\n texte = `$(-${a})^{${n}}$`\n if (n % 2 === 0) {\n texteCorr = `$(-${a})^{${n}}$ is positive because the exponent is even.`\n this.autoCorrection[i] = {}\n this.autoCorrection[i].enonce = `${texte}\\n`\n this.autoCorrection[i].propositions = [\n {\n texte: 'Positive',\n statut: true\n },\n {\n texte: 'Negative',\n statut: false\n }\n ]\n } else {\n texteCorr = `$(-${a})^{${n}}$ is negative because the exponent is odd.`\n this.autoCorrection[i] = {}\n this.autoCorrection[i].enonce = `${texte}\\n`\n this.autoCorrection[i].propositions = [\n {\n texte: 'Positive',\n statut: false\n },\n {\n texte: 'Negative',\n statut: true\n }\n ]\n }\n break\n case '-(-a)^n':\n a = randint(2, 9)\n n = randint(-9, 9, [-1, 0, 1])\n texte = `$-(-${a})^{${n}}$`\n if (n % 2 === 0) {\n texteCorr = `$-(-${a})^{${n}}$ is negative. The exponent is even so $(-${a})^{${n}}$ is positive and its opposite is negative.`\n this.autoCorrection[i] = {}\n this.autoCorrection[i].enonce = `${texte}\\n`\n this.autoCorrection[i].propositions = [\n {\n texte: 'Positive',\n statut: false\n },\n {\n texte: 'Negative',\n statut: true\n }\n ]\n } else {\n texteCorr = `$-(-${a})^{${n}}$ is positive. The exponent is odd so $(-${a})^{${n}}$ is negative and its opposite is positive.`\n this.autoCorrection[i] = {}\n this.autoCorrection[i].enonce = `${texte}\\n`\n this.autoCorrection[i].propositions = [\n {\n texte: 'Positive',\n statut: true\n },\n {\n texte: 'Negative',\n statut: false\n }\n ]\n }\n break\n }\n this.autoCorrection[i].options = { ordered: true }\n monQcm = propositionsQcm(this, i)\n if (this.questionJamaisPosee(i, a, n)) {\n this.listeQuestions.push(texte + monQcm.texte)\n this.listeCorrections.push(texteCorr)\n this.listeCanReponsesACompleter[i] = monQcm.texte\n this.listeCanEnonces[i] = 'What is the sign of' + texte + '?'\n this.correction = this.listeCorrections[i]\n i++\n }\n cpt++\n }\n listeQuestionsToContenu(this)\n }\n}\n"],"names":["amcReady","amcType","titre","interactifReady","interactifType","dateDePublication","uuid","ref","Exercice","listeTypeDeQuestions","combinaisonListes","a","n","i","texte","texteCorr","monQcm","cpt","randint","propositionsQcm","listeQuestionsToContenu"],"mappings":"qEAIY,MAACA,EAAW,GACXC,EAAU,UACVC,EAAQ,gCACRC,EAAkB,GAClBC,EAAiB,MACjBC,EAAoB,aAQpBC,EAAO,QACPC,EAAM,aACJ,cAA6BC,CAAS,CACnD,aAAe,CACb,MAAO,EACP,KAAK,SAAW,mDAChB,KAAK,YAAc,EACnB,KAAK,OAAS,EACd,KAAK,WAAa,EAClB,KAAK,WAAa,GAClB,KAAK,gBAAkBL,EACvB,KAAK,eAAiBC,EACtB,KAAK,QAAUH,EACf,KAAK,SAAWD,CACjB,CAED,iBAAmB,CACjB,KAAK,eAAiB,CAAE,EACxB,KAAK,iBAAmB,CAAE,EAC1B,KAAK,eAAiB,CAAE,EACxB,IAAIS,EAAuB,CAAC,MAAO,OAAQ,SAAU,SAAS,EAC9DA,EAAuBC,EAAkBD,EAAsB,KAAK,WAAW,EAC/E,IAAIE,EAAI,EACJC,EAAI,EACR,QAASC,EAAI,EAAGC,EAAOC,EAAWC,EAAQC,EAAM,EAAGJ,EAAI,KAAK,aAAeI,EAAM,IAAK,CACpF,OAAQR,EAAqBI,CAAC,EAAC,CAC7B,IAAK,MACHF,EAAIO,EAAQ,EAAG,CAAC,EAChBN,EAAIM,E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