File: /home/mmtprep/public_html/mathzen.mmtprep.com/assets/6N14-RcIANKKX.js.map
{"version":3,"file":"6N14-RcIANKKX.js","sources":["../../src/exercices/6e/6N14.ts"],"sourcesContent":["import { combinaisonListes } from '../../lib/outils/arrayOutils'\nimport Exercice from '../Exercice.js'\nimport { mathalea2d } from '../../modules/2dGeneralites.js'\nimport { context } from '../../modules/context.js'\nimport { listeQuestionsToContenu, randint } from '../../modules/outils.js'\n\nimport { fraction } from '../../modules/fractions.js'\nexport const titre = 'Representing fractions'\nexport const amcReady = true\nexport const amcType = 'AMCHybride'\nexport const dateDeModifImportante = '07/03/2023' // Une date de modification importante au format 'jj/mm/aaaa' pour affichage temporaire d'un tag\n\n/**\n * Représenter des fractions simples avec des disques partagés de façon adéquate.\n * @author Jean-Claude Lhote (Modifié par EE : rajout d'un paramètre)\n * 6N14\n * Relecture : Novembre 2021 par EE\n */\nexport const uuid = '87479'\nexport const ref = '6N14'\nexport default function RepresenterUneFraction (this: any) {\n Exercice.call(this) // Héritage de la classe Exercice()\n this.consigne = ''\n this.nbQuestions = 4\n this.nbCols = 2\n this.nbColsCorr = 2\n this.sup = 3\n\n this.nouvelleVersion = function () {\n this.listeQuestions = [] // Liste de questions\n this.listeCorrections = [] // Liste de questions corrigées\n this.autoCorrection = []\n let sc\n const ppc = 20\n if (context.isHtml) {\n sc = 0.5\n } else {\n sc = 0.4\n }\n\n const params = {\n xmin: -2.2,\n ymin: -2.2,\n xmax: 18,\n ymax: 3,\n pixelsParCm: ppc,\n scale: sc\n }; let den; let num; let f\n\n const liste = combinaisonListes([2, 3, 4, 5, 6], this.nbQuestions)\n\n for (let i = 0, texte, texteCorr, cpt = 0; i < this.nbQuestions && cpt < 50;) {\n den = liste[i]\n switch (this.sup) {\n case 1 :\n num = randint(1, den - 1)\n break\n case 2 :\n num = randint(den + 1, den * 3)\n break\n default :\n num = randint(1, den * 3)\n break\n }\n num = randint(1, den * 3)\n f = fraction(num, den)\n texte = `Knowing that a disk represents a unit, represent the fraction $${f.texFraction}$ by coloring the corresponding part.<br>`\n texte += mathalea2d(params, fraction(den * 3, den).representation(0, 0, 2, 0, 'cake', 'white'))\n texteCorr = `Here in these drawings, colored in blue, is the part corresponding to the fraction $${f.texFraction}$:<br>`\n texteCorr += mathalea2d(params, f.representation(0, 0, 2, randint(0, den - 1), 'cake', 'blue'))\n if (context.isAmc) {\n this.autoCorrection[i] = {\n enonce: 'here the question(s) is(are) asked',\n enonceAvant: false, // EE : ce champ est facultatif et permet (si false) de supprimer l'énoncé ci-dessus avant la numérotation de chaque question.\n enonceAvantUneFois: false, // EE : ce champ est facultatif et permet (si true) d'display the above statement only once before the numbering of the first question of the exercise. Only works correctly if the mix option is false.\n propositions: [\n {\n type: 'AMCOpen', // on donne le type de la première question-réponse qcmMono, qcmMult, AMCNum, AMCOpen\n propositions: [\n {\n texte: texteCorr,\n statut: 3, // OBLIGATOIRE (ici c'is the number of lines of the frame for the answer of the'élève sur AMC)\n enonce: texte,\n sanscadre: true // EE : ce champ est facultatif et permet (si true) de cacher le cadre et les lignes acceptant la réponse de l'élève\n }\n ]\n }\n ]\n }\n }\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 listeQuestionsToContenu(this)\n }\n this.besoinFormulaireNumerique = ['Type of fractions', 6, '1: Less than 1\\n2: Greater than 1\\n3: Doesn’t matter']\n}\n"],"names":["titre","amcReady","amcType","dateDeModifImportante","uuid","ref","RepresenterUneFraction","Exercice","sc","ppc","context","params","den","num","f","liste","combinaisonListes","i","texte","texteCorr","cpt","randint","fraction","mathalea2d","listeQuestionsToContenu"],"mappings":"mFAOO,MAAMA,EAAQ,yBACRC,EAAW,GACXC,EAAU,aACVC,EAAwB,aAQxBC,EAAO,QACPC,EAAM,OACnB,SAAwBC,GAAmC,CACzDC,EAAS,KAAK,IAAI,EAClB,KAAK,SAAW,GAChB,KAAK,YAAc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