File: /home/mmtprep/public_html/mathzen.mmtprep.com/assets/2N32-6-jToUX2PG.js.map
{"version":3,"file":"2N32-6-jToUX2PG.js","sources":["../../src/exercices/2e/2N32-6.js"],"sourcesContent":["import { choice, combinaisonListes } from '../../lib/outils/arrayOutils'\nimport { ecritureAlgebrique, ecritureParentheseSiNegatif } from '../../lib/outils/ecritures'\nimport Exercice from '../deprecatedExercice.js'\nimport { listeQuestionsToContenu, randint } from '../../modules/outils.js'\n\nexport const titre = 'Developing Remarkable Identities with Square Roots'\n\n/**\n * 2N32-6\n * @author Stéphane Guyon\n * Relecture : Novembre 2021 par EE\n */\nexport const uuid = '91dc4'\nexport const ref = '2N32-6'\nexport default function IdentitesRemarquablesEtRacineCarree () {\n Exercice.call(this) // Héritage de la classe Exercice()\n this.titre = titre\n this.consigne = 'Perform the following calculations.'\n this.nbQuestions = 5\n this.nbCols = 2\n this.nbColsCorr = 2\n this.sup = 1 //\n\n this.nouvelleVersion = function () {\n this.listeQuestions = [] // Liste de questions\n this.listeCorrections = [] // Liste de questions corrigées\n const typesDeQuestionsDisponibles = [1, 2, 3, 4, 5]; let typesDeQuestions\n const listeTypeDeQuestions = combinaisonListes(typesDeQuestionsDisponibles, this.nbQuestions)\n for (let i = 0, a, b, c, d, texte, texteCorr, cpt = 0; i < this.nbQuestions && cpt < 50;) {\n typesDeQuestions = listeTypeDeQuestions[i]\n switch (typesDeQuestions) {\n // Case by case, we define the type of numbers we want\n // How many digits? What values?\n case 1:\n\n a = randint(2, 6) * choice([-1, 1])\n b = randint(2, 11, [4, 8, 9])\n c = randint(2, 6)\n\n texte = `$\\\\left(${a} \\\\sqrt{${b}} +${c}\\\\right)^{2}$`\n texteCorr = `$\\\\left(${a} \\\\sqrt{${b}} +${c}\\\\right)^{2}=\\\\left(${a} \\\\sqrt{${b}} \\\\right)^{2}+2\\\\times ${ecritureParentheseSiNegatif(a)}\\\\sqrt{${b}}\\\\times ${c}+${c}^{2}$<br>$\\\\phantom{\\\\left(${a} \\\\sqrt{${b}} +${c}\\\\right)^{2}}=${ecritureParentheseSiNegatif(a)}^{2 }\\\\times ${b} ${ecritureAlgebrique(2 * a * c)}\\\\sqrt{${b}}+ ${c * c}$<br>$\\\\phantom{\\\\left(${a} \\\\sqrt{${b}} +${c}\\\\right)^{2}}=${a * a * b}${ecritureAlgebrique(2 * a * c)}\\\\sqrt {${b}}+${c * c}$<br>$\\\\phantom{\\\\left(${a} \\\\sqrt{${b}} +${c}\\\\right)^{2}}=${a * a * b + c * c}${ecritureAlgebrique(2 * a * c)}\\\\sqrt{${b}}$`\n\n break\n\n case 2:\n\n a = randint(2, 6) * choice([-1, 1])\n b = randint(2, 11, [4, 8, 9])\n c = randint(2, 6)\n\n texte = `$\\\\left(${a} \\\\sqrt{${b}} -${c}\\\\right)^{2}$`\n texteCorr = `$\\\\left(${a} \\\\sqrt{${b}} -${c}\\\\right)^{2}=\\\\left(${a} \\\\sqrt{${b}} \\\\right)^{2}-2\\\\times ${ecritureParentheseSiNegatif(a)}\\\\sqrt{${b}}\\\\times ${c}+${c}^{2}$<br>$\\\\phantom{\\\\left(${a} \\\\sqrt{${b}} +${c}\\\\right)^{2}}=${ecritureParentheseSiNegatif(a)}^{2 }\\\\times ${b} ${ecritureAlgebrique(-2 * a * c)}\\\\sqrt{${b}}+ ${c * c}$<br>$\\\\phantom{\\\\left(${a} \\\\sqrt{${b}} +${c}\\\\right)^{2}}=${a * a * b}${ecritureAlgebrique(-2 * a * c)}\\\\sqrt {${b}}+${c * c}$<br>$\\\\phantom{\\\\left(${a} \\\\sqrt{${b}} +${c}\\\\right)^{2}}=${a * a * b + c * c}${ecritureAlgebrique(-2 * a * c)}\\\\sqrt{${b}}$`\n break\n case 3:\n a = randint(2, 6) * choice([-1, 1])\n b = randint(2, 11, [4, 8, 9])\n c = randint(2, 6)\n\n texte = `$\\\\left(${a} \\\\sqrt{${b}} +${c}\\\\right)\\\\left(${a} \\\\sqrt{${b}}-${c}\\\\right)$`\n texteCorr = `$\\\\left(${a} \\\\sqrt{${b}} +${c}\\\\right)\\\\left(${a} \\\\sqrt{${b}}-${c}\\\\right)=\\\\left(${a} \\\\sqrt{${b}} \\\\right )^{2}-${c}^{2}$<br>$\\\\phantom{\\\\left(${a} \\\\sqrt{${b}} +${c}\\\\right)\\\\left(${a} \\\\sqrt{${b}}-${c} \\\\right)}=${ecritureParentheseSiNegatif(a)}^{2}\\\\times ${b}-${c * c}$<br>$\\\\phantom{\\\\left(${a} \\\\sqrt{${b}} +${c}\\\\right)\\\\left(${a} \\\\sqrt{${b}}-${c}\\\\right)}=${a * a * b}-${c * c}$<br>$\\\\phantom{\\\\left(${a} \\\\sqrt{${b}} +${c}\\\\right)\\\\left(${a} \\\\sqrt{ ${b}}-${c}\\\\right)}=${a * a * b - c * c}$`\n\n break\n case 4:\n\n a = randint(2, 5) * choice([-1, 1])\n b = randint(3, 11, [4, 8, 9])\n c = randint(2, 5)\n d = randint(3, 11, [4, 8, 9, b, b * 2, b * 3, b * 5])\n\n texte = `$\\\\left(${a} \\\\sqrt{${b}} +${c}\\\\sqrt{${d}}\\\\right)^{2}$`\n texteCorr = `$\\\\left(${a} \\\\sqrt{${b}} +${c}\\\\sqrt{${d}}\\\\right)^{2}=\\\\left(${a} \\\\sqrt{${b}} \\\\right)^{2}+2 \\\\times ${ecritureParentheseSiNegatif(a)}\\\\sqrt{${b}}\\\\times ${c}\\\\sqrt{${d}}+\\\\left(${c}\\\\sqrt{${d}}\\\\right)^{2}$<br>$\\\\phantom{\\\\left(${a} \\\\sqrt{${b}} +${c}\\\\sqrt{${d}}\\\\right)^{2}}=${ecritureParentheseSiNegatif(a)}^{2}\\\\times ${b} +2\\\\times ${ecritureParentheseSiNegatif(a)}\\\\times \\\\sqrt{ ${b}}\\\\times ${ecritureParentheseSiNegatif(c)} \\\\times\\\\sqrt{${d}}+ ${c * c}\\\\times ${d}$<br>$\\\\phantom{\\\\left(${a} \\\\sqrt{${b}} +${c}\\\\sqrt{${d}}\\\\right)^{2}}=${a * a * b} ${ecritureAlgebrique(2 * a * c)}\\\\sqrt{${b}\\\\times${d}} ${ecritureAlgebrique(c * c * d)}$<br>$\\\\phantom{\\\\left(${a} \\\\sqrt{${b}} +${c}\\\\sqrt{${d}}\\\\right)^{2}}=${a * a * b + c * c * d}${ecritureAlgebrique(2 * a * c)}\\\\sqrt{${b * d}}$`\n\n break\n case 5:\n a = randint(2, 6) * choice([-1, 1])\n b = randint(2, 11, [4, 8, 9])\n c = randint(2, 6)\n d = randint(2, 11, [4, 8, 9])\n texte = `$\\\\left(${a} \\\\sqrt{${b}} +${c}\\\\sqrt{${d}}\\\\right)\\\\left(${a} \\\\sqrt{${b}}-${c}\\\\sqrt{${d}}\\\\right)$`\n texteCorr = `$\\\\left(${a} \\\\sqrt{${b}} +${c}\\\\sqrt{${d}}\\\\right)\\\\left(${a} \\\\sqrt{${b}}-${c}\\\\sqrt{${d}}\\\\right)=\\\\left(${a} \\\\sqrt{${b}} \\\\right)^{2}-\\\\left(${c}\\\\sqrt{${d}}\\\\right)^{2}$<br>$\\\\phantom{\\\\left( ${a} \\\\sqrt{${b}} +${c}\\\\sqrt{${d}}\\\\right)\\\\left(${a} \\\\sqrt{${b}}-${c}\\\\sqrt{${d}}\\\\right)}=${ecritureParentheseSiNegatif(a)}^{2}\\\\times ${b}-${c}^{2}\\\\times ${ecritureParentheseSiNegatif(d)}$<br>$\\\\phantom{\\\\left(${a} \\\\sqrt{${b}} +${c}\\\\sqrt{${d}}\\\\right)\\\\left(${a} \\\\sqrt{${b}}-${c}\\\\sqrt{${d}}\\\\right)}=${a * a * b}-${c * c * d}$<br>$\\\\phantom{\\\\left(${a} \\\\sqrt{${b}} +${c}\\\\sqrt{${d} }\\\\right)\\\\left(${a} \\\\sqrt{${b}}-${c}\\\\sqrt{${d}}\\\\right)}=${a * a * b - c * c * d}$`\n\n break\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}\n"],"names":["titre","uuid","ref","IdentitesRemarquablesEtRacineCarree","Exercice","typesDeQuestionsDisponibles","typesDeQuestions","listeTypeDeQuestions","combinaisonListes","i","a","b","c","d","texte","texteCorr","cpt","randint","choice","ecritureParentheseSiNegatif","ecritureAlgebrique","listeQuestionsToContenu"],"mappings":"mFAKY,MAACA,EAAQ,qDAORC,EAAO,QACPC,EAAM,SACJ,SAASC,GAAuC,CAC7DC,EAAS,KAAK,IAAI,EAClB,KAAK,MAAQJ,EACb,KAAK,SAAW,sCAChB,KAAK,YAAc,EACnB,KAAK,OAAS,EACd,KAAK,WAAa,EAClB,KAAK,IAAM,EAEX,KAAK,gBAAkB,UAAY,CACjC,KAAK,eAAiB,CAAE,EACxB,KAAK,iBAAmB,CAAE,EAC1B,MAAMK,EAA8B,CAAC,EAAG,EAAG,EAAG,EAAG,CAAC,EAAG,IAAIC,EACzD,MAAMC,EAAuBC,EAAkBH,EAA6B,KAAK,WAAW,EAC5F,QAASI,EAAI,EAAGC,EAAGC,EAAGC,EAAGC,EAAGC,EAAOC,EAAWC,EAAM,EAAGP,EAAI,KAAK,aAAeO,EAAM,IAAK,CAExF,OADAV,EAAmBC,EAAqBE,CAAC,EACjCH,EAAgB,CAGtB,IAAK,GAEHI,EAAIO,EAAQ,EAAG,CAAC,EAAIC,EAAO,CAAC,GAAI,CAAC,CAAC,EAClCP,EAAIM,EAAQ,EAAG,GAAI,CAAC,EAAG,EAAG,CAAC,CAAC,EAC5BL,EAAIK,EAAQ,EAAG,CAAC,EAEhBH,EAAQ,WAAWJ,CAAC,WAAWC,CAAC,MAAMC,CAAC,gBACvCG,EAAY,WAAWL,CAAC,WAAWC,CAAC,MAAMC,CAAC,uBAAuBF,CAAC,WAAWC,CAAC,2BAA2BQ,EAA4BT,CAAC,CAAC,UAAUC,CAAC,YAAYC,CAAC,IAAIA,CAAC,8BAA8BF,CAAC,WA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