File: /home/mmtprep/public_html/mathzen.mmtprep.com/assets/HPC104-7PPbePMR.js.map
{"version":3,"file":"HPC104-7PPbePMR.js","sources":["../../src/exercices/HP/HPC104.js"],"sourcesContent":["import { all, create } from 'mathjs'\nimport { MatriceCarree } from '../../lib/mathFonctions/MatriceCarree.js'\nimport { combinaisonListes } from '../../lib/outils/arrayOutils'\nimport { ecritureParentheseSiNegatif } from '../../lib/outils/ecritures'\nimport { lettreIndiceeDepuisChiffre } from '../../lib/outils/outilString.js'\nimport { listeQuestionsToContenu } from '../../modules/outils.js'\nimport Exercice from '../Exercice'\n\nconst math = create(all)\n\nexport const titre = 'Calcul de déterminant'\n\n// Les exports suivants sont optionnels mais au moins la date de publication semble essentielle\nexport const dateDePublication = '25/10/2021' // La date de publication initiale au format 'jj/mm/aaaa' pour affichage temporaire d'un tag\nexport const dateDeModifImportante = '24/10/2021' // Une date de modification importante au format 'jj/mm/aaaa' pour affichage temporaire d'un tag\n\n/**\n * Description didactique de l'exercice\n * @author Maxime Nguyen\n * Référence HPC104\n */\nexport const uuid = '2806f'\nexport const ref = 'HPC104'\nexport default class nomExercice extends Exercice {\n constructor () {\n super()\n this.titre = titre\n this.consigne = 'Calcul du déterminant d\\'une matrice carrée'\n this.nbQuestions = 3\n\n this.besoinFormulaireNumerique = ['Difficulté', 2, '1 : Matrice 2x2\\n2 : Matrice 3x3'] // le paramètre sera numérique de valeur max 3 (le 3 en vert)\n this.sup = 2 // Valeur du paramètre par défaut\n // Remarques : le paramètre peut aussi être un texte avec : this.besoinFormulaireTexte = [texte, tooltip]\n // il peut aussi être une case à cocher avec : this.besoinFormulaireCaseACocher = [texte] (dans ce cas, this.sup = true ou this.sup = false)\n\n this.nbCols = 2\n this.nbColsCorr = 2\n this.tailleDiaporama = 3\n this.video = ''\n }\n\n nouvelleVersion () {\n this.listeQuestions = []\n this.listeCorrections = []\n this.autoCorrection = []\n let listeTypeDeQuestionsDisponibles\n if (this.sup === 1) { // On ajuste la difficulté selon le paramètre.\n listeTypeDeQuestionsDisponibles = ['type1']\n } else { // ne jamais laisser de cas où rien n'est assigné car si quelqu'un modifie le this.sup dans l'url, on se retrouve avec une erreur\n // Si c'est pas 1, c'est 2 !\n listeTypeDeQuestionsDisponibles = ['type2']\n }\n const listeTypeQuestions = combinaisonListes(listeTypeDeQuestionsDisponibles, this.nbQuestions)\n for (let i = 0, coefficients, texte, texteCorr, cpt = 0; i < this.nbQuestions && cpt < 50;) {\n coefficients = [-9, -8, -7, -6, -5, -4, -3, -3, -2, -2, -2, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 5, 6, 7, 8, 9]\n switch (listeTypeQuestions[i]) {\n case 'type1': {\n const n = 2\n const m = 2\n const table = []\n const nommatrice = lettreIndiceeDepuisChiffre(i + 1)\n let coef = 0\n for (let i = 0; i < n; i++) {\n const ligne = []\n for (let j = 0; j < m; j++) {\n coef = math.pickRandom(coefficients)\n ligne.push(coef)\n }\n table.push(ligne)\n }\n const matrice = new MatriceCarree(table)\n\n texte = `Calculer le déterminant de la matrice $${nommatrice} = ${matrice.toTex()}$.` // Les questions sont modifiées en fonction de la difficulté\n texteCorr = ''\n texteCorr += `On calcule $det(${nommatrice}) = ${ecritureParentheseSiNegatif(table[0][0])} \\\\times ${ecritureParentheseSiNegatif(table[1][1])} - ${ecritureParentheseSiNegatif(table[1][0])} \\\\times ${ecritureParentheseSiNegatif(table[0][1])} = ${matrice.determinant()}$.`\n break\n }\n case 'type2': {\n const n = 3\n const m = 3\n const table = []\n const nommatrice = lettreIndiceeDepuisChiffre(i + 1)\n let coef = 0\n for (let i = 0; i < n; i++) {\n const ligne = []\n for (let j = 0; j < m; j++) {\n coef = math.pickRandom(coefficients)\n ligne.push(coef)\n }\n table.push(ligne)\n }\n const matrice = new MatriceCarree(table)\n texte = `Calculer le déterminant de la matrice $${nommatrice} = ${matrice.toTex()}$.` // Les questions sont modifiées en fonction de la difficulté\n texteCorr = ''\n texteCorr += `On calcule $det(${nommatrice}) = ${matrice.determinant()}$.`\n break\n }\n }\n // Si la question n'a jamais été posée, on l'enregistre\n if (this.questionJamaisPosee(i, texte)) { // <- laisser le i et ajouter toutes les variables qui rendent les exercices différents (par exemple a, b, c et d)\n this.listeQuestions.push(texte)\n this.listeCorrections.push(texteCorr)\n i++\n }\n cpt++\n }\n listeQuestionsToContenu(this)\n }\n}\n"],"names":["math","create","all","titre","dateDePublication","dateDeModifImportante","uuid","ref","nomExercice","Exercice","listeTypeDeQuestionsDisponibles","listeTypeQuestions","combinaisonListes","i","coefficients","texte","texteCorr","cpt","table","nommatrice","lettreIndiceeDepuisChiffre","coef","ligne","j","matrice","MatriceCarree","ecritureParentheseSiNegatif","listeQuestionsToContenu"],"mappings":"yOAQA,MAAMA,EAAOC,EAAOC,CAAG,EAEVC,EAAQ,wBAGRC,EAAoB,aACpBC,EAAwB,aAOxBC,EAAO,QACPC,EAAM,SACJ,MAAMC,UAAoBC,CAAS,CAChD,aAAe,CACb,MAAO,EACP,KAAK,MAAQN,EACb,KAAK,SAAW,6CAChB,KAAK,YAAc,EAEnB,KAAK,0BAA4B,CAAC,aAAc,EAAG;AAAA,gBAAkC,EACrF,KAAK,IAAM,EAIX,KAAK,OAAS,EACd,KAAK,WAAa,EAClB,KAAK,gBAAkB,EACvB,KAAK,MAAQ,EACd,CAED,iBAAmB,CACjB,KAAK,eAAiB,CAAE,EACxB,KAAK,iBAAmB,CAAE,EAC1B,KAAK,eAAiB,CAAE,EACxB,IAAIO,EACA,KAAK,MAAQ,EACfA,EAAkC,CAAC,OAAO,EAG1CA,EAAkC,CAAC,OAAO,EAE5C,MAAMC,EAAqBC,EAAkBF,EAAiC,KAAK,WAAW,EAC9F,QAASG,EAAI,EAAGC,EAAcC,EAAOC,EAAWC,EAAM,EAAGJ,EAAI,KAAK,aAAeI,EAAM,IAAK,CAE1F,OADAH,EAAe,CAAC,GAAI,GAAI,GAAI,GAAI,GA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