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/6C30-4-xc7NH_9D.js.map
{"version":3,"file":"6C30-4-xc7NH_9D.js","sources":["../../src/exercices/6e/6C30-4.js"],"sourcesContent":["import { choice } from '../../lib/outils/arrayOutils'\nimport { deprecatedTexFraction } from '../../lib/outils/deprecatedFractions.js'\nimport { texNombre, texNombre2 } 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'\n\nexport const amcReady = true\nexport const amcType = 'qcmMono'\nexport const interactifType = 'qcm'\nexport const interactifReady = true\n\nexport const titre = 'Multiply by 0.1; 0.01; 0.001 (place decimal point)'\n\n/**\n * @author Jean-claude Lhote\n * Publié le 20/02/2021\n * Référence 6C30-4\n * Relecture : Décembre 2021 par EE\n */\nexport const uuid = '47a54'\nexport const ref = '6C30-4'\nexport default function PlacerLaVirgule () {\n  Exercice.call(this)\n  this.titre = titre\n  this.nbQuestions = 4 // Ici le nombre de questions\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.consigne = 'The following calculations are wrong. Place the decimal point correctly in the result so that the calculation is correct.'\n  this.sup = false\n\n  // this is where the exercise code begins this function creates a copy of the exercise\n  this.nouvelleVersion = function () {\n    // the numeroExercice variable can be retrieved to allow two copies of the same exo to be differentiated\n    // For example, to be sure not to have the same point names by calling this exo twice on the same page\n\n    if (this.nbQuestions > 1) {\n      if (this.interactif) {\n        this.consigne = 'Determine the result of these multiplications.'\n      } else {\n        this.consigne = 'The following calculations are wrong. Place the decimal point correctly in the result so that the calculation is correct.'\n      }\n    } else {\n      if (this.interactif) {\n        this.consigne = 'Determine the result of this multiplication.'\n      } else {\n        this.consigne = 'The following calculation is wrong. Place the decimal point correctly in the result so that the calculation is correct.'\n      }\n    }\n\n    this.listeQuestions = [] // tableau contenant la liste des questions\n    this.listeCorrections = []\n    this.autoCorrection = []\n    const rang = ['thousandths', 'hundredths', 'tenths']\n\n    // Essential to export the solutions to make the multiple choice questions interactive\n    this.tableauSolutionsDuQcm = []\n    for (let i = 0, texte, texteCorr, coef, nombre, nombreentier, resultat, exposant, cpt = 0; i < this.nbQuestions && cpt < 50;) {\n      texte = '' // Nous utilisons souvent cette variable pour construire le texte de la question.\n      texteCorr = '' // Idem pour le texte de la correction.\n      coef = -randint(1, 3)\n      if (!this.sup) {\n        exposant = -randint(1, 3)\n      } else {\n        exposant = 0\n      }\n      nombreentier = calculANePlusJamaisUtiliser(randint(10, 1000) + randint(10, 999) * choice([0, 1000]))\n      nombre = calculANePlusJamaisUtiliser(nombreentier * 10 ** exposant)\n      resultat = calculANePlusJamaisUtiliser(nombre * 10 ** coef)\n      texte = `$${texNombre2(nombre)} \\\\times ${texNombre2(calculANePlusJamaisUtiliser(10 ** coef))}$`\n      if (!this.interactif) {\n        texte += `$~~ = ~~\\\\phantom{......}${texNombre2(nombreentier)}$<br>`\n      }\n      texteCorr = `When we multiply by $${texNombre2(calculANePlusJamaisUtiliser(10 ** coef))}=${deprecatedTexFraction(1, calculANePlusJamaisUtiliser(10 ** (-coef)))}$, each figure takes a value $${texNombre(10 ** (-coef))}$ times smaller.<br>`\n      texteCorr += `The units figure is therefore positioned in the ${rang[3 + coef]}:<br>`\n      texteCorr += `$${texNombre2(nombre)} \\\\times ${texNombre2(calculANePlusJamaisUtiliser(10 ** coef))} = ${texNombre2(resultat)}$`// ${texNombre(Math.floor(resultat))}${miseEnEvidence(',')}${texNombre(resultat-Math.floor(resultat)).replace('0,','')}$`\n\n      this.autoCorrection[i] = {}\n      this.autoCorrection[i].enonce = `${texte}\\n`\n      this.autoCorrection[i].propositions = [\n        {\n          texte: `$${texNombre2(resultat)}$`,\n          statut: true\n        },\n        {\n          texte: `$${texNombre2(calculANePlusJamaisUtiliser(resultat / 10))}$`,\n          statut: false\n        },\n        {\n          texte: `$${texNombre2(calculANePlusJamaisUtiliser(resultat * 10))}$`,\n          statut: false\n        },\n        {\n          texte: `$${texNombre2(calculANePlusJamaisUtiliser(resultat / 100))}$`,\n          statut: false\n        }\n      ]\n      this.autoCorrection[i].options = {\n        ordered: false,\n        lastChoice: 4\n      }\n      if (this.interactif) {\n        texte += '<br>' + propositionsQcm(this, i).texte\n      }\n      if (this.listeQuestions.indexOf(texte) === -1) {\n        // If the question has never been asked, we store it in the list of questions\n        this.listeQuestions.push(texte)\n        this.listeCorrections.push(texteCorr)\n        i++\n      }\n      cpt++\n    }\n    listeQuestionsToContenu(this) // On envoie l'exercice à la fonction de mise en page\n  }\n  // If the following variables are defined, they cause the corresponding parameter forms to be displayed\n  // They can be of 3 types: _numeric, _checkbox_or _text.\n  // They are associated respectively with the sup, sup2 and sup3 parameters.\n\n  this.besoinFormulaireCaseACocher = ['Whole numbers', true]\n} // Fin de l'exercice.\n"],"names":["amcReady","amcType","interactifType","interactifReady","titre","uuid","ref","PlacerLaVirgule","Exercice","rang","i","texte","texteCorr","coef","nombre","nombreentier","resultat","exposant","cpt","randint","calculANePlusJamaisUtiliser","choice","texNombre2","deprecatedTexFraction","texNombre","propositionsQcm","listeQuestionsToContenu"],"mappings":"iJAOY,MAACA,EAAW,GACXC,EAAU,UACVC,EAAiB,MACjBC,EAAkB,GAElBC,EAAQ,qDAQRC,EAAO,QACPC,EAAM,SACJ,SAASC,GAAmB,CACzCC,EAAS,KAAK,IAAI,EAClB,KAAK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