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/6N23-7-BH3LNkoB.js.map
{"version":3,"file":"6N23-7-BH3LNkoB.js","sources":["../../src/exercices/6e/6N23-7.js"],"sourcesContent":["import { choice } from '../../lib/outils/arrayOutils'\nimport { texNombre } from '../../lib/outils/texNombre'\nimport Exercice from '../deprecatedExercice.js'\nimport { fixeBordures, mathalea2d } from '../../modules/2dGeneralites.js'\nimport { context } from '../../modules/context.js'\nimport { listeQuestionsToContenu, randint } from '../../modules/outils.js'\n\nimport { barre3d, cube3d, paveLPH3d, plaque3d } from '../../modules/3d.js'\nimport { ajouteChampTexteMathLive } from '../../lib/interactif/questionMathLive.js'\nimport { setReponse } from '../../lib/interactif/gestionInteractif.js'\nimport { arrondi } from '../../lib/outils/nombres'\n\nexport const titre = 'Recompose a decimal number represented by fractions of the unit cube'\nexport const interactifReady = true\nexport const interactifType = 'mathLive'\nexport const amcReady = true\nexport const amcType = 'AMCNum'\n\nexport const dateDeModifImportante = '13/12/2023'\n\nexport const uuid = '63f03'\nexport const ref = '6N23-7'\nexport default function RecompositionDecimale () {\n  Exercice.call(this)\n  this.nbQuestions = 1 // Ici le nombre de questions\n  this.spacingCorr = 3\n  this.nbQuestionsModifiable = true // Active le formulaire nombre de questions\n  this.nbCols = 1 // Le nombre de colonnes dans l'énoncé LaTeX\n  this.nbColsCorr = 1// Le nombre de colonne pour la correction LaTeX\n  this.pasDeVersionLatex = false // mettre à true si on ne veut pas de l'exercice dans le générateur LaTeX\n  this.pas_de_version_HMTL = false // mettre à true si on ne veut pas de l'exercice en ligne\n  this.correctionDetailleeDisponible = true\n  this.correctionDetaillee = true\n\n  this.nouvelleVersion = function () {\n    this.listeQuestions = [] // tableau contenant la liste des questions\n    this.listeCorrections = []\n    this.autoCorrection = []\n    context.anglePerspective = 30\n    context.coeffPerspective = 0.5\n    const cubeUnite = paveLPH3d(0, 0, 0, 0.6, 10, 10, 10, 'black')\n    const reponses = []\n    this.consigne = 'Here is a cube representing a unit, a plate representing $\\\\dfrac{1}{10}$, a bar representing $\\\\dfrac{1}{100}$ and a small cube representing $\\\\dfrac{1}{1000 }$.<br>'\n    let objets = []\n    objets.push(...cubeUnite.c2d, ...plaque3d(9, 0, 0, 0.5, 10, 10).c2d, ...barre3d(9, 0, 3, 0.5, 10).c2d, ...cube3d(12, 0, 5, 0.5).c2d)\n    this.consigne += mathalea2d(Object.assign({ scale: 0.5 }, fixeBordures(objets)), objets)\n    for (let q = 0, cpt = 0, e, d, c, m, texte, texteCorr, xDecal; q < this.nbQuestions && cpt < 50;) {\n      e = choice([0, 1])\n      d = choice([0, randint(0, 5), randint(0, 7)])\n      c = choice([0, randint(0, 5), randint(5, 9)])\n      m = randint(0, 9)\n      xDecal = 0\n\n      texteCorr = ''\n      texte = 'What is the decimal number represented by this set of solids?<br>'\n      objets = []\n      if (e === 1) {\n        objets.push(...cubeUnite.c2d)\n        xDecal += 7\n      }\n      if (d !== 0) {\n        for (let i = 0; i < d; i++) {\n          objets.push(...plaque3d(xDecal, 0, i * 0.6, 0.5, 10, 10, 'black').c2d)\n        }\n        xDecal += 6.5\n      }\n      if (c !== 0) {\n        for (let i = c - 1; i >= 0; i--) {\n          objets.push(...barre3d(xDecal, i * 0.75, 0, 0.5, 10, 'black').c2d)\n        }\n        xDecal += 6 + c * 0.2\n      }\n      if (m !== 0) {\n        for (let i = 0; i < m; i++) {\n          objets.push(...cube3d(xDecal + i * 0.8, 0, 0, 0.5, 'black').c2d)\n        }\n      }\n      xDecal += m * 0.8\n      texte += mathalea2d(Object.assign({ scale: 0.5 }, fixeBordures(objets)), objets)\n      if (!context.isAmc) texte += ajouteChampTexteMathLive(this, q, 'largeur25')\n\n      if (this.correctionDetaillee) {\n        if (e === 1) texteCorr += 'There is 1 unit cube.<br>'\n        if (d !== 0) {\n          if (d === 1) texteCorr += 'There is 1 plaque representing $\\\\dfrac{1}{10}$.<br>'\n          else texteCorr += `There are ${d} plates each representing $\\\\dfrac{1}{10}$, i.e. $\\\\dfrac{${d}}{10}$.<br>`\n        }\n        if (c !== 0) {\n          if (c === 1) texteCorr += 'There is 1 bar representing $\\\\dfrac{1}{100}$.<br>'\n          else texteCorr += `There are ${c} bars each representing $\\\\dfrac{1}{100}$, or $\\\\dfrac{${c}}{100}$.<br>`\n        }\n        if (m !== 0) {\n          if (m === 1) texteCorr += 'There is 1 small cube representing $\\\\dfrac{1}{1000}$.<br>'\n          else texteCorr += `There are ${m} cubes each representing $\\\\dfrac{1}{1000}$, i.e. $\\\\dfrac{${m}}{1000}$.<br>`\n        }\n        texteCorr += `The number represented above is therefore: $${texNombre(e + d / 10 + c / 100 + m / 1000)}$.`\n      } else {\n        texteCorr += 'We count'\n        if (e === 1) texteCorr += '1 unit,'\n        texteCorr += `$\\\\dfrac{${d}}{10}$,`\n        texteCorr += `$\\\\dfrac{${c}}{100}$ and`\n        texteCorr += `$\\\\dfrac{${m}}{1000}$.<br>The decimal number shown above is the number $${texNombre(e + d / 10 + c / 100 + m / 1000)}$.`\n      }\n      // if (answers.indexOf(e + d / 10 + c / 100 + m / 1000) === -1) {\n      if (this.questionJamaisPosee(q, e, d, c, m)) {\n        // If the question has never been asked, we create another one\n        reponses[q] = arrondi(e + d / 10 + c / 100 + m / 1000, 3)\n        this.listeQuestions.push(texte)\n        this.listeCorrections.push(texteCorr)\n        setReponse(this, q, reponses[q], { digits: 4, decimals: 3 })\n        q++\n      }\n      cpt++\n    }\n    listeQuestionsToContenu(this) // On envoie l'exercice à la fonction de mise en page\n  }\n}\n"],"names":["titre","interactifReady","interactifType","amcReady","amcType","dateDeModifImportante","uuid","ref","RecompositionDecimale","Exercice","context","cubeUnite","paveLPH3d","reponses","objets","plaque3d","barre3d","cube3d","mathalea2d","fixeBordures","q","cpt","e","d","c","m","texte","texteCorr","xDecal","choice","randint","i","ajouteChampTexteMathLive","texNombre","arrondi","setReponse","listeQuestionsToContenu"],"mappings":"0OAYY,MAACA,EAAQ,uEACRC,EAAkB,GAClBC,EAAiB,WACjBC,EAAW,GACXC,EAAU,SAEVC,EAAwB,aAExBC,EAAO,QACPC,EAAM,SACJ,SAASC,GAAyB,CAC/CC,EAAS,KAAK,IAAI,EAClB,KAAK,YAAc,EACnB,KAAK,YAAc,EACnB,KAAK,sBAAwB,GAC7B,KAAK,OAAS,EACd,KAAK,WAAa,EAClB,KAAK,kBAAoB,GACzB,KAAK,oBAAsB,GAC3B,KAAK,8BAAgC,GACrC,KAAK,oBAAsB,GAE3B,KAAK,gBAAkB,UAAY,CACjC,KAAK,eAAiB,CAAE,EACxB,KAAK,iBAAmB,CAAE,EAC1B,KAAK,eAAiB,CAAE,EACxBC,EAAQ,iBAAmB,GAC3BA,EAAQ,iBAAmB,GAC3B,MAAMC,EAAYC,EAAU,EAAG,EAAG,EAAG,GAAK,GAAI,GAAI,GAAI,OAAO,EACvDC,EAAW,CAAE,EACnB,KAAK,SAAW,yKAChB,IAAIC,EAAS,CAAE,EACfA,EAAO,KAAK,GAAGH,EAAU,IAAK,GAAGI,EAAS,EAAG,EAAG,EAAG,GAAK,GAAI,EAAE,EAAE,IAAK,GAAGC,EAAQ,EAAG,EAAG,EAAG,GAAK,EAAE,EAAE,IAAK,GAAGC,EAAO,GAAI,EAAG,EAAG,EAAG,EAAE,GAAG,EACnI,KAAK,UAAYC,EAAW,OAAO,OAAO,CAAE,MAAO,EAAK,EAAEC,EAAaL,CAAM,CAAC,EAAGA,CAAM,EACvF,QAASM,EAAI,EAAGC,EAAM,EAAGC,EAAGC,EAAGC,EAAGC,EAAGC,EAAOC,EAAWC,EAAQR,EAAI,KAAK,aAAeC,EAAM,IAAK,CAchG,GAbAC,EAAIO,EAAO,CAAC,EAAG,CAAC,CAAC,EACjBN,EAAIM,EAAO,CAAC,EAAGC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