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/6C13-wXjaRfh9.js.map
{"version":3,"file":"6C13-wXjaRfh9.js","sources":["../../src/exercices/6e/6C13.js"],"sourcesContent":["import { numAlpha } from '../../lib/outils/outilString.js'\nimport Exercice from '../Exercice.js'\nimport {\n  listeQuestionsToContenuSansNumero,\n  randint,\n  gestionnaireFormulaireTexte\n} from '../../modules/outils.js'\nimport choisirExpressionNumerique from '../5e/_choisirExpressionNumerique.js'\nexport const titre = 'Translate sentences into calculations and vice versa'\nexport const dateDeModifImportante = '08/05/2023'\n/**\n * Mettre en relation un calcul, une traduction en français, une expression, un résultat, pour les décliner dans différents exercices.\n * Exercice sur le vocabulaire : somme,différence, produit, quotient...\n * @author Jean-Claude Lhote\n * Référence 6C13\n * Relecture : Novembre 2021 par EE\n */\nexport const uuid = 'ed0ea'\nexport const ref = '6C13'\nexport default function VocabulaireEtOperations () {\n  Exercice.call(this) // Héritage de la classe Exercice()\n  this.titre = titre\n  this.consigne = ''\n  this.nbQuestions = 5\n  this.nbCols = 2\n  this.nbColsCorr = 2\n  this.sup = 4\n  this.sup2 = false\n  this.spacing = 2\n  this.listeAvecNumerotation = false\n\n  this.nouvelleVersion = function () {\n    let decimal\n    let expf, expn, expc, resultats\n    const listeTypeDeQuestions = gestionnaireFormulaireTexte({ saisie: this.sup, max: 3, defaut: 4, melange: 4, nbQuestions: this.nbQuestions })\n\n    this.listeQuestions = [] // Liste de questions\n    this.listeCorrections = [] // Liste de questions corrigées\n    if (this.sup2) decimal = 10 ** randint(1, 2)\n    else decimal = 1\n\n    for (\n      let i = 0, texte, texteCorr, cpt = 0;\n      i < this.nbQuestions && cpt < 50;\n\n    ) {\n      resultats = choisirExpressionNumerique(1, decimal)\n      expf = resultats[0]\n      expn = resultats[1]\n      expc = resultats[2]\n      texte = ''\n      texteCorr = ''\n      switch (listeTypeDeQuestions[i]) {\n        case 1:\n          texte +=\n            numAlpha(i) +\n            'Translate the sentence using a calculation (you are not asked to perform this calculation):'\n          expf = 'l' + expf.substring(1)\n          texte += `${expf}.`\n          expf = 'L' + expf.substring(1)\n          texteCorr += numAlpha(i) + `${expf} is written as ${expn}.`\n          break\n        case 2:\n          if (expn.indexOf('Or') > 0) { expn = expn.substring(0, expn.indexOf('Or')) } // on supprime la deuxième expression fractionnaire\n          texte +=\n            numAlpha(i) + 'Translate the calculation with a sentence in French:'\n          texte += `${expn}.`\n          expf = 'l' + expf.substring(1)\n          texteCorr += numAlpha(i) + `${expn} is ${expf}.`\n          break\n        case 3:\n          texte +=\n            numAlpha(i) +\n            'Translate the sentence with a calculation and perform this calculation:'\n          expf = 'l' + expf.substring(1)\n          texte += `${expf}.`\n          expf = 'L' + expf.substring(1)\n          texteCorr += numAlpha(i) + `${expf} is written ${expn}.<br>`\n          texteCorr += `${expc}`\n          break\n      }\n      texte += this.nbQuestions - 1 === i ? '<br>' : ''\n      if (this.listeQuestions.indexOf(texte) === -1) {\n        // If the question has never been asked, we create another one\n        this.listeQuestions.push(texte)\n        this.listeCorrections.push(texteCorr)\n        i++\n      }\n      cpt++\n    }\n    listeQuestionsToContenuSansNumero(this)\n  }\n  this.besoinFormulaireTexte = [\n    'Type of questions (numbers separated by hyphens)',\n    '1: Sentence -> Calculation\\n2: Calculation -> Sentence\\n3: Sentence -> Calculation + result\\n4: Mixture'\n  ]\n  this.besoinFormulaire2CaseACocher = ['Decimals', false]\n}\n"],"names":["titre","dateDeModifImportante","uuid","ref","VocabulaireEtOperations","Exercice","decimal","expf","expn","expc","resultats","listeTypeDeQuestions","gestionnaireFormulaireTexte","randint","i","texte","texteCorr","cpt","choisirExpressionNumerique","numAlpha","listeQuestionsToContenuSansNumero"],"mappings":"gIAQY,MAACA,EAAQ,uDACRC,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