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/6C22-3bcJK2zk.js.map
{"version":3,"file":"6C22-3bcJK2zk.js","sources":["../../src/exercices/6e/6C22.js"],"sourcesContent":["import { combinaisonListes } from '../../lib/outils/arrayOutils'\nimport { miseEnEvidence, texteEnCouleur, texteEnCouleurEtGras } from '../../lib/outils/embellissements'\nimport { lampeMessage } from '../../lib/format/message.js'\nimport { sp } from '../../lib/outils/outilString.js'\nimport { prenomF } from '../../lib/outils/Personne.js'\nimport { texPrix } from '../../lib/format/style'\nimport Exercice from '../Exercice.js'\nimport { calculANePlusJamaisUtiliser, listeQuestionsToContenu, randint } from '../../modules/outils.js'\nimport { context } from '../../modules/context.js'\nimport { ajouteChampTexteMathLive } from '../../lib/interactif/questionMathLive.js'\nimport { setReponse } from '../../lib/interactif/gestionInteractif.js'\n\nexport const titre = 'Solve problems like: ... more or ... less'\nexport const interactifReady = true\nexport const interactifType = 'mathLive'\nexport const amcReady = true\nexport const amcType = 'AMCNum'\n\n// Gestion de la date de publication initiale\nexport const dateDePublication = '10/07/2021'\n\n/**\n * Description didactique de l'exercice\n * @author Laurence CANDILLE\n * Référence 6C22\n * Relecture : Novembre 2021 par EE\n */\nexport const uuid = '99522'\nexport const ref = '6C22'\nexport default function ProblemesDePlusEtDeMoins () {\n  Exercice.call(this) // Héritage de la classe Exercice()\n  this.consigne = 'Solve the following problems in draft form and write the answers in the boxes, do not specify \"€\" or \"euros\"...'\n  this.nbQuestions = 3\n  this.nbCols = 2 // Uniquement pour la sortie LaTeX\n  this.nbColsCorr = 2 // Uniquement pour la sortie LaTeX\n  this.sup = 1 // Niveau de difficulté\n  this.tailleDiaporama = 3 // Pour les exercices chronométrés. 50 par défaut pour les exercices avec du texte\n  this.video = '' // Id YouTube ou url\n  this.listePackages = 'bclogo'\n\n  const nombreDecimales = function (n) {\n    let r, e\n    if (n === 0) {\n      r = randint(40, 70)\n      e = randint(10, 30)\n    }\n    if (n === 1) {\n      r = calculANePlusJamaisUtiliser((randint(40, 60) * 100 + randint(1, 9) * 10) / 100) // évite de retomber dans le cas n=0 par ex  4200/100\n      e = calculANePlusJamaisUtiliser((randint(10, 20) * 100 + randint(1, 9) * 10) / 100)\n    }\n    if (n === 2) {\n      r = calculANePlusJamaisUtiliser((randint(40, 60) * 100 + randint(1, 9) * 10 + randint(1, 9)) / 100)\n      e = calculANePlusJamaisUtiliser((randint(10, 20) * 100 + randint(1, 9) * 10 + randint(1, 9)) / 100)\n    }\n    return [r, e]\n  }\n  this.nouvelleVersion = function () {\n    const n = parseInt(this.sup) - 1\n    this.listeQuestions = [] // Liste de questions\n    this.listeCorrections = [] // Liste de questions corrigées\n    this.autoCorrection = []\n    if (this.interactif && context.isHtml) {\n      this.consigne = this.nbQuestions > 1 ? 'Solve the following problems in draft form and write the answers in the boxes, do not specify \"€\" or \"euros\"...' : 'Solve the following problem in draft form and write the answer in the box, do not specify \"€\" or \"euros\"...'\n      this.introduction = lampeMessage({\n        titre: 'Calculator prohibited.',\n        texte: '',\n        couleur: 'numbers'\n      })\n    } else {\n      this.consigne = this.nbQuestions > 1 ? 'Fix the following problems.' : 'Solve the following problem.'\n      this.introduction = lampeMessage({\n        titre: 'Calculator prohibited.',\n        texte: '',\n        couleur: 'numbers'\n      })\n    }\n    const typeQuestionsDisponibles = ['moreover', 'less', 'moreover'] // On créé 2 types de questions\n    const listeTypeQuestions = combinaisonListes(typeQuestionsDisponibles, this.nbQuestions) // Tous les types de questions sont posés mais l'ordre diffère à chaque 'cycle'\n\n    let r, e // argent de Romane et écart\n    let m // argent de Malika\n    let somme // argent total\n    let prenom1, prenom2 // choix aleatoire des prenoms des filles\n    for (let i = 0, texte, texteCorr, cpt = 0; i < this.nbQuestions && cpt < 50;) {\n      // Main loop where i+1 corresponds to the question number\n      prenom1 = prenomF()\n      prenom2 = prenomF()\n      while (prenom2 === prenom1) {\n        prenom2 = prenomF()\n      }\n      [r, e] = nombreDecimales(n)\n      switch (listeTypeQuestions[i]) { // Suivant le type de question, le contenu sera différent\n        case 'moreover':\n          m = r - e\n          somme = m + r\n\n          texte = `${prenom2} says to ${prenom1}: “${sp()}I have $${texPrix(r)}$ €, which is $${texPrix(e)}$ € more than you.${sp()}”<br>`\n          if (this.interactif && !context.isAmc) {\n            texte += 'How much money do the two girls have in total?'\n            texte += '<br>The two girls have, in all,'\n            texte += ajouteChampTexteMathLive(this, i, 'width15 inline nospacebefore', { texteApres: ' €' })\n            setReponse(this, i, somme)\n          } else {\n            texte += 'How much money in euros do the two girls have in total?<br>'\n          }\n          texteCorr = `According to the statement, ${prenom2} has $${texPrix(r)}$ €.<br>${prenom2} has $${texPrix(e)}$ €`\n          texteCorr += texteEnCouleurEtGras(' moreover')\n          texteCorr += `that ${prenom1} means that ${prenom1} has $${texPrix(e)}$ €`\n          texteCorr += texteEnCouleurEtGras(' less')\n          texteCorr += `than ${prenom2}. <br>${prenom1} therefore has: $${texPrix(r)}$ € - $${texPrix(e)}$ € = $${texPrix(m)}$ €.`\n          texteCorr += `<br>$${texPrix(r)}$ € + $${texPrix(m)}$ € = $${texPrix(somme)}$ €`\n          texteCorr += texteEnCouleur(`<br>The two girls have, in total, $${miseEnEvidence(texPrix(somme))}$ €.`)\n\n          break\n        case 'less':\n          m = r + e\n          somme = m + r\n\n          texte = `${prenom2} says to ${prenom1}: “${sp()}I have $${texPrix(r)}$ €, that is $${texPrix(e)}$ € less than you.${sp()}”<br>`\n          if (this.interactif && !context.isAmc) {\n            texte += 'How much money, in total, do the two girls have?<br>The two girls have, in total,:'\n            texte += ajouteChampTexteMathLive(this, i, 'width15 inline nospacebefore', { texteApres: ' €' })\n            setReponse(this, i, somme)\n          } else {\n            texte += 'How much money in euros do the two girls have in total?<br>'\n          }\n          texteCorr = `According to the statement, ${prenom2} has $${texPrix(r)}$ €.<br>${prenom2} has $${texPrix(e)}$ €`\n          texteCorr += texteEnCouleurEtGras(' less')\n          texteCorr += `that ${prenom1} means that ${prenom1} has $${texPrix(e)}$ €`\n          texteCorr += texteEnCouleurEtGras(' moreover')\n          texteCorr += `than ${prenom2}. <br>${prenom1} therefore has: $${texPrix(r)}$ € + $${texPrix(e)}$ € = $${texPrix(m)}$ €.`\n          texteCorr += `<br>$${texPrix(r)}$ € + $${texPrix(m)}$ € = $${texPrix(somme)}$ €`\n          texteCorr += texteEnCouleur(`<br>The two girls have, in total, $${miseEnEvidence(texPrix(somme))}$ €.`)\n\n          break\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: Integer values\\n2: One decimal place\\n3: Two decimal places']\n}\n"],"names":["titre","interactifReady","interactifType","amcReady","amcType","dateDePublication","uuid","ref","ProblemesDePlusEtDeMoins","Exercice","nombreDecimales","n","r","e","randint","calculANePlusJamaisUtiliser","context","lampeMessage","listeTypeQuestions","combinaisonListes","m","somme","prenom1","prenom2","i","texte","texteCorr","cpt","prenomF","sp","texPrix","ajouteChampTexteMathLive","setReponse","texteEnCouleurEtGras","texteEnCouleur","miseEnEvidence","listeQuestionsToContenu"],"mappings":"oRAYY,MAACA,EAAQ,4CACRC,EAAkB,GAClBC,EAAiB,WACjBC,EAAW,GACXC,EAAU,SAGVC,EAAoB,aAQpBC,EAAO,QACPC,EAAM,OACJ,SAASC,GAA4B,CAClDC,EAAS,KAAK,IAAI,EAClB,KAAK,SAAW,kHAChB,KAAK,YAAc,EACnB,KAAK,OAAS,EACd,KAAK,WAAa,EAClB,KAAK,IAAM,EACX,KAAK,gBAAkB,EACvB,KAAK,MAAQ,GACb,KAAK,cA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