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/6C13-1-1scZF5Sb.js.map
{"version":3,"file":"6C13-1-1scZF5Sb.js","sources":["../../src/exercices/6e/6C13-1.js"],"sourcesContent":["import { sp } from '../../lib/outils/outilString.js'\nimport Exercice from '../Exercice.js'\nimport { randint, listeQuestionsToContenu, gestionnaireFormulaireTexte } from '../../modules/outils.js'\nimport { min } from 'mathjs'\nexport const titre = 'Know the vocabulary linked to the 4 operations'\n\n/**\n * Exercice sur le vocabulaire : somme, différence, produit, quotient...\n * @author Mickael Guironnet\n */\nexport const uuid = '32e02'\nexport const ref = '6C13-1'\nexport default function VocabulaireSur4Operations () {\n  Exercice.call(this) // Héritage de la classe Exercice()\n  this.titre = titre\n  this.consigne = ''\n  this.nbQuestions = 5\n  this.nbCols = 2\n  this.nbColsCorr = 2\n  this.sup = 15\n  this.spacing = 2\n\n  this.nouvelleVersion = function () {\n    /*\n    let typesDeQuestionsDisponibles = []\n    if (!this.sup || this.sup === '0') { // Si aucune liste n'est saisie\n      typesDeQuestionsDisponibles = rangeMinMax(1, 14)\n    } else {\n      if (typeof (this.sup) === 'number') { // Si c'is a number, the number was entered in the address bar\n        this.sup === 0 ? typesDeQuestionsDisponibles = rangeMinMax(1, 14) : typesDeQuestionsDisponibles = contraindreValeur(1, 14, this.sup, 4)\n      } else {\n        typesDeQuestionsDisponibles = this.sup.split('-')// Sinon on créé un tableau à partir des valeurs séparées par des -\n        for (let i = 0; i < typesDeQuestionsDisponibles.length; i++) { // on a un tableau avec des strings : ['1', '5', '2','toto','45']\n          typesDeQuestionsDisponibles[i] = contraindreValeur(1, 14, parseInt(typesDeQuestionsDisponibles[i]), randint(1, 14)) // parseInt en fait un tableau d'entiers\n        }\n      }\n    }\n\n    const listeTypeDeQuestions = combinaisonListes(typesDeQuestionsDisponibles, this.nbQuestions)\n    */\n    const listeTypeDeQuestions = gestionnaireFormulaireTexte({\n      max: 14,\n      defaut: 15,\n      melange: 15,\n      nbQuestions: this.nbQuestions,\n      saisie: this.sup\n    })\n\n    this.listeQuestions = [] // Liste de questions\n    this.listeCorrections = [] // Liste de questions corrigées\n\n    for (let i = 0, texte, a, b, reste, texteCorr, cpt = 0; i < this.nbQuestions && cpt < 50;) {\n      do {\n        a = randint(2, 10)\n        b = randint(2, 10, [a])\n        if (a < b) { [a, b] = [b, a] }\n      } while (a - b === a || a - b === b)\n      texte = ''\n      texteCorr = ''\n      switch (listeTypeDeQuestions[i]) {\n        case 1:\n          texte +=\n\n            `In the operation “${sp()}$${a} + ${b}$${sp()}”, what are the numbers $${a}$ and $${b}$ called?`\n          texteCorr += `In the operation “${sp()}$${a} + ${b}$${sp()}”, $${a}$ and $${b}$ are called terms.`\n          break\n        case 2:\n          texte +=\n\n            `In the equality “${sp()}$${a} + ${b} = ${a + b}$ ${sp()}”, what is the number $${a + b}$ called?`\n          texteCorr += `In the equality “${sp()}$${a} + ${b} = ${a + b}$${sp()}”, $${a + b}$ is called the sum of $${a}$ and $${b}$.`\n          break\n        case 3:\n          texte +=\n\n            `What is the sum of $${a}$ and $${b}$?`\n          texteCorr += `The sum of $${a}$ and $${b}$ is $${a + b}$ because $${a}+${b}=${a + b}$.`\n          break\n        case 4:\n          texte +=\n\n            `In the operation “${sp()}$${a} - ${b}$${sp()}”, what are the numbers $${a}$ and $${b}$ called?`\n          texteCorr += `In the operation “${sp()}$${a} - ${b}$${sp()}”, $${a}$ and $${b}$ are called terms.`\n          break\n        case 5:\n          texte +=\n\n            `In the equality “${sp()}$${a} - ${b} = ${a - b}$${sp()}”, what is the number $${a - b}$ called?`\n          texteCorr += `In the equality “${sp()}$${a} - ${b} = ${a - b}$${sp()}”, $${a - b}$ is called the difference between $${a}$ and $${b}$.`\n          break\n        case 6:\n          texte +=\n\n            `What is the difference between $${a}$ and $${b}$?`\n          texteCorr += `The difference between $${a}$ and $${b}$ is $${a - b}$ because $${a}-${b}=${a - b}$.`\n          break\n        case 7:\n          texte +=\n\n            `In the operation “${sp()}$${a} \\\\times ${b}$${sp()}”, what are the numbers $${a}$ and $${b}$ called?`\n          texteCorr += `In the operation “${sp()}$${a} \\\\times ${b}$${sp()}”, $${a}$ and $${b}$ are called factors.`\n          break\n        case 8:\n          texte +=\n\n            `In the equality “${sp()}$${a} \\\\times ${b} = ${a * b}$${sp()}”, what is the number $${a * b}$ called?`\n          texteCorr += `In the equality “${sp()}$${a} \\\\times ${b} = ${a * b}$${sp()}”, $${a * b}$ is called the product of $${a}$ and $${b}$.`\n          break\n        case 9:\n          texte +=\n\n            `What is the product of $${a}$ and $${b}$?`\n          texteCorr += `The product of $${a}$ and $${b}$ is $${a * b}$ because $${a}\\\\times${b}=${a * b}$.`\n          break\n        case 10:\n          texte +=\n\n            `In the “${sp()}$${a * b} \\\\div ${b}$${sp()}” operation, what is the number $${a * b}$ called?`\n          texteCorr += `In the operation “${sp()}$${a * b} \\\\div ${b}$${sp()}”, $${a * b}$ is called the dividend.`\n          break\n        case 11:\n          texte +=\n\n            `In the “${sp()}$${a * b} \\\\div ${b}$${sp()}” operation, what is the number $${b}$ called?`\n          texteCorr += `In the operation “${sp()}$${a * b} \\\\div ${b}$${sp()}”, $${b}$ is called the divisor.`\n          break\n        case 12:\n          texte +=\n\n            `In the equality “${sp()}$${a * b} \\\\div ${b} = ${a}$${sp()}”, what is the number $${a}$ called?`\n          texteCorr += `In the equality “${sp()}$${a * b} \\\\div ${b} = ${a}$${sp()}”, $${a}$ is called the quotient of $${a * b}$ by $${b}$.`\n          break\n        case 13:\n          reste = randint(1, min(a, b) - 1)\n          texte +=\n\n            `In the equality “${sp()}$${a * b + reste} = ${b} \\\\times ${a} + ${reste} $${sp()}”, what is the number $${reste}$ called?`\n          texteCorr += `In the equality “${sp()}$${a * b + reste} = ${b} \\\\times ${a} + ${reste} $${sp()}”, $${reste}$ is called the remainder of the quotient of $${a * b + reste}$ by $${b}$ or of $${a * b + reste}$ by $${a}$.`\n          break\n        case 14:\n          texte +=\n\n            `What is the quotient of $${a * b}$ by $${b}$?`\n          texteCorr += `The quotient of $${a * b}$ by $${b}$ is $${a}$ because $${a * b}\\\\div${b}=${a}$.`\n          break\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.besoinFormulaireTexte = ['Type of questions', [\n    'Numbers separated by hyphens',\n    '1: Addition (term)',\n    '2: Addition (sum)',\n    '3: Addition (calculation)',\n    '4: Subtraction (term)',\n    '5: Subtraction (difference)',\n    '6: Subtraction (calculation)',\n    '7: Multiplication (factor)',\n    '8: Multiplication (product)',\n    '9: Multiplication (calculation)',\n    '10: Division (dividend)',\n    '11: Division (divisor)',\n    '12: Division (quotient)',\n    '13: Division (remainder)',\n    '14: Division (calculation)`',\n    '15: Mixture'\n  ].join('\\not')\n  ]\n}\n"],"names":["titre","uuid","ref","VocabulaireSur4Operations","Exercice","listeTypeDeQuestions","gestionnaireFormulaireTexte","i","texte","a","b","reste","texteCorr","cpt","randint","sp","min","listeQuestionsToContenu"],"mappings":"6EAIY,MAACA,EAAQ,iDAMRC,EAAO,QACPC,EAAM,SACJ,SAASC,GAA6B,CACnDC,EAAS,KAAK,IAAI,EAClB,KAAK,MAAQJ,EACb,KAAK,SAAW,GAChB,KAAK,YAAc,EACnB,KAAK,OAAS,EACd,KAAK,WAAa,EAClB,KAAK,IAAM,GACX,KAAK,QAAU,EAEf,KAAK,gBAAkB,UAAY,CAkBjC,MAAMK,EAAuBC,EAA4B,CACvD,IAAK,GACL,OAAQ,GACR,QAAS,GACT,YAAa,KAAK,YAClB,OAAQ,KAAK,GACnB,CAAK,EAED,KAAK,eAAiB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