HEX
Server: Apache
System: Linux vps.mmtprep.com 4.18.0-477.21.1.el8_8.x86_64 #1 SMP Thu Aug 10 13:51:50 EDT 2023 x86_64
User: mmtprep (1001)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/mmtprep/public_html/mathzen.mmtprep.com/assets/can3C11-fxMPmLV5.js.map
{"version":3,"file":"can3C11-fxMPmLV5.js","sources":["../../src/exercices/can/3e/can3C11.js"],"sourcesContent":["import { choice } from '../../../lib/outils/arrayOutils'\nimport { texNombre } from '../../../lib/outils/texNombre.js'\nimport { randint } from '../../../modules/outils.js'\nimport Exercice from '../../Exercice.js'\nimport FractionEtendue from '../../../modules/FractionEtendue.js'\nexport const titre = 'Simplifier des fractions ou des racines carrées'\nexport const interactifReady = true\nexport const interactifType = 'mathLive'\nexport const amcReady = true\nexport const amcType = 'AMCNum'\n\n/*!\n * @author Gilles Mora\n */\nexport const uuid = '59365'\nexport const ref = 'can3C11'\nexport default function SimplifieFractionOuRacinesCarrees () {\n  Exercice.call(this)\n  this.typeExercice = 'simple'\n  this.nbQuestions = 1\n  this.tailleDiaporama = 2\n  this.nouvelleVersion = function () {\n    let a, b, n, k, maFraction\n    let resultat\n    this.formatChampTexte = 'largeur15 inline'\n    switch (randint(1, 3)) {\n      case 1:// simplification de fraction\n        do {\n          a = randint(1, 12)\n          b = randint(2, 12, [a, a / 2, a / 3, a / 4, 11])\n        } while (Number.isInteger(a / b))\n        k = choice([2, 4, 6, 8, 9, 10])\n        maFraction = new FractionEtendue(a * k, b * k)\n        k = maFraction.n / maFraction.numIrred\n        resultat = maFraction.simplifie()\n        this.question = `Écrire $${maFraction.texFraction}$ sous la forme d'une fraction irréductible.`\n        this.correction = `$${maFraction.texFraction}=\\\\dfrac{${resultat.n}\\\\times ${k}}{${resultat.d}\\\\times ${k}} =${resultat.texFraction}$.`\n        this.reponse = resultat\n        this.formatInteractif = 'fraction'\n        break\n\n      case 2:// racine carrée ()^2 ou rac(0,04) par ex\n        n = choice(['a', 'b'])\n        if (n === 'a') {\n          a = randint(2, 3)\n          b = choice([2, 5, 6, 7, 10])\n          resultat = a * a * b\n          this.question = `Calculer $(${a}\\\\sqrt{${b}})^2$.`\n          this.correction = `$(${a}\\\\sqrt{${b}})^2=${a}^2\\\\times (\\\\sqrt{${b}})^2=${a * a}\\\\times ${b}=${a * a * b}$.`\n          this.reponse = resultat\n          this.formatInteractif = 'calcul'\n        }\n        if (n === 'b') {\n          a = randint(1, 9) / 10\n\n          resultat = a\n          this.question = `Calculer $\\\\sqrt{${texNombre(a ** 2)}}$.`\n          this.correction = `$${texNombre(a ** 2)}$ est le carré du nombre positif $${texNombre(a)}$ donc $\\\\sqrt{${texNombre(a ** 2)}}=${texNombre(a)}$.`\n          this.reponse = resultat\n          this.formatInteractif = 'calcul'\n        }\n        break\n\n      case 3:// somme racine carrée ()^2\n        a = randint(2, 10)\n        b = randint(2, 10, a)\n        resultat = (a - b) * (a - b)\n\n        if (a - b < 0) {\n          this.question = `Calculer $(\\\\sqrt{${a * a}}-\\\\sqrt{${b * b}})^2$.`\n          this.correction = `$(\\\\sqrt{${a * a}}-\\\\sqrt{${b * b}})^2=(${a}-${b})^2=(${a - b})^2=${(a - b) * (a - b)}$.`\n          this.reponse = resultat\n          this.formatInteractif = 'calcul'\n        } else {\n          this.question = `Calculer $(\\\\sqrt{${a * a}}-\\\\sqrt{${b * b}})^2$.`\n          this.correction = `$(\\\\sqrt{${a * a}}-\\\\sqrt{${b * b}})^2=(${a}-${b})^2=${a - b}^2=${(a - b) * (a - b)}$.`\n          this.reponse = resultat\n          this.formatInteractif = 'calcul'\n        }\n        break\n    }\n    this.canEnonce = this.question// 'Compléter'\n    this.canReponseACompleter = ''\n  }\n}\n"],"names":["titre","interactifReady","interactifType","amcReady","amcType","uuid","ref","SimplifieFractionOuRacinesCarrees","Exercice","a","b","k","maFraction","resultat","randint","choice","FractionEtendue","texNombre"],"mappings":"+DAKY,MAACA,EAAQ,kDACRC,EAAkB,GACl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