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/2F11-1-rLC2zWSY.js.map
{"version":3,"file":"2F11-1-rLC2zWSY.js","sources":["../../src/exercices/2e/2F11-1.js"],"sourcesContent":["import { choice, combinaisonListes } from '../../lib/outils/arrayOutils'\nimport { deprecatedTexFraction } from '../../lib/outils/deprecatedFractions.js'\nimport { ecritureParentheseSiNegatif } from '../../lib/outils/ecritures'\nimport { arrondi } from '../../lib/outils/nombres'\nimport { texNombre } from '../../lib/outils/texNombre'\nimport { miseEnEvidence } from '../../lib/outils/embellissements'\nimport Exercice from '../deprecatedExercice.js'\nimport { context } from '../../modules/context.js'\nimport { listeQuestionsToContenu, randint } from '../../modules/outils.js'\nimport { ajouteChampTexteMathLive } from '../../lib/interactif/questionMathLive.js'\nimport FractionEtendue from '../../modules/FractionEtendue.js'\nimport { setReponse } from '../../lib/interactif/gestionInteractif.js'\n\nexport const titre = 'Determine the image of a number by a reference function'\nexport const interactifReady = true\nexport const interactifType = 'mathLive'\nexport const amcReady = true\nexport const amcType = 'AMCNum'\n\n// Les exports suivants sont optionnels mais au moins la date de publication semble essentielle\nexport const dateDePublication = '18/01/2022' // La date de publication initiale au format 'jj/mm/aaaa' pour affichage temporaire d'un tag\n// export const dateDeModifImportante = '24/10/2021' // Une date de modification importante au format 'jj/mm/aaaa' pour affichage temporaire d'un tag\n\n/**\n *\n * @author Degrange Mathieu\n *\n */\nexport const uuid = 'b6cc0'\nexport const ref = '2F11-1'\nexport default function ImageFonctionsRefs () {\n  Exercice.call(this)\n  this.nbQuestions = 8\n\n  this.besoinFormulaireCaseACocher = ['Square function']\n  this.besoinFormulaire2CaseACocher = ['Cube function']\n  this.besoinFormulaire3CaseACocher = ['Square root function']\n  this.besoinFormulaire4CaseACocher = ['Reverse function']\n  this.sup = true\n  this.sup2 = true\n  this.sup3 = true\n  this.sup4 = true\n  this.can = false // course aux nombres, si true les calculs pourront être fait de tête\n\n  this.nbCols = 2\n  this.nbColsCorr = 2\n  this.tailleDiaporama = 3\n\n  this.nouvelleVersion = function () {\n    this.listeQuestions = []\n    this.listeCorrections = []\n    this.autoCorrection = []\n\n    const typeQuestionsDisponibles = []\n    this.sup && typeQuestionsDisponibles.push('square')\n    this.sup2 && typeQuestionsDisponibles.push('cube')\n    this.sup3 && typeQuestionsDisponibles.push('square root')\n    this.sup4 && typeQuestionsDisponibles.push('reverse')\n\n    if (typeQuestionsDisponibles.length === 0) {\n      typeQuestionsDisponibles.push('square')\n    }\n\n    const listeTypeQuestions = combinaisonListes(typeQuestionsDisponibles, this.nbQuestions)\n    const listePhrases = combinaisonListes([0, 1], this.nbQuestions)\n    for (let i = 0, texte, texteCorr, nombre, solution, nom, cpt = 0; i < this.nbQuestions && cpt < 50;) {\n      // choice of function name: f, g, h, p, q, r if three questions or less, otherwise f_1, g_1, h_1, p_1, q_1, r_1, s_1, f_2, g_2, h_2, ...\n      nom = ['f', 'g', 'h', 'p', 'q', 'r', 's', 't'][i % 8]\n      this.nbQuestions > 3 && (nom += '_' + parseInt(1 + i / 8))\n      switch (listeTypeQuestions[i]) {\n        case 'square':\n          nombre = randint(-10, 10, [0, 1])\n          solution = nombre * nombre\n          solution = new FractionEtendue(solution, 1)\n          texteCorr = `$${nom}(${nombre}) = ${ecritureParentheseSiNegatif(nombre)}^2 = ${ecritureParentheseSiNegatif(nombre)} \\\\times ${ecritureParentheseSiNegatif(nombre)} = ${miseEnEvidence(solution)}$`\n          break\n        case 'cube':\n          nombre = randint(-5, 5, [0, 1])\n          solution = nombre * nombre * nombre\n          solution = new FractionEtendue(solution, 1)\n          texteCorr = `$${nom}(${nombre}) = ${ecritureParentheseSiNegatif(nombre)}^3 = ${ecritureParentheseSiNegatif(nombre)} \\\\times ${ecritureParentheseSiNegatif(nombre)} \\\\times ${ecritureParentheseSiNegatif(nombre)} = ${ecritureParentheseSiNegatif(nombre * nombre)} \\\\times ${ecritureParentheseSiNegatif(nombre)} = ${miseEnEvidence(solution)}$`\n          break\n        case 'square root':\n          solution = randint(1, 10)\n          solution = new FractionEtendue(solution, 1)\n          nombre = solution * solution\n          texteCorr = `$${nom}(${nombre}) = ${miseEnEvidence(`\\\\sqrt{${nombre}}`)} = ${miseEnEvidence(solution)} $ because $ ${ecritureParentheseSiNegatif(solution)}^2 = ${nombre} $`\n          break\n        case 'reverse':\n          if (this.can) {\n            nombre = choice([1, 2, 4, 5, 10])\n          } else {\n            nombre = this.can ? choice([1, 2, 4, 5, 10]) : Math.pow(2, randint(0, 5)) * Math.pow(5, randint(0, 5))\n          }\n          Math.random() < 0.25 && (nombre = arrondi(1 / nombre, 6))\n          Math.random() < 0.5 && (nombre *= -1)\n          solution = new FractionEtendue(1, nombre)\n          texteCorr = `$${nom}(${texNombre(nombre)}) = ${miseEnEvidence(deprecatedTexFraction(1, nombre))} = ${miseEnEvidence(texNombre(solution))}$`\n          break\n      }\n      const phrase = listePhrases[i] ? `$${nom}(${texNombre(nombre)})$` : `the image of $${texNombre(nombre)}$ by the function $${nom}$`\n      listePhrases[i] && (texteCorr += `<br>The image of $${texNombre(nombre)}$ by the function $${nom}$ is therefore $${miseEnEvidence(texNombre(solution))}$.`)\n      texte = `Let $${nom}$ be the ${listeTypeQuestions[i]} function.<br>Calculate ${phrase}. `\n      texte += ajouteChampTexteMathLive(this, i, 'inline width20')\n\n      // If the question has never been asked, we save it\n      if (this.questionJamaisPosee(i, listeTypeQuestions[i], nombre)) { // <- laisser le i et ajouter toutes les variables qui rendent les exercices différents (par exemple a, b, c et d)\n        this.listeQuestions.push(texte)\n        this.listeCorrections.push(texteCorr)\n        // setAnswer(this, i, solution, { digits: 6, decimals: listTypeQuestions[i] === 'inverse' ? 6: 0, sign: true })\n        setReponse(this, i, solution, { formatInteractif: 'fractionEqual' })\n        i++\n      }\n      cpt++\n    }\n    listeQuestionsToContenu(this)\n    if (!context.isHtml) {\n      this.canEnonce = this.listeQuestions[0]\n      this.correction = this.listeCorrections[0]\n      this.canReponseACompleter = ''\n    }\n  }\n}\n"],"names":["titre","interactifReady","interactifType","amcReady","amcType","dateDePublication","uuid","ref","ImageFonctionsRefs","Exercice","typeQuestionsDisponibles","listeTypeQuestions","combinaisonListes","listePhrases","i","texte","texteCorr","nombre","solution","nom","cpt","randint","FractionEtendue","ecritureParentheseSiNegatif","miseEnEvidence","choice","arrondi","texNombre","deprecatedTexFraction","phrase","ajouteChampTexteMathLive","setReponse","listeQuestionsToContenu","context"],"mappings":"mLAaY,MAACA,EAAQ,0DACRC,EAAkB,GAClBC,EAAiB,WACjBC,EAAW,GACXC,EAAU,SAGVC,EAAoB,aAQpBC,EAAO,QACPC,EAAM,SACJ,SAASC,GAAsB,CAC5CC,EAAS,KAAK,IAAI,EAClB,KAAK,YAAc,EAEnB,KAAK,4BAA8B,CAAC,iBAAiB,EACrD,KAAK,6BAA+B,CAAC,eAAe,EACpD,KAAK,6BAA+B,CAAC,sBAAsB,EAC3D,KAAK,6BAA+B,CAAC,kBAAkB,EACvD,KAAK,IAAM,GACX,KAAK,KAAO,GACZ,KAAK,KAAO,GACZ,KAAK,KAAO,GACZ,KAAK,IAAM,GAEX,KAAK,OAAS,EACd,KAAK,WAAa,EAClB,KAAK,gBAAkB,EAEvB,KAAK,gBAAkB,UAAY,CACjC,KAAK,eAAiB,CAAE,EACxB,KAAK,iBAAmB,CAAE,EAC1B,KAAK,eAAiB,CAAE,EAExB,MAAMC,EAA2B,CAAE,EACnC,KAAK,KAAOA,EAAyB,KAAK,QAAQ,EAClD,KAAK,MAAQA,EAAyB,KAAK,MAAM,EACjD,KAAK,MAAQA,EAAyB,KAAK,aAAa,EACxD,KAAK,MAAQA,EAAyB,KAAK,SAAS,EAEhDA,EAAyB,SAAW,GACtCA,EAAyB,KAAK,QAAQ,EAGxC,MAAMC,E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