File: /home/mmtprep/public_html/mathzen.mmtprep.com/assets/can2N01-o8-XqwpW.js.map
{"version":3,"file":"can2N01-o8-XqwpW.js","sources":["../../src/exercices/can/2e/can2N01.js"],"sourcesContent":["import { choice } from '../../../lib/outils/arrayOutils'\nimport { texteEnCouleur } from '../../../lib/outils/embellissements'\nimport { sp } from '../../../lib/outils/outilString.js'\nimport { texNombre } from '../../../lib/outils/texNombre.js'\nimport Exercice from '../../Exercice.js'\nimport { randint, calculANePlusJamaisUtiliser } from '../../../modules/outils.js'\nexport const titre = 'Utiliser les intervalles'\nexport const interactifReady = true\nexport const interactifType = 'mathLive'\n\n/**\n * Modèle d'exercice très simple pour la course aux nombres\n * @author Gilles Mora\n * Référence can2N01\n * Date de publication 24/10/2021\n*/\nexport const uuid = 'f6f76'\nexport const ref = 'can2N01'\nexport default function Intervalles () {\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.date = 1635094684684\n this.nbQuestions = 1\n this.tailleDiaporama = 2\n // Dans un exercice simple, ne pas mettre de this.listeQuestions = [] ni de this.consigne\n this.formatChampTexte = 'largeur15 inline'\n this.nouvelleVersion = function () {\n let a, b, c, N, d, e\n\n switch (choice([1, 2])) { //, 2, 2\n case 1:\n a = randint(1, 4) * (-1)\n b = randint(1, 4)\n c = calculANePlusJamaisUtiliser(randint(-4, -1) + randint(-9, -1) / 10)\n N = choice(['a', 'b', 'c', 'd', 'e'])//, ${miseEnEvidence(a, 'black') + sp(2)} ; ${sp(2) + miseEnEvidence(b, 'black')} Bigg[${a} ${sp(2)} ; ${sp(2)} ${b}\\\\Bigg]$ <br><br>$\\\\left]${miseEnEvidence(a, 'black') + sp(2)} ; ${sp(2) + miseEnEvidence(b, 'black')}\\\\right]$?<br>\n if (N === 'a') {\n this.question = `Combien y a-t-il d'entiers dans l'intervalle $\\\\bigg[${a} ${sp(1)} ; ${sp(1)} ${b}\\\\bigg]$ ?\n `\n this.correction = ` Il y a $${b - a + 1}$ ${b - a + 1 === 1 ? 'entier' : 'entiers'} dans l'intervalle $\\\\bigg[${a}${sp(1)} ; ${sp(1)}${b}\\\\bigg]$.`\n this.correction += texteEnCouleur(`<br> Mentalement : <br>\n Comptez-les !<br>\n Ou bien en calculant la différence des bornes et en ajoutant $1$ puisque les bornes de l'intervalle sont \"comprises\".<br>\n On trouve : $${b}-(${a})+1=${b - a + 1}$.\n `)\n this.reponse = b - a + 1\n }\n if (N === 'b') {\n this.question = `Combien y a-t-il d'entiers dans l'intervalle $\\\\bigg]${a} ${sp(1)} ; ${sp(1)} ${b}\\\\bigg]$ ?`\n this.correction = ` Il y a $${b - a}$ ${b - a === 1 ? 'entier' : 'entiers'} dans l'intervalle $\\\\bigg]${a} ${sp(1)} ; ${sp(1)} ${b}\\\\bigg]$.`\n this.correction += texteEnCouleur(`<br> Mentalement : <br>\n Comptez-les !<br>\n Attention l'entier $${a}$ n'appartient pas à l'intervalle.\n `)\n this.reponse = b - a\n }\n if (N === 'c') {\n this.question = `Combien y a-t-il d'entiers dans l'intervalle $\\\\bigg]${a} ${sp(1)} ; ${sp(1)} ${b}\\\\bigg[$ ?`\n this.correction = ` Il y a $${b - a - 1}$ ${b - a - 1 === 1 ? 'entier' : 'entiers'} dans l'intervalle $\\\\bigg]${a} ${sp(1)} ; ${sp(1)} ${b}\\\\bigg[$.`\n this.correction += texteEnCouleur(`<br> Mentalement : <br>\n Comptez-les !<br>\n Attention les entiers $${a}$ et $${b}$ n'appartiennent pas à l'intervalle.\n `)\n this.reponse = b - a - 1\n }\n if (N === 'd') {\n this.question = `Combien y a-t-il d'entiers dans l'intervalle $\\\\bigg[${texNombre(c)} ${sp(1)} ; ${sp(1)} ${b} \\\\bigg[$ ?`\n this.correction = `Il y a $${b - Math.trunc(c)}$ ${b - Math.trunc(c) === 1 ? 'entier' : 'entiers'} dans l'intervalle $\\\\bigg[${texNombre(c)} ${sp(1)} ; ${sp(1)} ${b}\\\\bigg[$.`\n this.correction += texteEnCouleur(`<br> Mentalement : <br>\n Comptez-les !<br>\n `)\n this.reponse = b - Math.trunc(c)\n }\n if (N === 'e') {\n this.question = `Combien y a-t-il d'entiers dans l'intervalle $\\\\bigg[${texNombre(c)} ${sp(1)} ; ${sp(1)} ${b}\\\\bigg]$ ?`\n this.correction = `Il y a $${b - Math.trunc(c) + 1}$ ${b - Math.trunc(c) === 1 ? 'entier' : 'entiers'} dans dans l'intervalle $\\\\bigg[${texNombre(c)} ${sp(1)} ; ${sp(1)} ${b}\\\\bigg]$.`\n this.correction += texteEnCouleur(`<br> Mentalement : <br>\n Comptez-les !<br>\n `)\n this.reponse = b - Math.trunc(c) + 1\n }\n break\n\n case 2 :\n a = randint(1, 4) * (-1)\n b = randint(1, 4)\n c = calculANePlusJamaisUtiliser(randint(-9, -4) + randint(-9, -1) / 10)\n d = calculANePlusJamaisUtiliser(c + randint(2, 4))\n e = randint(-8, -1)\n N = choice(['a', 'b', 'c', 'd'])//,\n if (N === 'a') {\n this.question = `Quel est le plus petit entier appartenant à l'intervalle $\\\\bigg]${a} ${sp(1)} ; ${sp(1)} ${b}\\\\bigg[$ ?`\n this.correction = `C'est le plus petit entier strictement supérieur à $${a}$ : il s'agit de $${a + 1}$.`\n this.reponse = a + 1\n }\n if (N === 'b') {\n this.question = `Quel est le plus petit entier de l'intervalle $\\\\bigg]${texNombre(c)} ${sp(1)} ; ${sp(1)} ${b}\\\\bigg[$ ?`\n this.correction = `C'est le plus petit entier strictement supérieur à $${texNombre(c)}$ : il s'agit de $${Math.trunc(c)}$.`\n this.reponse = Math.trunc(c)\n }\n if (N === 'c') {\n this.question = `Quel est le plus grand entier de l'intervalle $\\\\bigg]${texNombre(c)} ${sp(1)} ; ${sp(1)} ${texNombre(d)}\\\\bigg[$ ?`\n this.correction = `C'est le plus grand entier strictement inférieur à $${texNombre(d)}$ : il s'agit de $${Math.trunc(d) - 1}$.`\n this.reponse = Math.trunc(d) - 1\n }\n if (N === 'd') {\n this.question = `Quel est le plus grand entier de l'intervalle $\\\\bigg]${texNombre(e - 4)} ${sp(1)} ; ${sp(1)} ${texNombre(e)}\\\\bigg[$ ?`\n this.correction = `C'est le plus grand entier strictement inférieur à $${texNombre(e)}$ : il s'agit de $${e - 1}$.`\n this.reponse = e - 1\n }\n break\n }\n this.canEnonce = this.question// 'Compléter'\n this.canReponseACompleter = ''\n }\n}\n"],"names":["titre","interactifReady","interactifType","uuid","ref","Intervalles","Exercice","a","b","c","N","d","e","choice","randint","calculANePlusJamaisUtiliser","sp","texteEnCouleur","texNombre"],"mappings":"oFAMY,MAACA,EAAQ,2BACRC,EAAkB,GAClBC,EAAiB,WAQjBC,EAAO,QACPC,EAAM,UACJ,SAASC,GAAe,CACrCC,EAAS,KAAK,IAAI,EAClB,KAAK,aAAe,SACpB,KAAK,KAAO,cACZ,KAAK,YAAc,EACnB,KAAK,gBAAkB,EAEvB,KAAK,iBAAmB,mBACxB,KAAK,gBAAkB,UAAY,CACjC,IAAIC,EAAGC,EAAGC,EAAGC,EAAGC,EAAGC,EAEnB,OAAQC,EAAO,CAAC,EAAG,CAAC,CAAC,EAAC,CACpB,IAAK,GACHN,EAAIO,EAAQ,EAAG,CAAC,EAAK,GACrBN,EAAIM,EAAQ,EAAG,CAAC,EAChBL,EAAIM,EAA4BD,EAAQ,GAAI,EAAE,EAAIA,EAAQ,GAAI,EAAE,EAAI,EAAE,EACtEJ,EAAIG,EAAO,CAAC,IAAK,IAAK,IAAK,IAAK,GAAG,CAAC,EAChCH,IAAM,MACR,KAAK,SAAW,wDAAwDH,CAAC,KAAKS,EAAG,CAAC,CAAC,MAAMA,EAAG,CAAC,CAAC,IAAIR,CAAC;AAAA,sBAEnG,KAAK,WAAa,YAAYA,EAAID,EAAI,CAAC,KAAKC,EAAID,EAAI,IAAM,EAAI,SAAW,SAAS,8BAA8BA,CAAC,GAAGS,EAAG,CAAC,CAAC,MAAMA,EAAG,CAAC,CAAC,GAAGR,CAAC,YACxI,KAAK,YAAcS,EAAe;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