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/4C30-2-RjlXD1Lf.js.map
{"version":3,"file":"4C30-2-RjlXD1Lf.js","sources":["../../src/exercices/4e/4C30-2.js"],"sourcesContent":["import { combinaisonListes } from '../../lib/outils/arrayOutils'\nimport { sp } from '../../lib/outils/outilString.js'\nimport { puissanceEnProduit } from '../../lib/outils/puissance.js'\nimport { texNombre } from '../../lib/outils/texNombre.js'\nimport Exercice from '../Exercice.js'\nimport { context } from '../../modules/context.js'\nimport { listeQuestionsToContenu, randint } from '../../modules/outils.js'\nimport { ajouteChampTexteMathLive } from '../../lib/interactif/questionMathLive.js'\nimport Decimal from 'decimal.js'\nimport { setReponse } from '../../lib/interactif/gestionInteractif.js'\nimport { miseEnEvidence } from '../../lib/outils/embellissements'\n\nexport const dateDeModifImportante = '05/09/2023'\nexport const titre = 'Give the decimal writing of a power of 10'\nexport const interactifReady = true\nexport const interactifType = 'mathLive'\nexport const amcReady = true\nexport const amcType = 'AMCNum'\n\n/**\n * Donner l'écriture décimale d'une puissance de 10\n * @author Rémi Angot\n */\nexport const uuid = '93df9'\nexport const ref = '4C30-2'\nexport default function EcritureDecimalePuissanceDe10 () {\n  Exercice.call(this)\n  this.nbQuestions = 8\n  this.nbCols = 1\n  this.nbColsCorr = 1\n  this.sup = 3 // exposants positifs et négatifs par défaut\n\n  this.nouvelleVersion = function () {\n    this.listeQuestions = [] // Liste de questions\n    this.listeCorrections = [] // Liste de questions corrigées\n    this.autoCorrection = []\n    this.consigne = this.nbQuestions === 1\n      ? 'Give the decimal writing of the following number.'\n      : 'Give the decimal writing of the following numbers.'\n\n    let listeTypeDeQuestions\n    if (this.sup === 1) {\n      listeTypeDeQuestions = combinaisonListes(['+'], this.nbQuestions)\n    }\n    if (this.sup === 2) {\n      listeTypeDeQuestions = combinaisonListes(['-'], this.nbQuestions)\n    }\n    if (this.sup === 3) {\n      listeTypeDeQuestions = combinaisonListes(['+', '-'], this.nbQuestions)\n    }\n    for (let i = 0, texte, texteCorr, n, cpt = 0; i < this.nbQuestions && cpt < 50;) {\n      switch (listeTypeDeQuestions[i]) {\n        case '+':\n          n = randint(1, 10)\n          texte = this.interactif\n            ? `$10^{${n}}${sp()}=$` + ajouteChampTexteMathLive(this, i, 'width15 inline')\n            : `$10^{${n}}${sp()}=${sp()}\\\\dots$`\n          setReponse(this, i, Decimal.pow(10, n))\n          if (n < 2) {\n            texteCorr = `$10^${n}=${10 ** n}$`\n          } else {\n            if (context.isHtml) {\n              texteCorr = `$10^{${n}}=${puissanceEnProduit(10, n)}=${miseEnEvidence(texNombre(10 ** n, 0))}$`\n            } else {\n              texteCorr = `$10^{${n}}=${miseEnEvidence(texNombre(10 ** n, 0))}$`\n            }\n          }\n          break\n        case '-':\n          n = randint(1, 10)\n          texte = this.interactif\n            ? `$10^{${-n}}${sp()}=$` + ajouteChampTexteMathLive(this, i, 'width15 inline nospacebefore')\n            : `$10^{${-n}}${sp()}=${sp()}\\\\dots$`\n          setReponse(this, i, Decimal.pow(10, -n))\n          if (context.isHtml) {\n            texteCorr = `$10^{${-n}}=\\\\dfrac{1}{10^{${n}}}=\\\\dfrac{1}{${puissanceEnProduit(10, n)}}=\\\\dfrac{1}{${texNombre(10 ** n, 0)}}=${miseEnEvidence(texNombre(Decimal.pow(10, -n), n))}$`\n          } else {\n            texteCorr = `$10^{${-n}}=\\\\dfrac{1}{10^{${n}}}=\\\\dfrac{1}{${texNombre(10 ** n, 0)}}=${miseEnEvidence(texNombre(Decimal.pow(10, -n), n))}$`\n          }\n          break\n      }\n\n      if (this.questionJamaisPosee(i, n, listeTypeDeQuestions[i])) {\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: Positive exponents\\n2: Negative exponents\\n3: Mixture']\n}\n"],"names":["dateDeModifImportante","titre","interactifReady","interactifType","amcReady","amcType","uuid","ref","EcritureDecimalePuissanceDe10","Exercice","listeTypeDeQuestions","combinaisonListes","i","texte","texteCorr","n","cpt","randint","sp","ajouteChampTexteMathLive","setReponse","Decimal","context","puissanceEnProduit","miseEnEvidence","texNombre","listeQuestionsToContenu"],"mappings":"2JAYY,MAACA,EAAwB,aACxBC,EAAQ,4CACRC,EAAkB,GAClBC,EAAiB,WACjBC,EAAW,GACXC,EAAU,SAMVC,EAAO,QACPC,EAAM,SACJ,SAASC,GAAiC,CACvDC,EAAS,KAAK,IAAI,EAClB,KAAK,YAAc,EACnB,KAAK,OAAS,EACd,KAAK,WAAa,EAClB,KAAK,IAAM,EAEX,KAAK,gBAAkB,UAAY,CACjC,KAAK,eAAiB,CAAE,EACxB,KAAK,iBAAmB,CAAE,EAC1B,KAAK,eAAiB,CAAE,EACxB,KAAK,SAAW,KAAK,cAAgB,EACjC,oDACA,qDAEJ,IAAIC,EACA,KAAK,MAAQ,IACfA,EAAuBC,EAAkB,CAAC,GAAG,EAAG,KAAK,WAAW,GAE9D,KAAK,MAAQ,IACfD,EAAuBC,EAAkB,CAAC,GAAG,EAAG,KAAK,WAAW,GAE9D,KAAK,MAAQ,IACfD,EAAuBC,EAAkB,CAAC,IAAK,GAAG,EAAG,KAAK,WAAW,GAEvE,QAASC,EAAI,EAAGC,EAAOC,EAAWC,EAAGC,EAAM,EAAGJ,EAAI,KAAK,aAAeI,EAAM,IAAK,CAC/E,OAAQN,EAAqBE,CAAC,EAAC,CAC7B,IAAK,IACHG,EAAIE,EAAQ,EAAG,EAAE,EACjBJ,EAAQ,KAAK,WACT,QAAQE,CAAC,IAAIG,EAAI,CAAA,KAAOC,EAAyB,KAAMP,EAAG,gBAAgB,EAC1E,QAAQG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