File: /home/mmtprep/public_html/mathzen.mmtprep.com/assets/2N32-1-O2Jfh4XR.js.map
{"version":3,"file":"2N32-1-O2Jfh4XR.js","sources":["../../src/exercices/2e/2N32-1.js"],"sourcesContent":["import { combinaisonListes } from '../../lib/outils/arrayOutils'\nimport Exercice from '../deprecatedExercice.js'\nimport { texteGras } from '../../lib/format/style'\nimport { listeQuestionsToContenu, randint } from '../../modules/outils.js'\nimport { ajouteChampTexteMathLive } from '../../lib/interactif/questionMathLive.js'\nimport { setReponse } from '../../lib/interactif/gestionInteractif.js'\nexport const titre = 'Justify the existence of a square root'\nexport const interactifReady = true\nexport const interactifType = 'mathLive'\nexport const dateDeModifImportante = '15/11/2023'\n/**\n * 2N32-1, ex 2N10\n * @author Stéphane Guyon et Gilles Mora (interactif + modif correction)\n */\nexport const uuid = '55cc0'\nexport const ref = '2N32-1'\nexport default function ExistenceDUneRacineCarree () {\n Exercice.call(this) // Héritage de la classe Exercice()\n this.titre = titre\n\n this.nbQuestions = 5\n this.nbCols = 2\n this.nbColsCorr = 2\n this.sup = 1 //\n this.correctionDetaillee = true\n this.correctionDetailleeDisponible = true\n this.nouvelleVersion = function () {\n if (!this.interactif) {\n this.consigne = ' Does the proposed number exist? Justify.'\n } else {\n this.consigne = 'Does the proposed number exist? <br>Answer Yes or No.'\n }\n this.listeQuestions = [] // Liste de questions\n this.listeCorrections = [] // Liste de questions corrigées\n const typesDeQuestionsDisponibles = [1, 2, 3, 4, 5, 6, 7, 8]; let typesDeQuestions//,\n const listeTypeDeQuestions = combinaisonListes(typesDeQuestionsDisponibles, this.nbQuestions)\n let a; let b; let c; let d; let e; let f; let g; let h; let j; let k = 0\n for (let i = 0, texte, texteCorr, reponse, corr, cpt = 0; i < this.nbQuestions && cpt < 50;) {\n typesDeQuestions = listeTypeDeQuestions[i]\n const corrDetail = `${texteGras('Definition')}: $\\\\sqrt{a}$ is the positive number whose square is $a$.<br>It therefore checks $\\\\sqrt{a}\\\\times \\\\sqrt{a}=a$. <br>As $a$ is a square, it is a positive number.<br>So, the square root of a negative number does not exist. <br><br>${texteGras('Method')}: To show that a square root exists, simply show that the number under the radical is positive. <br><br>`\n\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 a = randint(2, 9)\n corr = `Since $\\\\sqrt{${a}} \\\\geqslant 0$, then $\\\\sqrt{\\\\sqrt{${a}}}$ exists. `\n texte = `$\\\\sqrt{\\\\sqrt{${a}}}$`\n if (this.correctionDetaillee) {\n texteCorr = corrDetail\n texteCorr += corr\n } else {\n texteCorr = corr\n }\n reponse = ['Yes', 'Yes', 'YES']\n\n break\n case 2:\n b = randint(2, 9) * (-1)\n texte = `$\\\\sqrt{${b}}$`\n reponse = ['No', 'No', 'NO']\n corr = `$${b}$ is a negative number so $\\\\sqrt{${b}}$ does not exist. `\n if (this.correctionDetaillee) {\n texteCorr = corrDetail\n texteCorr += corr\n } else {\n texteCorr = corr\n }\n break\n case 3:\n c = randint(2, 9) * (-1)\n d = c * c\n texte = `$\\\\sqrt{\\\\left(${c}\\\\right)^{2}}$`\n reponse = ['Yes', 'Yes', 'YES']\n corr = `We have $\\\\left(${c}\\\\right)^{2}=\\\\left(${c}\\\\right)\\\\times \\\\left(${c}\\\\right)=${d}$. <br>As $${d}$ is a positive number, $\\\\sqrt{\\\\left(${c}\\\\right)^{2}}$ exists. `\n if (this.correctionDetaillee) {\n texteCorr = corrDetail\n texteCorr += corr\n } else {\n texteCorr = corr\n }\n\n break\n case 4:\n e = randint(2, 9)\n texte = `$-\\\\sqrt{${e}}$`\n reponse = ['Yes', 'Yes', 'YES']\n corr = `${e} is a positive number so $-\\\\sqrt{${e}}$ exists.<br>${texteGras('Noticed')}: The sign $-$ being placed in front of the radical symbol, the number $-\\\\sqrt{${e}}$ is therefore negative. `\n if (this.correctionDetaillee) {\n texteCorr = corrDetail\n texteCorr += corr\n } else {\n texteCorr = corr\n }\n break\n case 5:\n f = randint(2, 9) * (-1)\n g = f * f\n texte = `$\\\\sqrt{-\\\\left(${f}\\\\right)^{2}}$`\n reponse = ['No', 'No', 'NO']\n corr = `We have $-\\\\left(${f}\\\\right)^{2}=-\\\\left(${f}\\\\right)\\\\times \\\\left(${f}\\\\right)=-${g}$.<br>Like $ -${g}$ is a negative number, $\\\\sqrt{-\\\\left(${f}\\\\right)^{2}}$ does not exist. `\n if (this.correctionDetaillee) {\n texteCorr = corrDetail\n texteCorr += corr\n } else {\n texteCorr = corr\n }\n break\n case 6:\n h = randint(2, 3)\n texte = `$\\\\sqrt{${h}-\\\\pi}$`\n reponse = ['No', 'No', 'NO']\n corr = `Since $\\\\pi>3$ then $${h}-\\\\pi$ is a negative number. <br>Thus, $\\\\sqrt{${h}-\\\\pi}$ does not exist. `\n if (this.correctionDetaillee) {\n texteCorr = corrDetail\n texteCorr += corr\n } else {\n texteCorr = corr\n }\n break\n\n case 7:\n k = randint(4, 8)\n texte = `$\\\\sqrt{${k}-\\\\pi}$`\n reponse = ['Yes', 'Yes', 'YES']\n corr = `Since $\\\\pi\\\\approx 3.14$ then $${k}-\\\\pi$ is a positive number.<br>Thus, $\\\\sqrt{${k}-\\\\pi}$ exists. `\n if (this.correctionDetaillee) {\n texteCorr = corrDetail\n texteCorr += corr\n } else {\n texteCorr = corr\n }\n break\n\n case 8:\n j = randint(2, 12)\n texte = `$\\\\sqrt{-${j}^{2}}$`\n reponse = ['No', 'No', 'NO']\n corr = `We have $-${j}^{2}=-${j}\\\\times ${j}=-${j * j}$. <br>As $-${j * j}$ is a negative real, $\\\\sqrt{-${j}^{2}}$ does not exist. `\n if (this.correctionDetaillee) {\n texteCorr = corrDetail\n texteCorr += corr\n } else {\n texteCorr = corr\n }\n break\n }\n setReponse(this, i, reponse, { formatInteractif: 'text' })\n if (this.interactif) {\n texte += ajouteChampTexteMathLive(this, i, 'largeur01 inline')\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","interactifReady","interactifType","dateDeModifImportante","uuid","ref","ExistenceDUneRacineCarree","Exercice","typesDeQuestionsDisponibles","typesDeQuestions","listeTypeDeQuestions","combinaisonListes","a","b","c","d","e","f","g","h","j","k","i","texte","texteCorr","reponse","corr","cpt","corrDetail","texteGras","randint","setReponse","ajouteChampTexteMathLive","listeQuestionsToContenu"],"mappings":"oHAMY,MAACA,EAAQ,yCACRC,EAAkB,GAClBC,EAAiB,WACjBC,EAAwB,aAKxBC,EAAO,QACPC,EAAM,SACJ,SAASC,GAA6B,CACnDC,EAAS,KAAK,IAAI,EAClB,KAAK,MAAQP,EAEb,KAAK,YAAc,EACnB,KAAK,OAAS,EACd,KAAK,WAAa,EAClB,KAAK,IAAM,EACX,KAAK,oBAAsB,GAC3B,KAAK,8BAAgC,GACrC,KAAK,gBAAkB,UAAY,CAC5B,KAAK,WAGR,KAAK,SAAW,wDAFhB,KAAK,SAAW,4CAIlB,KAAK,eAAiB,CAAE,EACxB,KAAK,iBAAmB,CAAE,EAC1B,MAAMQ,EAA8B,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,CAAC,EAAG,IAAIC,EAClE,MAAMC,EAAuBC,EAAkBH,EAA6B,KAAK,WAAW,EAC5F,IAAII,EAAOC,EAAOC,EAAOC,EAAOC,EAAOC,EAAOC,EAAOC,EAAOC,EAAOC,EAAI,EACvE,QAASC,EAAI,EAAGC,EAAOC,EAAWC,EAASC,EAAMC,EAAM,EAAGL,EAAI,KAAK,aAAeK,EAAM,IAAK,CAC3FlB,EAAmBC,EAAqBY,CAAC,EACzC,MAAMM,EAAa,GAAGC,EAAU,YAAY,CAAC,yOAAyOA,EAAU,QAAQ,CAAC,2GAEzS,OAAQpB,EAAgB,CAGtB,IAAK,GACHG,EAAIkB,EAAQ,EAAG,CAAC,EAChBJ,EAAO,iBAAiBd,CAAC,wCAAwCA,CAAC,e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