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/4C32-1-F24mf-6P.js.map
{"version":3,"file":"4C32-1-F24mf-6P.js","sources":["../../src/exercices/4e/4C32-1.js"],"sourcesContent":["import { choice } 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, calculANePlusJamaisUtiliser } from '../../modules/outils.js'\nimport { propositionsQcm } from '../../lib/interactif/qcm.js'\nimport { abs, rangeMinMax } from '../../lib/outils/nombres.js'\nimport { ecritureParentheseSiNegatif } from '../../lib/outils/ecritures.js'\nexport const titre = 'Give the result of numbers written with powers of 10 in scientific notation'\nexport const dateDeModifImportante = '08/09/2023'\nexport const amcReady = true\nexport const amcType = 'qcmMono'\nexport const interactifType = 'qcm'\nexport const interactifReady = true\n\n/**\n * Un nombre est donné par le produit d'un décimal par une puissance de dix, il faut l'écrire en notation scientifique\n * @author Jean-Claude Lhote\n */\nexport const uuid = '762fe'\nexport const ref = '4C32-1'\nexport default function CalculsAvecPuissancesDeDix () {\n  Exercice.call(this)\n  this.sup = 1\n  this.sup2 = 3\n  this.sup3 = 3\n  this.nbQuestions = 5\n  this.classe = 4\n\n  this.nouvelleVersion = function () {\n    this.autoCorrection = []\n    if (this.interactif) {\n      this.consigne = this.nbQuestions === 1 ? 'Choose the scientific notation associated with the following number.' : 'Choose the scientific notation associated with each of the following numbers.'\n    } else {\n      this.consigne = this.nbQuestions === 1 ? 'Give the scientific notation for the following number.' : 'Give the scientific notation for the following numbers.'\n    }\n    // let typeOfAvailableQuestions\n    this.listeQuestions = [] // Liste de questions\n    this.listeCorrections = [] // Liste de questions corrigées\n\n    for (let i = 0, texte, texteCorr, mantisse1, exp1, decalage, mantisse, exp, decimalstring, scientifiquestring, cpt = 0;\n      i < this.nbQuestions && cpt < 50;) {\n      switch (this.sup - 1) {\n        case 0:\n          decalage = randint(-1, 1, 0)\n          decalage = this.sup2 === 1 ? abs(decalage) : this.sup2 === 2 ? -abs(decalage) : decalage\n          mantisse = randint(1, 9)\n          break\n        case 1:\n          decalage = randint(-2, 2, 0)\n          decalage = this.sup2 === 1 ? abs(decalage) : this.sup2 === 2 ? -abs(decalage) : decalage\n          mantisse = calculANePlusJamaisUtiliser(randint(11, 99) / 10)\n          break\n        case 2:\n          decalage = randint(-3, 3, 0)\n          decalage = this.sup2 === 1 ? abs(decalage) : this.sup2 === 2 ? -abs(decalage) : decalage\n          if (randint(0, 1) === 1) mantisse = calculANePlusJamaisUtiliser(randint(111, 999) / 100)\n          else mantisse = calculANePlusJamaisUtiliser((randint(1, 9) * 100 + randint(1, 9)) / 100)\n          break\n/*        case 3:\n          decalage = randint(-4, 4, 0)\n          if (randint(0, 1) === 1) mantisse = calcul((randint(1, 9) * 1000 + randint(1, 19) * 5) / 1000)\n          else mantisse = calcul(randint(1111, 9999) / 1000)\n          exp = randint(3, 7, abs(decalage)) * choice([-1, 1])\n          break */\n      }\n      exp = this.classe === 4\n        ? (this.sup3 === 1 ? randint(decalage + 1, decalage + 3, 0) : this.sup3 === 2 ? randint(decalage - 3, decalage - 1, 0) : randint(decalage - 3, decalage + 3, [decalage, 0]))\n        : (this.sup3 === 1 ? randint(decalage + 3 + this.sup - 1, decalage + 8 + this.sup - 1, 0) : this.sup3 === 2 ? randint(decalage - 8 - (this.sup - 1), decalage - 2 - (this.sup - 1), [0, decalage]) : choice(rangeMinMax(decalage - 8 - (this.sup - 1), decalage + 8 + this.sup - 1), rangeMinMax(decalage - 2 - (this.sup - 1), decalage + 2 + this.sup - 1)))\n      mantisse1 = calculANePlusJamaisUtiliser(mantisse * 10 ** decalage)\n      exp1 = exp - decalage\n\n      decimalstring = `${texNombre(mantisse1)} \\\\times 10^{${exp1}}`\n      scientifiquestring = `${texNombre(mantisse)} \\\\times 10^{${exp}}`\n\n      texte = `$${decimalstring}$`\n      texteCorr = this.classe === 4\n        ? `$${decimalstring} = ${texNombre(mantisse1)} \\\\times ${texNombre(10 ** exp1)} = ${texNombre(mantisse1 * 10 ** exp1)} = ${miseEnEvidence(scientifiquestring)}$`\n        : `$${texNombre(mantisse1)} \\\\times 10^{${exp1}} = ${miseEnEvidence(`${texNombre(mantisse)}\\\\times 10^{${decalage}}`, 'blue')}\\\\times 10^{${exp1}} = ${texNombre(mantisse)} \\\\times 10^{${miseEnEvidence(decalage + '+' + ecritureParentheseSiNegatif(exp1), 'blue')}}=${miseEnEvidence(scientifiquestring)}$`\n      this.autoCorrection[i] = {}\n      this.autoCorrection[i].enonce = `${texte}\\n`\n      this.autoCorrection[i].options = {\n        ordered: false,\n        lastChoice: 5\n      }\n      this.autoCorrection[i].propositions = [\n        {\n          texte: `$${scientifiquestring}$`,\n          statut: true\n        },\n        {\n          texte: `$${texNombre(mantisse * choice([1, 10, 0.1]))} \\\\times 10^{${exp - 1}}$`,\n          statut: false\n        },\n        {\n          texte: `$${texNombre(mantisse * choice([1, 0.01, 0.1]))} \\\\times 10^{${exp + 1}}$`,\n          statut: false\n        },\n        {\n          texte: `$${texNombre(mantisse * 10)} \\\\times 10^{${exp + randint(0, 1)}}$`,\n          statut: false\n        },\n        {\n          texte: `$${texNombre(mantisse * 0.1)} \\\\times 10^{${exp + randint(0, 1)}}$`,\n          statut: false\n        },\n        {\n          texte: `$${texNombre(mantisse)} \\\\times 10^{${-exp}}$`,\n          statut: false\n        }\n      ]\n\n      if (this.interactif) {\n        texte += propositionsQcm(this, i).texte\n      }\n      if (this.listeQuestions.indexOf(texte) === -1) {\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: Easy\\n2: Medium\\n3: Difficult']\n  this.besoinFormulaire2Numerique = ['Number before the power of 10', 3, '1: Greater than 1\\n2: Less than 1\\n3: Mix']\n  this.besoinFormulaire3Numerique = ['Power of 10 sign', 3, '1: Positive\\n2: Negative\\n3: Mixture']\n}\n"],"names":["titre","dateDeModifImportante","amcReady","amcType","interactifType","interactifReady","uuid","ref","CalculsAvecPuissancesDeDix","Exercice","i","texte","texteCorr","mantisse1","exp1","decalage","mantisse","exp","decimalstring","scientifiquestring","cpt","randint","abs","calculANePlusJamaisUtiliser","choice","rangeMinMax","texNombre","miseEnEvidence","ecritureParentheseSiNegatif","propositionsQcm","listeQuestionsToContenu"],"mappings":"+GAQY,MAACA,EAAQ,8EACRC,EAAwB,aACxBC,EAAW,GACXC,EAAU,UACVC,EAAiB,MACjBC,EAAkB,GAMlBC,EAAO,QACPC,EAAM,SACJ,SAASC,GAA8B,CACpDC,EAAS,KAAK,IAAI,EAClB,KAAK,IAAM,EACX,KAAK,KAAO,EACZ,KAAK,KAAO,EACZ,KAAK,YAAc,EACnB,KAAK,OAAS,EAEd,KAAK,gBAAkB,UAAY,CACjC,KAAK,eAAiB,CAAE,EACpB,KAAK,WACP,KAAK,SAAW,KAAK,cAAgB,EAAI,uEAAyE,gFAElH,KAAK,SAAW,KAAK,cAAgB,EAAI,yDAA2D,0DAGtG,KAAK,eAAiB,CAAE,EACxB,KAAK,iBAAmB,CAAE,EAE1B,QAASC,EAAI,EAAGC,EAAOC,EAAWC,EAAWC,EAAMC,EAAUC,EAAUC,EAAKC,EAAeC,EAAoBC,EAAM,EACnHV,EAAI,KAAK,aAAeU,EAAM,IAAK,CACnC,OAAQ,KAAK,IAAM,EAAC,CAClB,IAAK,GACHL,EAAWM,EAAQ,GAAI,EAAG,CAAC,EAC3BN,EAAW,KAAK,OAAS,EAAIO,EAAIP,CAAQ,EAAI,KAAK,OAAS,EAAI,CAACO,EAAIP,CAAQ,EAAIA,EAChFC,EAAWK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