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/c3C23-E8YsjO2_.js.map
{"version":3,"file":"c3C23-E8YsjO2_.js","sources":["../../src/exercices/c3/c3C23.js"],"sourcesContent":["import { choice } from '../../lib/outils/arrayOutils'\nimport Exercice from '../Exercice.js'\nimport { randint } from '../../modules/outils.js'\nimport FractionEtendue from '../../modules/FractionEtendue.js'\nexport const titre = 'Opérations simples avec des fractions'\nexport const interactifReady = true\nexport const interactifType = 'mathLive'\n\nexport const dateDeModifImportante = '27/01/2022'\n\n/**\n * Somme ou différence de deux fractions de même dénominateur simple, produit par un entier\n * @author Rémi Angot\n * Référence c3c23\n*/\nexport const uuid = '3a087'\nexport const ref = 'c3C23'\nexport default function CalculsFractionsSimples () {\n  Exercice.call(this)\n  this.typeExercice = 'simple'\n  this.formatInteractif = 'fractionEgale'\n  this.nbQuestions = 6\n  this.sup = 4\n  this.consigne = 'Calculer.'\n  this.tailleDiaporama = 4\n  this.version = 'c3'\n\n  this.nouvelleVersion = function () {\n    /* if (this.version === '6') {\n      this.sup = 4\n    } */\n    const den = choice([2, 3, 4, 5, 10])\n    let a = randint(1, 10, [den, 2 * den, 3 * den, 4 * den])\n    let b = randint(1, 10, [den, 2 * den, 3 * den, 4 * den])\n    const operation = (this.sup === 1) ? '+' : (this.sup === 2) ? '-' : (this.sup === 3) ? 'x' : (this.sup === 4) ? choice(['+', '-']) : choice(['+', '-', 'x'])\n    // Le premier terme de la soustraction doit être le plus grand\n    if (operation === '-' && a < b) [a, b] = [b, a]\n    let num // numérateur de la réponse\n    if (['+', '-'].includes(operation)) {\n      this.question = `$\\\\dfrac{${a}}{${den}} ${operation} \\\\dfrac{${b}}{${den}} = $`\n      num = operation === '+' ? a + b : a - b\n      this.correction = `$\\\\dfrac{${a}}{${den}} ${operation} \\\\dfrac{${b}}{${den}} = \\\\dfrac{${num}}{${den}}$`\n      this.reponse = new FractionEtendue(num, den)\n    } else {\n      if (a === 1) a = randint(2, 10)\n      this.question = `$${a} \\\\times \\\\dfrac{${b}}{${den}} = $`\n      num = a * b\n      this.correction = `$${a} \\\\times \\\\dfrac{${b}}{${den}} = \\\\dfrac{${num}}{${den}}$`\n    }\n    this.reponse = new FractionEtendue(num, den)\n  }\n}\n"],"names":["titre","interactifReady","interactifType","dateDeModifImportante","uuid","ref","CalculsFractionsSimples","Exercice","den","choice","a","randint","b","operation","num","FractionEtendue"],"mappings":"6DAIY,MAACA,EAAQ,wCACRC,EAAkB,GAClBC,EAAiB,WAEjBC,EAAwB,aAOxBC,EAAO,QACPC,EAAM,QACJ,SAASC,GAA2B,CACjDC,EAAS,KAAK,IAAI,EAClB,KAAK,aAAe,SACpB,KAAK,iBAAmB,gBACxB,KAAK,YAAc,EACnB,KAAK,IAAM,EACX,KAAK,SAAW,YAChB,KAAK,gBAAkB,EACvB,KAAK,QAAU,KAEf,KAAK,gBAAkB,UAAY,CAIjC,MAAMC,EAAMC,EAAO,CAAC,EAAG,EAAG,EAAG,EAAG,EAAE,CAAC,EACnC,IAAIC,EAAIC,EAAQ,EAAG,GAAI,CAACH,EAAK,EAAIA,EAAK,EAAIA,EAAK,EAAIA,CAAG,CAAC,EACnDI,EAAID,EAAQ,EAAG,GAAI,CAACH,EAAK,EAAIA,EAAK,EAAIA,EAAK,EAAIA,CAAG,CAAC,EACvD,MAAMK,EAAa,KAAK,MAAQ,EAAK,IAAO,KAAK,MAAQ,EAAK,IAAO,KAAK,MAAQ,EAAK,IAAO,KAAK,MAAQ,EAAKJ,EAAO,CAAC,IAAK,GAAG,CAAC,EAAIA,EAAO,CAAC,IAAK,IAAK,GAAG,CAAC,EAEvJI,IAAc,KAAOH,EAAIE,IAAG,CAACF,EAAGE,CAAC,EAAI,CAACA,EAAGF,CAAC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