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/5P12-975w1Hqd.js.map
{"version":3,"file":"5P12-975w1Hqd.js","sources":["../../src/exercices/5e/5P12.js"],"sourcesContent":["import { miseEnEvidence } from '../../lib/outils/embellissements'\nimport { prenom, prenomF, prenomM } from '../../lib/outils/Personne'\nimport { objet } from '../6e/6C35.js'\nimport Exercice from '../Exercice.js'\nimport { listeQuestionsToContenu, randint } from '../../modules/outils.js'\n\nexport const titre = 'Divide a quantity into two or three parts according to a given ratio'\n\n/**\n * Partager une quantité en deux ou trois parts selon un ratio donné.\n * @author Guillaume Valmont\n * Référence 5P12\n * Date de publication : 24/07/2021\n*/\nexport const uuid = '60910'\nexport const ref = '5P12'\nexport default function PartagerSelonUnRatio () {\n  Exercice.call(this) // Héritage de la classe Exercice()\n  this.titre = titre\n  this.nbQuestions = 1\n  this.sup = 1\n  this.correctionDetailleeDisponible = true\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, texte, texteCorr, objet1, prenom1, prenom2, prenom3, quantite1, quantite2, quantite3, facteur, total, cpt = 0; i < this.nbQuestions && cpt < 50;) {\n      objet1 = objet()\n      prenom1 = prenomF()\n      prenom2 = prenomM()\n      prenom3 = prenom()\n      while (prenom3 === prenom1 || prenom3 === prenom2) {\n        prenom3 = prenom()\n      }\n      quantite1 = randint(2, 9)\n      quantite2 = randint(2, 9, [quantite1])\n      quantite3 = randint(2, 9, [quantite1, quantite2])\n      facteur = randint(2, 9)\n      if (this.sup.toString() === '1') { // Partage en deux parts\n        total = (quantite1 + quantite2) * facteur\n        texte = `${prenom1} and ${prenom2} want to divide their $${total}$ ${objet1} into two parts according to the ratio $${quantite1}: ${quantite2}$. <br>`\n        texte += `How much ${objet1} will each receive?`\n        texteCorr = ''\n        if (this.correctionDetaillee) {\n          texteCorr += `Every time ${prenom1} receives $${quantite1}$, ${prenom2} receives $${quantite2}$. Which makes $${quantite1} + ${quantite2} = ${miseEnEvidence(quantite1 + quantite2)}$. <br>`\n        } else {\n          texteCorr += `$${quantite1} + ${quantite2} = ${miseEnEvidence(quantite1 + quantite2)}$ <br>`\n        }\n        if (this.correctionDetaillee) {\n          texteCorr += `In fact, on each pass, they receive $${miseEnEvidence(quantite1 + quantite2)}$ in total.<br>`\n          texteCorr += `<br>Let's calculate the number of passages necessary to share the $${total}$ ${objet1}:<br>`\n        }\n        texteCorr += `$${total} ${miseEnEvidence('\\\\div')} ${miseEnEvidence(quantite1 + quantite2)} = ${miseEnEvidence(facteur)}$`\n        if (this.correctionDetaillee) {\n          texteCorr += `.<br><br>They will have to make $${miseEnEvidence(facteur)}$ passes and on each pass, ${prenom1} will receive $${quantite1}$ ${objet1}. <br>`\n          texteCorr += `In total, she will receive $${quantite1} ${miseEnEvidence('\\\\times' + facteur)} = ${quantite1 * facteur}$ ${objet1}. <br>`\n          texteCorr += `Similarly, ${prenom2} will receive $${quantite2} ${miseEnEvidence('\\\\times' + facteur)} = ${quantite2 * facteur}$ ${objet1}. <br>`\n        } else {\n          texteCorr += `<br>$\\\\text{${prenom1}}: \\\\text{${prenom2}} = ${quantite1}: ${quantite2} = ${quantite1 * facteur}: ${quantite2 * facteur} \\\\text{ (multiplying by }${miseEnEvidence(facteur)}\\\\text{)}$ <br>`\n        }\n        texteCorr += `<br>${prenom1} will receive $${quantite1 * facteur}$ ${objet1} and ${prenom2} will receive $${quantite2 * facteur}$. <br>`\n      } else { // Partage en trois parts\n        total = (quantite1 + quantite2 + quantite3) * facteur\n        texte = `${prenom1}, ${prenom2} and ${prenom3} want to share their $${total}$ ${objet1} into three parts according to the ratio $${quantite1}: ${quantite2}: ${quantite3}$. <br>`\n        texte += `How much ${objet1} will each receive?`\n        texteCorr = ''\n        if (this.correctionDetaillee) {\n          texteCorr += `Every time ${prenom1} receives $${quantite1}$, ${prenom2} receives $${quantite2}$ and ${prenom3} receives $${quantite3}$. Which makes $${quantite1} + ${quantite2} + ${quantite3} = ${miseEnEvidence(quantite1 + quantite2 + quantite3)}$. <br>`\n        } else {\n          texteCorr += `$${quantite1} + ${quantite2} + ${quantite3} = ${miseEnEvidence(quantite1 + quantite2 + quantite3)}$ <br>`\n        }\n        if (this.correctionDetaillee) {\n          texteCorr += `In fact, on each pass, they receive $${miseEnEvidence(quantite1 + quantite2 + quantite3)}$ in total.<br>`\n          texteCorr += `<br>Let's calculate the number of passages necessary to share the $${total}$ ${objet1}:<br>`\n        }\n        texteCorr += `$${total} ${miseEnEvidence('\\\\div')} ${miseEnEvidence(quantite1 + quantite2 + quantite3)} = ${miseEnEvidence(facteur)}$`\n        if (this.correctionDetaillee) {\n          texteCorr += `.<br><br>They will have to make $${miseEnEvidence(facteur)}$ passes and on each pass, ${prenom1} will receive $${quantite1}$ ${objet1}. <br>`\n          texteCorr += `In total, she will receive $${quantite1} ${miseEnEvidence('\\\\times' + facteur)} = ${quantite1 * facteur}$ ${objet1}. <br>`\n          texteCorr += `Similarly, ${prenom2} will receive $${quantite2} ${miseEnEvidence('\\\\times' + facteur)} = ${quantite2 * facteur}$ ${objet1} and ${prenom3} will receive $${quantite3} ${miseEnEvidence('\\\\times' + facteur)} = ${quantite3 * facteur}$ ${objet1}. <br>`\n        } else {\n          texteCorr += `<br>$\\\\text{${prenom1}}: \\\\text{${prenom2}}: \\\\text{${prenom3}} = ${quantite1 * facteur}: ${quantite2 * facteur}: ${quantite3 * facteur} \\\\text{ (multiplying by }${miseEnEvidence(facteur)}\\\\text{)} $ <br>`\n        }\n        texteCorr += `<br>${prenom1} will receive $${quantite1 * facteur}$ ${objet1}, ${prenom2} will receive $${quantite2 * facteur}$ and ${prenom3} will receive $${quantite3 * facteur}$.`\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 = ['Difficulty level', 3, '1: Divide into two parts\\n2: Divide into three parts']\n}\n"],"names":["titre","uuid","ref","PartagerSelonUnRatio","Exercice","i","texte","texteCorr","objet1","prenom1","prenom2","prenom3","quantite1","quantite2","quantite3","facteur","total","cpt","objet","prenomF","prenomM","prenom","randint","miseEnEvidence","listeQuestionsToContenu"],"mappings":"sMAMY,MAACA,EAAQ,uEAQRC,EAAO,QACPC,EAAM,OACJ,SAASC,GAAwB,CAC9CC,EAAS,KAAK,IAAI,EAClB,KAAK,MAAQJ,EACb,KAAK,YAAc,EACnB,KAAK,IAAM,EACX,KAAK,8BAAgC,GAErC,KAAK,gBAAkB,UAAY,CACjC,KAAK,eAAiB,CAAE,EACxB,KAAK,iBAAmB,CAAE,EAC1B,KAAK,eAAiB,CAAE,EAExB,QAASK,EAAI,EAAGC,EAAOC,EAAWC,EAAQC,EAASC,EAASC,EAASC,EAAWC,EAAWC,EAAWC,EAASC,EAAOC,EAAM,EAAGZ,EAAI,KAAK,aAAeY,EAAM,IAAK,CAKhK,IAJAT,EAASU,EAAO,EAChBT,EAAUU,EAAS,EACnBT,EAAUU,EAAS,EACnBT,EAAUU,EAAQ,EACXV,IAAYF,GAAWE,IAAYD,GACxCC,EAAUU,EAAQ,EAEpBT,EAAYU,EAAQ,EAAG,CAAC,EACxBT,EAAYS,EAAQ,EAAG,EAAG,CAACV,CAAS,CAAC,EACrCE,EAAYQ,EAAQ,EAAG,EAAG,CAACV,EAAWC,CAAS,CAAC,EAChDE,EAAUO,EAAQ,EAAG,CAAC,EAClB,KAAK,IAAI,SAAQ,IAAO,KAC1BN,GAASJ,EAAYC,GAAaE,EAClCT,EAAQ,GAAGG,CAAO,QAAQC,CAAO,0BAA0BM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