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/5S14-SBGfBqZX.js.map
{"version":3,"file":"5S14-SBGfBqZX.js","sources":["../../src/exercices/5e/5S14.js"],"sourcesContent":["import { choice } from '../../lib/outils/arrayOutils'\nimport { listeDeNotes, unMoisDeTemperature } from '../../lib/outils/aleatoires'\nimport { joursParMois } from '../../lib/outils/dateEtHoraires'\nimport Exercice from '../Exercice.js'\nimport { OutilsStats } from '../../modules/outilsStat.js'\nimport { listeQuestionsToContenu, randint } from '../../modules/outils.js'\nimport { ajouteChampTexteMathLive } from '../../lib/interactif/questionMathLive.js'\nimport FractionEtendue from '../../modules/FractionEtendue.js'\nimport { context } from '../../modules/context.js'\nimport { setReponse } from '../../lib/interactif/gestionInteractif.js'\n\nexport const interactifReady = true\nexport const interactifType = 'mathLive'\nexport const amcReady = true\nexport const amcType = 'AMCHybride'\nexport const titre = 'Calculate averages'\n\nexport const dateDeModifImportante = '28/02/2022'\n\n/**\n * Calcul de moyennes de série statistiques\n * @author Jean-Claude Lhote et Guillaume Valmont (Interactif et AMC par EE)\n * 12/01/2023 : Mickael Guironnet Refactoring\n * Référence 5S14\n */\nexport const uuid = 'ab91d'\nexport const ref = '5S14'\nexport default function CalculerDesMoyennes () {\n  Exercice.call(this) // Héritage de la classe Exercice()\n  this.titre = titre\n  this.consigne = ''\n  this.nbQuestions = 1\n  this.spacing = 1\n  this.spacingCorr = 2.5\n  this.nbColsCorr = 1\n  this.nbCols = 1\n  this.sup = 1\n\n  this.nouvelleVersion = function () {\n    this.listeQuestions = [] // Liste de questions\n    this.listeCorrections = [] // Liste de questions corrigées\n    this.autoCorrection = []\n\n    for (let i = 0, reponse, nombreTemperatures, temperatures, texte, texteCorr, cpt = 0; i < this.nbQuestions && cpt < 50;) {\n      if (this.sup === 1) { // ici on trie des notes\n        const nombreNotes = choice([8, 10, 12])\n        const notes = listeDeNotes(nombreNotes, randint(0, 7), randint(13, 20)) // on récupère une liste de notes (série brute)\n        texte = OutilsStats.texteNotes(notes)\n        texte += '<br>Calculate the average of the grades.'\n        const [, somme] = OutilsStats.computeMoyenne(notes)\n        texteCorr = OutilsStats.texteCorrMoyenneNotes(notes, somme, nombreNotes)\n        reponse = new FractionEtendue(somme, nombreNotes)\n      } else if (this.sup === 2) { // ici on relève des températures\n        const mois = randint(1, 12)\n        const annee = randint(1980, 2019)\n        const temperaturesDeBase = [3, 5, 9, 13, 19, 24, 26, 25, 23, 18, 10, 5]\n        nombreTemperatures = joursParMois(mois, annee)\n        temperatures = unMoisDeTemperature(temperaturesDeBase[mois - 1], mois, annee) // série brute de un mois de température\n        texte = OutilsStats.texteTemperatures(annee, mois, temperatures)\n        texte += '<br>Calculate the average temperature.'\n        const [, somme] = OutilsStats.computeMoyenne(temperatures)\n        texteCorr = '<br>' + OutilsStats.texteCorrMoyenneNotes(temperatures, somme, temperatures.length, 'temperatures')\n        reponse = new FractionEtendue(somme, nombreTemperatures)\n      } else { // pointures des membres du club de foot (moyenne pondérée)\n        const nombreNotes = 5 // 5 colonnes\n        const min = randint(33, 35)\n        const max = randint(min + nombreNotes, min + nombreNotes + 3)\n        const notes = listeDeNotes(nombreNotes, min, max, true).sort() // on récupère une série de notes (pointures) distinctes et ordonnées\n        const effectifs = listeDeNotes(nombreNotes, randint(2, 4), randint(8, 12)) // on récupère une liste d'effectifs\n        const pointures = Array.from(notes, (x, i) => [x, effectifs[i]])\n        const effectifTotal = pointures.reduce((accumulator, currentValue) => {\n          return accumulator + currentValue[1]\n        }, 0)\n        texte = OutilsStats.texteSalaires(pointures, [], 'sizes')\n        texte += '<br>Calculate the average shoe size of the members of this club.'\n        const [, somme, effectif] = OutilsStats.computeMoyenneTirages2D(pointures)\n        texteCorr = '<br>' + OutilsStats.texteCorrMoyenneNotes(pointures, somme, effectif, 'sizes')\n        reponse = new FractionEtendue(somme, effectifTotal)\n      }\n      if (this.interactif) {\n        texte += ' (We will give the exact value in decimal or fractional writing)<br>'\n        texte += ajouteChampTexteMathLive(this, i, 'width25 inline')\n        setReponse(this, i, reponse, {\n          formatInteractif: 'fractionEqual',\n          digits: 5,\n          digitsNum: 3,\n          digitsDen: 2,\n          signe: true\n        })\n      }\n      if (context.isAmc) {\n        reponse = reponse.simplifie()\n        this.autoCorrection[i] = {\n          enonce: texte,\n          options: { multicols: true, barreseparation: true }, // facultatif. Par défaut, multicols est à false. Ce paramètre provoque un multicolonnage (sur 2 colonnes par défaut) : pratique quand on met plusieurs AMCNum. !!! Attention, cela ne fonctionne pas, nativement, pour AMCOpen. !!!\n          propositions: [\n            {\n              type: 'AMCOpen',\n              propositions: [{\n                texte: texteCorr,\n                statut: 3\n              }]\n            },\n            {\n              type: 'AMCNum',\n              propositions: [{\n                texte: '',\n                statut: '',\n                reponse: {\n                  texte: 'Result in the form of an irreducible fraction',\n                  valeur: [reponse],\n                  param: {\n                    signe: false,\n                    approx: 0\n                  }\n                }\n              }]\n            }\n          ]\n        }\n      }\n      if (this.listeQuestions.indexOf(texte) === -1) { // Si la question n'a jamais été posée, on en créé une autre\n        this.listeQuestions.push(texte)\n        this.listeCorrections.push(texteCorr)\n        i++\n      }\n      cpt++\n    }\n    listeQuestionsToContenu(this)\n  }\n  this.besoinFormulaireNumerique = ['Type of series', 3, '1: Series of notes\\n2: Series of temperatures\\n3: Series of sizes (weighted average)']\n}\n"],"names":["interactifReady","interactifType","amcReady","amcType","titre","dateDeModifImportante","uuid","ref","CalculerDesMoyennes","Exercice","i","reponse","nombreTemperatures","temperatures","texte","texteCorr","cpt","nombreNotes","choice","notes","listeDeNotes","randint","OutilsStats","somme","FractionEtendue","mois","annee","temperaturesDeBase","joursParMois","unMoisDeTemperature","min","max","effectifs","pointures","x","effectifTotal","accumulator","currentValue","effectif","ajouteChampTexteMathL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