File: /home/mmtprep/public_html/mathzen.mmtprep.com/assets/3G11-1-AzbnawpT.js.map
{"version":3,"file":"3G11-1-AzbnawpT.js","sources":["../../src/exercices/3e/3G11-1.js"],"sourcesContent":["import { combinaisonListes, shuffle } from '../../lib/outils/arrayOutils'\nimport { miseEnEvidence } from '../../lib/outils/embellissements'\nimport { texNombre } from '../../lib/outils/texNombre.js'\nimport Exercice from '../Exercice.js'\nimport { listeQuestionsToContenu, randint } from '../../modules/outils.js'\nimport Decimal from 'decimal.js'\nimport FractionEtendue from '../../modules/FractionEtendue.js'\n\nexport const titre = 'Homothety - Report'\n\nexport const dateDePublication = '27/11/2022'\n\n/**\n * Distribultivité numérique\n * @author Sébastien LOZANO\n*/\n\nexport const uuid = '1ebf7'\nexport const ref = '3G11-1'\nexport default class HomothetieRapport extends Exercice {\n constructor () {\n super()\n this.nbQuestions = 1 // Ici le nombre de questions\n this.nbQuestionsModifiable = true // Active le formulaire nombre de questions\n this.nbCols = 1 // Le nombre de colonnes dans l'énoncé LaTeX\n this.nbColsCorr = 1// Le nombre de colonne pour la correction LaTeX\n this.pasDeVersionLatex = false // mettre à true si on ne veut pas de l'exercice dans le générateur LaTeX\n this.pas_de_version_HMTL = false // mettre à true si on ne veut pas de l'exercice en ligne\n // See the Exercise Class for an exhaustive list of available properties.\n\n // this.sup = false; // To uncomment: default value of a first parameter\n // this.sup2 = false; // To uncomment: default value of a second parameter\n // this.sup3 = false; // To uncomment: default value of a third parameter\n this.consigne = 'Complete the table below by checking the correct boxes.'\n }\n\n // this is where the exercise code begins this method creates a copy of the exercise\n nouvelleVersion () {\n // the numeroExercice variable can be retrieved to allow two copies of the same exo to be differentiated\n // For example, to be sure not to have the same point names by calling this exo twice on the same page\n\n this.listeQuestions = [] // tableau contenant la liste des questions\n this.listeCorrections = []\n const typesDeQuestionsDisponibles = [1] // tableau à compléter par valeurs possibles des types de questions\n const listeTypeDeQuestions = combinaisonListes(typesDeQuestionsDisponibles, this.nbQuestions)\n\n if (this.nbQuestions > 1) {\n this.consigne = 'Complete the tables below by checking the correct boxes.'\n }\n\n for (let i = 0, texte, texteCorr, cpt = 0; i < this.nbQuestions && cpt < 50;) {\n texte = '' // Nous utilisons souvent cette variable pour construire le texte de la question.\n texteCorr = '' // Idem pour le texte de la correction.\n\n // The reports are chosen from:\n // => a decimal less than 1\n // => a negative integer of module greater than 1\n // => a positive decimal greater than 1\n // => a negative decimal of module less than 1\n // => a positive fraction less than 1\n // => a negative fraction with a module greater than 1\n\n // We create the numbers\n const decimalPositifInferieurUn = new Decimal(randint(1, 9)).div(10)\n const entierNegatifModuleSuperieurUn = 0 - randint(2, 9)\n const decimalPositifSuperieurUn = new Decimal(randint(11, 49)).div(10)\n const decimalNegatifModuleInferieurUn = 0 - new Decimal(randint(1, 9)).div(10)\n let numerateur = randint(2, 9)\n let denominateur = randint(2, 9, [numerateur])\n // If the denominator is less than the numerator we reverse the two\n if (denominateur < numerateur) {\n const temp = numerateur\n numerateur = denominateur\n denominateur = temp\n }\n const fraction = new FractionEtendue(numerateur, denominateur)\n const numerateurFractionInverseOpposee = -1 * denominateur\n const denominateurFractionInverseOpposee = numerateur\n const fractionInverseEtOpposee = new FractionEtendue(numerateurFractionInverseOpposee, denominateurFractionInverseOpposee)\n\n // We create the objects\n const cas1 = {\n rapport: texNombre(decimalPositifInferieurUn, 1),\n correctionReduction: miseEnEvidence('\\\\times'),\n correctionAgrandissement: ''\n }\n const cas2 = {\n rapport: texNombre(entierNegatifModuleSuperieurUn, 0),\n correctionReduction: '',\n correctionAgrandissement: miseEnEvidence('\\\\times')\n }\n const cas3 = {\n rapport: texNombre(decimalPositifSuperieurUn, 1),\n correctionReduction: '',\n correctionAgrandissement: miseEnEvidence('\\\\times')\n }\n const cas4 = {\n rapport: texNombre(decimalNegatifModuleInferieurUn, 1),\n correctionReduction: miseEnEvidence('\\\\times'),\n correctionAgrandissement: ''\n }\n const cas5 = {\n rapport: fraction.texFraction,\n correctionReduction: miseEnEvidence('\\\\times'),\n correctionAgrandissement: ''\n }\n const cas6 = {\n rapport: fractionInverseEtOpposee.texFraction,\n correctionReduction: '',\n correctionAgrandissement: miseEnEvidence('\\\\times')\n }\n\n // We are going to fill an array with objects containing number and answer\n const choixRapports = [cas1, cas2, cas3, cas4, cas5, cas6]\n const choixRapportsMelanges = shuffle(choixRapports)\n\n switch (listeTypeDeQuestions[i]) { // Chaque question peut être d'un type différent, ici 1 cas sont prévus...\n case 1:\n texte += `$\\\\def\\\\arraystretch{2.5}\\\\begin{array}{|l|c|c|c|c|c|c|}\\\\hline\\\\text{Ratio stretch} & ${choixRapportsMelanges[0].rapport} & ${choixRapportsMelanges[1].rapport} & ${choixRapportsMelanges[2].rapport} & ${choixRapportsMelanges[3].rapport} & ${choixRapportsMelanges[4].rapport} & ${choixRapportsMelanges[5].rapport} \\\\\\\\\\\\hline\\\\text{Reduction} & & & & & & \\\\\\\\\\\\hline\\\\text{Enlargement} & & & & & & \\\\\\\\\\\\hline\\\\end{array}$`\n texteCorr += `$\\\\def\\\\arraystretch{2.5}\\\\begin{array}{|l|c|c|c|c|c|c|}\\\\hline\\\\text{Ratio stretch} & ${choixRapportsMelanges[0].rapport} & ${choixRapportsMelanges[1].rapport} & ${choixRapportsMelanges[2].rapport} & ${choixRapportsMelanges[3].rapport} & ${choixRapportsMelanges[4].rapport} & ${choixRapportsMelanges[5].rapport} \\\\\\\\\\\\hline\\\\text{Reduction} & ${choixRapportsMelanges[0].correctionReduction} & ${choixRapportsMelanges[1].correctionReduction} & ${choixRapportsMelanges[2].correctionReduction} & ${choixRapportsMelanges[3].correctionReduction} & ${choixRapportsMelanges[4].correctionReduction} & ${choixRapportsMelanges[5].correctionReduction} \\\\\\\\\\\\hline\\\\text{Enlargement} & ${choixRapportsMelanges[0].correctionAgrandissement} & ${choixRapportsMelanges[1].correctionAgrandissement} & ${choixRapportsMelanges[2].correctionAgrandissement} & ${choixRapportsMelanges[3].correctionAgrandissement} & ${choixRapportsMelanges[4].correctionAgrandissement} & ${choixRapportsMelanges[5].correctionAgrandissement} \\\\\\\\\\\\hline\\\\end{array}$`\n break\n }\n\n if (this.listeQuestions.indexOf(texte) === -1) {\n // If the question has never been asked, we store it in the list of questions\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 // If the following variables are defined, they cause the corresponding parameter forms to be displayed\n // They can be of 3 types: _numeric, _checkbox_or _text.\n // They are associated respectively with the sup, sup2 and sup3 parameters.\n\n // this.needNumericalForm = ['Type of questions', 3, `1: Perpendiculars\\n 2: Parallels\\n 3: Mixture`]\n // this.needFormulaire2Numérique = [\"Type of notebook\",3, `1: Notebook with small squares\\n 2: Notebook with large squares (Seyes)\\n 3: Blank sheet`];\n // this.needForm3BoxCheck =['freehand figure',true]\n} // Fin de l'exercice.\n"],"names":["titre","dateDePublication","uuid","ref","HomothetieRapport","Exercice","listeTypeDeQuestions","combinaisonListes","i","texte","texteCorr","cpt","decimalPositifInferieurUn","Decimal","randint","entierNegatifModuleSuperieurUn","decimalPositifSuperieurUn","decimalNegatifModuleInferieurUn","numerateur","denominateur","temp","fraction","FractionEtendue","numerateurFractionInverseOpposee","denominateurFractionInverseOpposee","fractionInverseEtOpposee","cas1","texNombre","miseEnEvidence","cas2","cas3","cas4","cas5","cas6","choixRapportsMelanges","shuffle","listeQuestionsToContenu"],"mappings":"6FAQY,MAACA,EAAQ,qBAERC,EAAoB,aAOpBC,EAAO,QACPC,EAAM,SACJ,MAAMC,UAA0BC,CAAS,CACtD,aAAe,CACb,MAAO,EACP,KAAK,YAAc,EACnB,KAAK,sBAAwB,GAC7B,KAAK,OAAS,EACd,KAAK,WAAa,EAClB,KAAK,kBAAoB,GACzB,KAAK,oBAAsB,GAM3B,KAAK,SAAW,yDACjB,CAGD,iBAAmB,CAIjB,KAAK,eAAiB,CAAE,EACxB,KAAK,iBAAmB,CAAE,EAE1B,MAAMC,EAAuBC,EADO,C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