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/can1S08-PJe9_RiL.js.map
{"version":3,"file":"can1S08-PJe9_RiL.js","sources":["../../src/exercices/can/1e/can1S08.js"],"sourcesContent":["import { choice } from '../../../lib/outils/arrayOutils'\nimport { ecritureParentheseSiNegatif } from '../../../lib/outils/ecritures'\nimport { texNombre } from '../../../lib/outils/texNombre'\nimport Exercice from '../../deprecatedExercice.js'\nimport { randint } from '../../../modules/outils.js'\nexport const titre = 'Calculer la raison d’une suite arithmétique/géométrique*'\nexport const interactifReady = true\nexport const interactifType = 'mathLive'\n\n// Les exports suivants sont optionnels mais au moins la date de publication semble essentielle\nexport const dateDePublication = '18/02/2022' // La date de publication initiale au format 'jj/mm/aaaa' pour affichage temporaire d'un tag\n// export const dateDeModifImportante = '14/02/2022' // Une date de modification importante au format 'jj/mm/aaaa' pour affichage temporaire d'un tag\n\n/**\n * Modèle d'exercice très simple pour la course aux nombres\n * @author Gilles Mora\n * Référence\n*/\nexport const uuid = 'baa9f'\nexport const ref = 'can1S08'\nexport default function CalculRaison2 () {\n  Exercice.call(this) // Héritage de la classe Exercice()\n  this.typeExercice = 'simple' // Cette ligne est très importante pour faire faire un exercice simple !\n  this.nbQuestions = 1\n  this.formatChampTexte = 'largeur15 inline'\n  this.tailleDiaporama = 2\n  // Dans un exercice simple, ne pas mettre de this.listeQuestions = [] ni de this.consigne\n\n  this.nouvelleVersion = function () {\n    let u, i, v, r, q, n, choix\n    const nomSuite = ['u', 'v', 'w']\n    const s = choice(nomSuite)\n    switch (choice(['a', 'b'])) { // 'b', 'c', 'd'\n      case 'a':// suite arithmétique\n        u = randint(-12, 12, 0)\n        r = randint(-10, 10, 0)\n        n = randint(2, 10)\n        v = u + n * r\n        i = randint(0, 10)\n        this.question = `Soit $(${s}_n)$ une suite arithmétique telle que :<br>\n$${s}_{${i}}=${u}$ et  $${s}_{${i + n}}=${v}$.<br>\n\nDonner la raison $r$ de cette suite.`\n        if (!this.interactif) {\n          this.question += ''\n        } else {\n          this.question += '<br> $r=$'\n        }\n        this.correction = `La suite $(${s}_n)$ est une suite arithmétique  de raison $r$. Donc, pour tout entier naturel $n$ et $p$, on a : $u_n=u_p+(n-p)r$.<br>\n        Ainsi, $${s}_{${i + n}}=${s}_{${i}}+(${i + n}-${i})r=${s}_{${i}}+${n}r$.<br>\n       On en déduit :  $r=\\\\dfrac{${s}_{${i + n}}-${s}_{${i}}}{${n}}=\\\\dfrac{${v}-${ecritureParentheseSiNegatif(u)}}{${n}}=${r}$.`\n\n        this.reponse = r\n        this.canEnonce = this.question\n        this.canReponseACompleter = '$r=\\\\ldots$'\n        break\n      case 'b':// suite géométrique\n        choix = choice([1, 2, 3])//\n        if (choix === 1) { // q>0 avec q=2,3,10\n          u = randint(1, 10)\n          q = choice([2, 3, 10])\n          // n = 2\n          v = u * q ** 2\n          i = randint(0, 10)\n          this.question = `Soit $(${s}_n)$ une suite géométrique de raison positive telle que :<br>\n$${s}_{${i}}=${u}$ et  $${s}_{${i + 2}}=${v}$.<br>\n\nDonner la raison $q$ de cette suite.`\n          if (!this.interactif) {\n            this.question += ''\n          } else {\n            this.question += '<br> $q=$'\n          }\n          this.correction = `La suite $(${s}_n)$ est une suite géométrique  de raison $q$ positive. Donc, pour tout entier naturel $n$ et $p$, on a : $u_n=u_p\\\\times q^{n-p}$.<br>\n        Ainsi, $${s}_{${i + 2}}=${s}_{${i}}\\\\times q^{${i + 2}-${i}}=${s}_{${i}}\\\\times q^{2}$.<br>\n       On en déduit :  $q^2=\\\\dfrac{${s}_{${i + 2}}}{${s}_{${i}}}=\\\\dfrac{${v}}{${u}}=${texNombre(q * q)}$.<br>\n       Puisque $q$ est un nombre positif, on obtient : $q=${texNombre(q)}$.`\n\n          this.reponse = q\n          this.canEnonce = this.question\n          this.canReponseACompleter = '$q=\\\\ldots$'\n        }\n        if (choix === 2) { // q<0 avec q=-2,-3,-10\n          u = randint(1, 10)\n          q = choice([2, 3, 10])\n          // n = 2\n          v = u * q ** 2\n          i = randint(0, 10)\n          this.question = `Soit $(${s}_n)$ une suite géométrique de raison négative telle que :<br>\n    $${s}_{${i}}=${u}$ et  $${s}_{${i + 2}}=${v}$.<br>\n\n    Donner la raison $q$ de cette suite.`\n          if (!this.interactif) {\n            this.question += ''\n          } else {\n            this.question += '<br> $q=$'\n          }\n          this.correction = `La suite $(${s}_n)$ est une suite géométrique  de raison $q$ positive. Donc, pour tout entier naturel $n$ et $p$, on a : $u_n=u_p\\\\times q^{n-p}$.<br>\n            Ainsi, $${s}_{${i + 2}}=${s}_{${i}}\\\\times q^{${i + 2}-${i}}=${s}_{${i}}\\\\times q^{2}$.<br>\n           On en déduit :  $q^2=\\\\dfrac{${s}_{${i + 2}}}{${s}_{${i}}}=\\\\dfrac{${v}}{${u}}=${q * q}$.<br>\n           Puisque $q$ est un nombre négatif, on obtient : $q=${-q}$.`\n\n          this.reponse = -q\n          this.canEnonce = this.question\n          this.canReponseACompleter = '$q=\\\\ldots$'\n        }\n        if (choix === 3) { // q^3\n          u = randint(1, 3) * choice([-1, 1])\n          q = choice([-3, -2, 2, 3])\n          v = u * q ** 3\n          i = randint(0, 10)\n          this.question = `Soit $(${s}_n)$ une suite géométrique  telle que :<br>\n  $${s}_{${i}}=${u}$ et  $${s}_{${i + 3}}=${v}$.<br>\n\n  Donner la raison $q$ de cette suite.`\n          if (!this.interactif) {\n            this.question += ''\n          } else {\n            this.question += '<br> $q=$'\n          }\n          this.correction = `La suite $(${s}_n)$ est une suite géométrique  de raison $q$ positive. Donc, pour tout entier naturel $n$ et $p$, on a : $u_n=u_p\\\\times q^{n-p}$.<br>\n          Ainsi, $${s}_{${i + 3}}=${s}_{${i}}\\\\times q^{${i + 3}-${i}}=${s}_{${i}}\\\\times q^{3}$.<br>\n         On en déduit :  $q^3=\\\\dfrac{${s}_{${i + 3}}}{${s}_{${i}}}=\\\\dfrac{${v}}{${u}}=${q ** 3}$.<br>\n         On obtient : $q=${q}$.`\n\n          this.reponse = q\n          this.canEnonce = this.question\n          this.canReponseACompleter = '$q=\\\\ldots$'\n        }\n    }\n  }\n}\n"],"names":["titre","interactifReady","interactifType","dateDePublication","uuid","ref","CalculRaison2","Exercice","u","i","v","r","q","n","choix","s","choice","randint","ecritureParentheseSiNegatif","texNombre"],"mappings":"oEAKY,MAACA,EAAQ,2DACRC,EAAkB,GAClBC,EAAiB,WAGjBC,EAAoB,aAQpBC,EAAO,QACPC,EAAM,UACJ,SAASC,GAAiB,CACvCC,EAAS,KAAK,IAAI,EAClB,KAAK,aAAe,SACpB,KAAK,YAAc,EACnB,KAAK,iBAAmB,mBACxB,KAAK,gBAAkB,EAGvB,KAAK,gBAAkB,UAAY,CACjC,IAAIC,EAAGC,EAAGC,EAAGC,EAAGC,EAAGC,EAAGC,EAEtB,MAAMC,EAAIC,EADO,CAAC,IAAK,IAAK,GAAG,CACN,EACzB,OAAQA,EAAO,CAAC,IAAK,GAAG,CAAC,EAAC,CACxB,IAAK,IACHR,EAAIS,EAAQ,IAAK,GAAI,CAAC,EACtBN,EAAIM,EAAQ,IAAK,GAAI,CAAC,EACtBJ,EAAII,EAAQ,EAAG,EAAE,EACjBP,EAAIF,EAAIK,EAAIF,EACZF,EAAIQ,EAAQ,EAAG,EAAE,EACjB,KAAK,SAAW,UAAUF,CAAC;AAAA,GAChCA,CAAC,KAAKN,CAAC,KAAKD,CAAC,UAAUO,CAAC,KAAKN,EAAII,CAAC,KAAKH,CAAC;AAAA;AAAA,sCAG9B,KAAK,WAGR,KAAK,UAAY,YAFjB,KAAK,UAAY,GAInB,KAAK,WAAa,cAAcK,CAAC;AAAA,kBACvBA,CAAC,KAAKN,EAAII,CAAC,KAAKE,CAAC,KAAKN,CAAC,MAAMA,EAAII,CAAC,IAAIJ,C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