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/can2F02-isxUDdYA.js.map
{"version":3,"file":"can2F02-isxUDdYA.js","sources":["../../src/exercices/can/2e/can2F02.js"],"sourcesContent":["import { texteEnCouleur, miseEnEvidence } from '../../../lib/outils/embellissements'\nimport {\n  deprecatedTexFraction,\n  simplificationDeFractionAvecEtapes,\n  texFractionReduite\n} from '../../../lib/outils/deprecatedFractions.js'\nimport { ecritureAlgebrique, ecritureParentheseSiNegatif, reduireAxPlusB } from '../../../lib/outils/ecritures.js'\nimport Exercice from '../../Exercice.js'\nimport {\n  randint\n} from '../../../modules/outils.js'\nexport const titre = 'Calculer une image avec un quotient'\nexport const interactifReady = true\nexport const interactifType = 'mathLive'\n\n/**\n * Modèle d'exercice très simple pour la course aux nombres\n * @author Gilles Mora\n * Référence can2F02\n * Date de publication septembre 2021\n*/\nexport const uuid = '8b3a9'\nexport const ref = 'can2F02'\nexport default function CalculImageQuotient () {\n  Exercice.call(this) // Héritage de la classe Exercice()\n  this.typeExercice = 'simple' // Cette ligne est très importante pour faire faire un exercice simple !\n  this.formatChampTexte = 'largeur15 inline'\n  this.nbQuestions = 1\n  this.tailleDiaporama = 2\n  // Dans un exercice simple, ne pas mettre de this.listeQuestions = [] ni de this.consigne\n\n  this.nouvelleVersion = function () {\n    let a, c\n\n    a = randint(1, 5)\n    const b = randint(-5, 5, 0)\n    c = randint(1, 5)\n    const d = randint(-5, 5, [0, b])\n    const x = randint(-3, 3, 0)\n    while (c * x + d === 0) {\n      c = randint(1, 5)\n    }\n    while (a * x + b === 0) {\n      a = randint(1, 5)\n    }\n    const e = a * x + b\n    const f = c * x + d\n    const expression = `\\\\dfrac{${reduireAxPlusB(a, b)}}{${reduireAxPlusB(c, d)}}`\n    this.reponse = texFractionReduite(a * x + b, c * x + d)\n    this.question = `On considère la fonction $f$ définie par $f(x)= ${expression}$. <br>\n\n        Calculer $f(${x})$ sous la forme d'une fraction irréductible ou d'un entier le cas échéant.`\n    if (a === 1 && c === 1) {\n      this.correction = `$f(${x})=\\\\dfrac{${ecritureParentheseSiNegatif(x)}${ecritureAlgebrique(b)}}{${ecritureParentheseSiNegatif(x)}${ecritureAlgebrique(d)}}\n          =${miseEnEvidence(texFractionReduite(e, f))}$.<br><br>\n          `\n      this.correction += texteEnCouleur(` Mentalement : <br>\n          On calcule  le numérateur et le dénominateur pour $x=${x}$, soit\n           $ ${ecritureParentheseSiNegatif(x)}${ecritureAlgebrique(b)}=${a * x + b}$ et $ ${ecritureParentheseSiNegatif(x)}${ecritureAlgebrique(d)}=${c * x + d}$.<br>\n           On obtient le quotient que l'on simplifie éventuellement : $${deprecatedTexFraction(e, f)}${simplificationDeFractionAvecEtapes(e, f)}$.\n    `, 'blue')\n    }\n    if (a === 1 && c !== 1) {\n      this.correction = `$f(${x})=\\\\dfrac{${x}${ecritureAlgebrique(b)}}{${c}\\\\times${ecritureParentheseSiNegatif(x)}${ecritureAlgebrique(d)}}\n          =${miseEnEvidence(texFractionReduite(e, f))}$.<br><br>\n          `\n      this.correction += texteEnCouleur(` Mentalement : <br>\n          On calcule  le numérateur et le dénominateur pour $x=${x}$, soit\n           $ ${x}${ecritureAlgebrique(b)}=${a * x + b}$ et $${c}\\\\times ${ecritureParentheseSiNegatif(x)}${ecritureAlgebrique(d)}=${c * x + d}$.<br>\n           On obtient le quotient que l'on simplifie éventuellement : $${deprecatedTexFraction(e, f)}${simplificationDeFractionAvecEtapes(e, f)}$.\n    `, 'blue')\n    }\n    if (a !== 1 && c === 1) {\n      this.correction = `$f(${x})=\\\\dfrac{${a}\\\\times${ecritureParentheseSiNegatif(x)}${ecritureAlgebrique(b)}}{${ecritureParentheseSiNegatif(x)}${ecritureAlgebrique(d)}}\n          =${miseEnEvidence(texFractionReduite(e, f))}$.<br><br>\n          `\n      this.correction += texteEnCouleur(` Mentalement : <br>\n          On calcule  le numérateur et le dénominateur pour $x=${x}$, soit\n           $${a}\\\\times ${ecritureParentheseSiNegatif(x)}${ecritureAlgebrique(b)}=${a * x + b}$ et $ ${x}${ecritureAlgebrique(d)}=${c * x + d}$.<br>\n           On obtient le quotient que l'on simplifie éventuellement : $${deprecatedTexFraction(e, f)}${simplificationDeFractionAvecEtapes(e, f)}$.\n    `, 'blue')\n    }\n    if (a !== 1 && c !== 1) {\n      this.correction = `$f(${x})=\\\\dfrac{${a}\\\\times${ecritureParentheseSiNegatif(x)}${ecritureAlgebrique(b)}}{${c}\\\\times${ecritureParentheseSiNegatif(x)}${ecritureAlgebrique(d)}}\n          =${miseEnEvidence(texFractionReduite(e, f))}$.<br><br>\n          `\n      this.correction += texteEnCouleur(` Mentalement : <br>\n          On calcule  le numérateur et le dénominateur pour $x=${x}$, soit\n           $${a}\\\\times ${ecritureParentheseSiNegatif(x)}${ecritureAlgebrique(b)}=${a * x + b}$ et $${c}\\\\times ${ecritureParentheseSiNegatif(x)}${ecritureAlgebrique(d)}=${c * x + d}$.<br>\n           On obtient le quotient que l'on simplifie éventuellement : $${deprecatedTexFraction(e, f)}${simplificationDeFractionAvecEtapes(e, f)}$.\n    `, 'blue')\n    }\n    this.canEnonce = this.question// 'Compléter'\n    this.canReponseACompleter = ''\n  }\n}\n"],"names":["titre","interactifReady","interactifType","uuid","ref","CalculImageQuotient","Exercice","a","c","randint","b","d","x","e","f","expression","reduireAxPlusB","texFractionReduite","ecritureParentheseSiNegatif","ecritureAlgebrique","miseEnEvidence","texteEnCouleur","deprecatedTexFraction","simplificationDeFractionAvecEtapes"],"mappings":"kJAWY,MAACA,EAAQ,sCACRC,EAAkB,GAClBC,EAAiB,WAQjBC,EAAO,QACPC,EAAM,UACJ,SAASC,GAAuB,CAC7CC,EAAS,KAAK,IAAI,EAClB,KAAK,aAAe,SACpB,KAAK,iBAAmB,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