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/techno1P8-9FSB5tfw.js.map
{"version":3,"file":"techno1P8-9FSB5tfw.js","sources":["../../src/exercices/techno1/techno1P8.js"],"sourcesContent":["import { combinaisonListes } from '../../lib/outils/arrayOutils'\nimport { texteGras } from '../../lib/format/style'\nimport { texNombre } from '../../lib/outils/texNombre.js'\nimport Exercice from '../Exercice.js'\nimport { listeQuestionsToContenu, randint } from '../../modules/outils.js'\nimport { min } from 'mathjs'\nexport const titre = 'Union et Intersection de proportions'\n\n// Les exports suivants sont optionnels mais au moins la date de publication semble essentielle\nexport const dateDePublication = '26/06/2022' // La date de publication initiale au format 'jj/mm/aaaa' pour affichage temporaire d'un tag\nexport const dateDeModifImportante = '24/10/2021' // Une date de modification importante au format 'jj/mm/aaaa' pour affichage temporaire d'un tag\n\n/**\n * Description didactique de l'exercice\n * @author Stéphane Guyon\n * Référence\n*/\nexport const uuid = '1aad3'\nexport const ref = 'techno1P8'\nexport default class nomExercice extends Exercice {\n  constructor () {\n    super()\n    this.titre = titre\n    this.consigne = ''\n    this.nbQuestions = 1 // Nombre de questions par défaut\n    this.nbCols = 2 // Uniquement pour la sortie LaTeX\n    this.nbColsCorr = 2 // Uniquement pour la sortie LaTeX\n    this.video = '' // Id YouTube ou url\n  }\n\n  nouvelleVersion () {\n    this.listeQuestions = [] // Liste de questions\n    this.listeCorrections = [] // Liste de questions corrigées\n    this.autoCorrection = []\n\n    const typeQuestionsDisponibles = ['type1', 'type2'] // On créé 3 types de questions\n\n    const listeTypeQuestions = combinaisonListes(typeQuestionsDisponibles, this.nbQuestions) // Tous les types de questions sont posés mais l'ordre diffère à chaque \"cycle\"\n    for (let i = 0, effectif, belote, tarot, inter, union, texte, texteCorr, cpt = 0; i < this.nbQuestions && cpt < 50;) { // Boucle principale où i+1 correspond au numéro de la question\n      switch (listeTypeQuestions[i]) { // Suivant le type de question, le contenu sera différent\n        case 'type1':\n          effectif = randint(22, 80)\n          belote = randint(10, effectif - 10)\n          tarot = randint(10, effectif - 10)\n          inter = randint(3, min(belote, tarot) - 1)\n          union = belote + tarot - inter\n          texte = `Dans un club du 3ème age comprenant $${effectif}$ personnes, $${belote}$ jouent à la belote régulièrement,\n          $${tarot}$ jouent au tarot et $${inter}$ d'entre eux pratiquent chacun des\n          deux jeux de cartes. <br>\n         Quelle est la proportion de personnes du club qui jouent  au tarot ${texteGras('ou')} à la belote?` // Le LateX entre deux symboles $, les variables dans des ${ }\n          texteCorr = `On note :<br>\n          $\\\\quad\\\\bullet\\\\quad p_T$ la proportion de personnes du club qui jouent au tarot.<br>\n          $\\\\quad\\\\bullet\\\\quad p_B$ la proportion de personnes du club qui jouent à la belote.<br>\n          $\\\\quad\\\\bullet\\\\quad p_{T\\\\cup B}$ la proportion de personnes du club qui jouent au tarot ${texteGras('ou')} à la belote.<br>\n          $\\\\quad\\\\bullet\\\\quad p_{T\\\\cap B}$ la proportion de personnes du club qui jouent au tarot ${texteGras('et')} à la belote.<br>\n        La population de référence est l'ensemble des membres du club, son effectif est $${effectif}$.<br>\n        <br>D'après le cours, pour calculer la proportion d'une sous-population dans une population, on calcule :<br>\n        <br>$p=\\\\dfrac{\\\\text{effectif de la sous-population}}{\\\\text{effectif de la population de référence}}$<br>\n        <br>On a donc :  $p_T=\\\\dfrac{${tarot}}{${effectif}}\\\\quad;\\\\quad p_B=\\\\dfrac{${belote}}{${effectif}} \\\\quad;\\\\quad p_{T\\\\cap B}=\\\\dfrac{${inter}}{${effectif}}$<br>\n          On sait que  $p_{T\\\\cup B} = p_T + p_B -  p_{T\\\\cap B}$.<br>\n         Ce qui revient, en appliquant les données de l'énoncé, à écrire :<br>\n         $p_{T\\\\cup B} = \\\\dfrac{${tarot}}{${effectif}} +\\\\dfrac{${belote}}{${effectif}}-\\\\dfrac{${inter}}{${effectif}}=\\\\dfrac{${union}}{${effectif}} \\\\approx ${texNombre(union / effectif, 2)}$<br>\n         Il y a donc environ $${texNombre(100 * union / effectif, 0)}\\\\%$ de personnes du club qui jouent à la belote et au tarot dans ce club.<br>\n         `\n          break\n        case 'type2':\n          effectif = randint(22, 80)\n          belote = randint(10, effectif - 10)\n          tarot = randint(10, effectif - 10)\n          inter = randint(3, min(belote, tarot) - 1)\n          union = belote + tarot - inter\n          texte = `Dans un club du 3ème age comprenant $${effectif}$ personnes, $${belote}$ jouent à la belote régulièrement,\n          $${tarot}$ jouent au tarot et $${union}$ d'entre eux pratiquent au moins un des\n          deux jeux de cartes. <br>\n         Quelle est la proportion de personnes du club qui jouent au tarot ${texteGras('et')} à la belote ?` // Le LateX entre deux symboles $, les variables dans des ${ }\n          texteCorr = `On note :<br>\n          $\\\\quad\\\\bullet\\\\quad p_T$ la proportion de personnes du club qui jouent au tarot.<br>\n          $\\\\quad\\\\bullet\\\\quad p_B$ la proportion de personnes du club qui jouent à la belote.<br>\n          $\\\\quad\\\\bullet\\\\quad p_{T\\\\cup B}$ la proportion de personnes du club qui jouent au tarot ${texteGras('ou')} à la belote.<br>\n          $\\\\quad\\\\bullet\\\\quad p_{T\\\\cap B}$ la proportion de personnes du club qui jouent au tarot ${texteGras('et')} à la belote.<br>\n        La population de référence est l'ensemble des membres du club, son effectif est $${effectif}$.<br>\n       <br>\n        D'après le cours, pour calculer la proportion d'une sous-population dans une population, on calcule :<br>\n        <br>$p=\\\\dfrac{\\\\text{effectif de la sous-population}}{\\\\text{effectif de la population de référence}}$<br>\n        <br>On a donc :  $p_T=\\\\dfrac{${tarot}}{${effectif}}\\\\quad ; \\\\quad p_B=\\\\dfrac{${belote}}{${effectif}}\\\\quad ; \\\\quad p_{T\\\\cup B}=\\\\dfrac{${union}}{${effectif}}$<br>\n         On note\n         On sait que  $p_{T\\\\cup B} = p_T + p_B -  p_{T\\\\cap B}$.<br>\n         Ce qui revient, en appliquant les données de l'énoncé, à écrire :\n         $ \\\\dfrac{${union}}{${effectif}}= \\\\dfrac{${tarot}}{${effectif}} +\\\\dfrac{${belote}}{${effectif}} - p_{T\\\\cap B}$<br>\n         $p_{T\\\\cap B}=\\\\dfrac{${tarot}}{${effectif}} +\\\\dfrac{${belote}}{${effectif}}-\\\\dfrac{${union}}{${effectif}} =\\\\dfrac{${inter}}{${effectif}} \\\\approx ${texNombre(inter / effectif, 2)}$<br>\n         Il y a donc environ $${texNombre(100 * inter / effectif, 0)}\\\\%$ de personnes du club qui jouent à la belote et au tarot dans ce club.<br>\n         `\n          break\n      }\n      // Si la question n'a jamais été posée, on l'enregistre\n      if (this.questionJamaisPosee(i, texte)) { // <- 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        i++\n      }\n      cpt++\n    }\n    listeQuestionsToContenu(this) // On envoie l'exercice à la fonction de mise en page\n  }\n}\n"],"names":["titre","dateDePublication","dateDeModifImportante","uuid","ref","nomExercice","Exercice","listeTypeQuestions","combinaisonListes","i","effectif","belote","tarot","inter","union","texte","texteCorr","cpt","randint","min","texteGras","texNombre","listeQuestionsToContenu"],"mappings":"gHAMY,MAACA,EAAQ,uCAGRC,EAAoB,aACpBC,EAAwB,aAOxBC,EAAO,QACPC,EAAM,YACJ,MAAMC,UAAoBC,CAAS,CAChD,aAAe,CACb,MAAO,EACP,KAAK,MAAQN,EACb,KAAK,SAAW,GAChB,KAAK,YAAc,EACnB,KAAK,OAAS,EACd,KAAK,WAAa,EAClB,KAAK,MAAQ,EACd,CAED,iBAAmB,CACjB,KAAK,eAAiB,CAAE,EACxB,KAAK,iBAAmB,CAAE,EAC1B,KAAK,eAAiB,CAAE,EAIxB,MAAMO,EAAqBC,EAFM,CAAC,QAAS,OAAO,EAEqB,KAAK,WAAW,EACvF,QAASC,EAAI,EAAGC,EAAUC,EAAQC,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