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/5R10-0EQw9cHO.js.map
{"version":3,"file":"5R10-0EQw9cHO.js","sources":["../../src/exercices/5e/5R10.js"],"sourcesContent":["import { choice, combinaisonListes } from '../../lib/outils/arrayOutils'\nimport { ecritureParentheseSiMoins } from '../../lib/outils/ecritures'\nimport { arrondi, nombreDeChiffresDansLaPartieEntiere } from '../../lib/outils/nombres.js'\nimport { texNombre } from '../../lib/outils/texNombre.js'\nimport Exercice from '../Exercice.js'\nimport { context } from '../../modules/context.js'\nimport { listeQuestionsToContenu, randint } from '../../modules/outils.js'\nimport { setReponse } from '../../lib/interactif/gestionInteractif.js'\nimport { ajouteChampTexteMathLive } from '../../lib/interactif/questionMathLive.js'\n\nexport const interactifReady = true\n\nexport const amcReady = true\nexport const amcType = 'AMCNum'\nexport const interactifType = 'mathLive'\nexport const titre = 'Find the missing term of a sum of relative numbers'\n\n/**\n * Additions à trou dans les relatifs\n *\n *  @author Jean-Claude Lhote à partir de CM000 de Rémi Angot\n */\nexport const uuid = '61b4a'\nexport const ref = '5R10'\nexport default function TermeInconnuDeSomme () {\n  Exercice.call(this) // Héritage de la classe Exercice()\n  this.nbQuestions = 5\n  this.sup = 1\n  this.sup3 = 1\n  this.sup2 = 20 // additions|additions à trous|soustractions|soustractions à trous|mélange sans trou|mélange avec trou\n  this.titre = titre\n  this.consigne = 'Calculate the missing term.'\n  this.spacing = 2\n  this.interactif = false\n  this.interactifReady = interactifReady\n  this.interactifType = interactifType\n  this.amcType = amcType\n  this.amcReady = amcReady\n\n  this.nouvelleVersion = function () {\n    this.listeQuestions = [] // Liste de questions\n    this.listeCorrections = [] // Liste de questions corrigées\n    this.autoCorrection = []\n    const typesDeQuestionsDisponibles = [1, 2, 3, 4]\n    const listeTypeDeQuestions = combinaisonListes(typesDeQuestionsDisponibles, this.nbQuestions)\n    let decimal\n    let inconnue\n    if (this.sup === 1) {\n      decimal = 1\n    } else {\n      decimal = 10\n    }\n    for (let i = 0, a, b, texte, texteCorr, cpt = 0; i < this.nbQuestions && cpt < 50;) {\n      if (!context.isAmc) {\n        a = arrondi(randint(4 * decimal, this.sup2 * decimal) / decimal, 1)\n        b = arrondi(randint(2 * decimal, this.sup2 * decimal) / decimal, 1)\n      } else {\n        a = arrondi(randint(4 * decimal, 20 * decimal) / decimal, 1)\n        b = arrondi(randint(2 * decimal, 20 * decimal) / decimal, 1)\n      }\n      if (this.interactif) inconnue = ajouteChampTexteMathLive(this, i, 'inline width15 nospacebefore')\n      else if (this.sup3 === 1) {\n        inconnue = ' $\\\\ldots\\\\ldots$'\n      } else {\n        inconnue = ` $${choice(['x', 'y', 'z', 'a', 't', 'n'])}$`\n      }\n\n      switch (listeTypeDeQuestions[i]) {\n        case 1:\n          texte = `$${texNombre(a)} + $` + inconnue + `$ = ${texNombre(b)}$`\n          texteCorr = `$${texNombre(a)} + ${ecritureParentheseSiMoins(texNombre(b - a))} = ${texNombre(b)}$`\n          break\n\n        case 2:\n          texte = inconnue + `$ + ${texNombre(a)} = ${texNombre(b)}$`\n          texteCorr = `$${ecritureParentheseSiMoins(texNombre(b - a))} + ${texNombre(a)} = ${texNombre(b)}$`\n          break\n\n        case 3:\n          texte = `$${texNombre(b)} = $` + inconnue + `$ + ${texNombre(a)}$`\n          texteCorr = `$${texNombre(b)}=${ecritureParentheseSiMoins(texNombre(b - a))} + ${texNombre(a)}$`\n          break\n\n        case 4:\n          if (this.interactif && !context.isAmc) {\n            texte = `$${texNombre(b)} = ${texNombre(a)} + $${ajouteChampTexteMathLive(this, i, 'inline largeur15')}`\n          } else {\n            texte = `$${texNombre(b)} = ${texNombre(a)} + $` + inconnue\n          }\n          texteCorr = `$${texNombre(b)}=${texNombre(a)} + ${ecritureParentheseSiMoins(texNombre(b - a))}$`\n          break\n      }\n      texteCorr += `. Indeed: $${texNombre(b)}-${texNombre(a)}=${texNombre(b - a)}$`\n\n      if (this.questionJamaisPosee(i, a, b)) {\n        this.listeQuestions.push(texte)\n        this.listeCorrections.push(texteCorr)\n        setReponse(this, i, arrondi(b - a, 2), {\n          signe: true,\n          digits: Math.max(2, nombreDeChiffresDansLaPartieEntiere(b - a)),\n          decimals: 0\n        })\n        i++\n      }\n      cpt++\n    }\n    listeQuestionsToContenu(this)\n  }\n  this.besoinFormulaireNumerique = ['Difficulty level', 2, '1: Whole numbers\\n2: Decimal numbers']\n  this.besoinFormulaire2Numerique = ['Maximum value', 9999]\n  this.besoinFormulaire3Numerique = ['Type of equalities', 2, '1: Hole equalities\\n2: Equations']\n}\n"],"names":["interactifReady","amcReady","amcType","interactifType","titre","uuid","ref","TermeInconnuDeSomme","Exercice","listeTypeDeQuestions","combinaisonListes","decimal","inconnue","i","a","b","texte","texteCorr","cpt","context","arrondi","randint","ajouteChampTexteMathLive","choice","texNombre","ecritureParentheseSiMoins","setReponse","nombreDeChiffresDansLaPartieEntiere","listeQuestionsToContenu"],"mappings":"wHAUY,MAACA,EAAkB,GAElBC,EAAW,GACXC,EAAU,SACVC,EAAiB,WACjBC,EAAQ,qDAORC,EAAO,QACPC,EAAM,OACJ,SAASC,GAAuB,CAC7CC,EAAS,KAAK,IAAI,EAClB,KAAK,YAAc,EACnB,KAAK,IAAM,EACX,KAAK,KAAO,EACZ,KAAK,KAAO,GACZ,KAAK,MAAQJ,EACb,KAAK,SAAW,8BAChB,KAAK,QAAU,EACf,KAAK,WAAa,GAClB,KAAK,gBAAkBJ,EACvB,KAAK,eAAiBG,EACtB,KAAK,QAAUD,EACf,KAAK,SAAWD,EAEhB,KAAK,gBAAkB,UAAY,CACjC,KAAK,eAAiB,CAAE,EACxB,KAAK,iBAAmB,CAAE,EAC1B,KAAK,eAAiB,CAAE,EAExB,MAAMQ,EAAuBC,EADO,CAAC,EAAG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