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/4G20-2-eP_JH9jJ.js.map
{"version":3,"file":"4G20-2-eP_JH9jJ.js","sources":["../../src/exercices/4e/4G20-2.js"],"sourcesContent":["import { combinaisonListes } from '../../lib/outils/arrayOutils'\nimport Exercice from '../Exercice.js'\nimport { listeQuestionsToContenu } from '../../modules/outils.js'\nimport { context } from '../../modules/context.js'\nimport { setReponse } from '../../lib/interactif/gestionInteractif.js'\n\nimport { ajouteChampTexteMathLive } from '../../lib/interactif/questionMathLive.js'\nexport const titre = 'Determining the square root of a perfect square (mental calculation)'\nexport const amcReady = true\nexport const amcType = 'AMCNum'\nexport const interactifType = 'mathLive'\nexport const interactifReady = true\n\n/**\n * Déterminer la racine carrée d'un carré parfait compris entre 1 et 256\n * @author Stéphane Guyon et Guillaume Valmont\n * Référence 4G20-2\n * Mis à jour le 08/08/2021\n */\nexport const uuid = 'f5cbd'\nexport const ref = '4G20-2'\nexport default function RacineCareeDeCarresParfaits () {\n  Exercice.call(this) // Héritage de la classe Exercice()\n  this.titre = titre\n  this.amcReady = amcReady\n  this.amcType = amcType\n  this.interactifReady = interactifReady\n  this.interactifType = interactifType\n  this.nbQuestions = 4\n  this.nbCols = 2\n  this.nbColsCorr = 2\n  this.besoinFormulaireNumerique = ['Question wording', 3, '1: Calculate the root of ...\\n2: Find the positive number whose square is ...\\n3: Mixture']\n  this.besoinFormulaire2Numerique = ['Maximum integer', 2, '1:144\\n2:256']\n  this.sup = 1\n  this.sup2 = 2\n\n  this.nouvelleVersion = function () {\n    this.listeQuestions = [] // Liste de questions\n    this.listeCorrections = [] // Liste de questions corrigées\n    this.autoCorrection = []\n    let listeRacines = []\n    let listeQuestions = []\n    this.sup = parseInt(this.sup)\n    this.sup2 = parseInt(this.sup2)\n    if (this.sup === 1) {\n      listeQuestions = [1]\n    } else if (this.sup === 2) {\n      listeQuestions = [2]\n    } else if (this.sup === 3) {\n      listeQuestions = [1, 2]\n    }\n    listeQuestions = combinaisonListes(listeQuestions, this.nbQuestions) // pour varier les questions\n    if (this.sup2 === 1) {\n      listeRacines = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]\n    } else {\n      listeRacines = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]\n    }\n    listeRacines = combinaisonListes(listeRacines, this.nbQuestions) // pour avoir une meilleure randomisation que randint\n    for (let i = 0, texte, texteCorr, a, c, cpt = 0; i < this.nbQuestions && cpt < 50;) {\n      a = listeRacines[i]\n      c = a * a\n      if (listeQuestions[i] === 1) {\n        texte = `Calculate in head $\\\\sqrt{${c}}=$` + ajouteChampTexteMathLive(this, i)\n      } else if (listeQuestions[i] === 2) {\n        texte = `What is the positive number whose square is $${c}$?` + ajouteChampTexteMathLive(this, i)\n      }\n      texteCorr = `$\\\\sqrt{${c}}=${a}$`\n      setReponse(this, i, a)\n\n      if (this.listeQuestions.indexOf(texte) === -1) {\n        if (context.isAmc) {\n          if (listeQuestions[i] === 1) {\n            this.autoCorrection[i].enonce = `$\\\\sqrt{${c}}=\\\\dots$`\n            this.autoCorrection[i].propositions = [{ texte: `$\\\\sqrt{${c}}=${a}$`, statut: '' }]\n          } else {\n            this.autoCorrection[i].enonce = `$${c} = \\\\dots^2$`\n            this.autoCorrection[i].propositions = [{ texte: `$${c}=${a}^2$`, statut: '' }]\n          }\n          this.autoCorrection[i].reponse.param = {\n            digits: 2,\n            decimals: 0,\n            exposantNbChiffres: 0,\n            exposantSigne: false,\n            signe: false\n          }\n        }\n        this.listeQuestions.push(texte)\n        this.listeCorrections.push(texteCorr)\n        i++\n      }\n      cpt++\n    }\n    listeQuestionsToContenu(this)\n  }\n}\n"],"names":["titre","amcReady","amcType","interactifType","interactifReady","uuid","ref","RacineCareeDeCarresParfaits","Exercice","listeRacines","listeQuestions","combinaisonListes","i","texte","texteCorr","a","c","cpt","ajouteChampTexteMathLive","setReponse","context","listeQuestionsToContenu"],"mappings":"4EAOY,MAACA,EAAQ,uEACRC,EAAW,GACXC,EAAU,SACVC,EAAiB,WACjBC,EAAkB,GAQlBC,EAAO,QACPC,EAAM,SACJ,SAASC,GAA+B,CACrDC,EAAS,KAAK,IAAI,EAClB,KAAK,MAAQR,EACb,KAAK,SAAWC,EAChB,KAAK,QAAUC,EACf,KAAK,gBAAkBE,EACvB,KAAK,eAAiBD,EACtB,KAAK,YAAc,EACnB,KAAK,OAAS,EACd,KAAK,WAAa,EAClB,KAAK,0BAA4B,CAAC,mBAAoB,EAAG;AAAA;AAAA,WAA2F,EACpJ,KAAK,2BAA6B,CAAC,kBAAmB,EAAG;AAAA,MAAc,EACvE,KAAK,IAAM,EACX,KAAK,KAAO,EAEZ,KAAK,gBAAkB,UAAY,CACjC,KAAK,eAAiB,CAAE,EACxB,KAAK,iBAAmB,CAAE,EAC1B,KAAK,eAAiB,CAAE,EACxB,IAAIM,EAAe,CAAE,EACjBC,EAAiB,CAAE,EACvB,KAAK,IAAM,SAAS,KAAK,GAAG,EAC5B,KAAK,KAAO,SAAS,KAAK,IAAI,EAC1B,KAAK,MAAQ,EACfA,EAAiB,CAAC,CAAC,EACV,KAAK,MAAQ,EACtBA,EAAiB,CAAC,CAAC,EACV,KAAK,MAAQ,IACtBA,EAAiB,CAAC,EAAG,CAAC,GAExBA,EAAiBC,EAAkBD,EAAgB,KAAK,WAAW,EAC/D,KAAK,OAAS,EAChBD,EAAe,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,GAAI,GAAI,EAAE,EAErDA,EAAe,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,EAAE,EAEvEA,EAAeE,EAA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