math-exercises 2.2.6 → 2.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/lib/exercises/math/calcul/addAndSub.js +1 -1
  2. package/lib/exercises/math/calcul/addAndSubWithoutRelatives.js +1 -1
  3. package/lib/exercises/math/calcul/arithmetics/divisorsList.d.ts.map +1 -1
  4. package/lib/exercises/math/calcul/arithmetics/divisorsList.js +10 -7
  5. package/lib/exercises/math/calcul/arithmetics/primeNumbers.d.ts.map +1 -1
  6. package/lib/exercises/math/calcul/arithmetics/primeNumbers.js +0 -1
  7. package/lib/exercises/math/calcul/digitDecimalRank.d.ts.map +1 -1
  8. package/lib/exercises/math/calcul/digitDecimalRank.js +2 -3
  9. package/lib/exercises/math/calcul/digitDecimalRankNumber.d.ts.map +1 -1
  10. package/lib/exercises/math/calcul/digitDecimalRankNumber.js +2 -3
  11. package/lib/exercises/math/calcul/digitRank.d.ts.map +1 -1
  12. package/lib/exercises/math/calcul/digitRank.js +2 -3
  13. package/lib/exercises/math/calcul/digitRankNumber.d.ts.map +1 -1
  14. package/lib/exercises/math/calcul/digitRankNumber.js +2 -3
  15. package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
  16. package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +0 -1
  17. package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
  18. package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.js +0 -1
  19. package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.d.ts.map +1 -1
  20. package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.js +0 -1
  21. package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.d.ts +10 -0
  22. package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.d.ts.map +1 -0
  23. package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.js +61 -0
  24. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts +10 -0
  25. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts.map +1 -0
  26. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.js +56 -0
  27. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts +9 -0
  28. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -0
  29. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +57 -0
  30. package/lib/exercises/math/calcul/fractions/index.d.ts +3 -0
  31. package/lib/exercises/math/calcul/fractions/index.d.ts.map +1 -1
  32. package/lib/exercises/math/calcul/fractions/index.js +3 -0
  33. package/lib/exercises/math/calcul/fractions/simplifyFraction.d.ts.map +1 -1
  34. package/lib/exercises/math/calcul/fractions/simplifyFraction.js +0 -1
  35. package/lib/exercises/math/calcul/mentalCaluls/index.d.ts +2 -0
  36. package/lib/exercises/math/calcul/mentalCaluls/index.d.ts.map +1 -1
  37. package/lib/exercises/math/calcul/mentalCaluls/index.js +2 -0
  38. package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSub.js +1 -1
  39. package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.d.ts +7 -0
  40. package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.d.ts.map +1 -0
  41. package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.js +71 -0
  42. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.d.ts.map +1 -1
  43. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.js +25 -17
  44. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.d.ts +7 -0
  45. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.d.ts.map +1 -0
  46. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.js +93 -0
  47. package/lib/exercises/math/calcul/operations/expressionNature.d.ts +1 -0
  48. package/lib/exercises/math/calcul/operations/expressionNature.d.ts.map +1 -0
  49. package/lib/exercises/math/calcul/operations/expressionNature.js +81 -0
  50. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
  51. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +0 -1
  52. package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
  53. package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.js +0 -1
  54. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
  55. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +0 -1
  56. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.d.ts.map +1 -1
  57. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js +0 -1
  58. package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.d.ts.map +1 -1
  59. package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.js +0 -1
  60. package/lib/exercises/math/complex/addComplex.d.ts.map +1 -1
  61. package/lib/exercises/math/complex/addComplex.js +0 -1
  62. package/lib/exercises/math/complex/conjugateComplex.ts.d.ts.map +1 -1
  63. package/lib/exercises/math/complex/conjugateComplex.ts.js +0 -1
  64. package/lib/exercises/math/complex/conjugateDivideComplex.d.ts.map +1 -1
  65. package/lib/exercises/math/complex/conjugateDivideComplex.js +0 -1
  66. package/lib/exercises/math/complex/inverseComplex.d.ts.map +1 -1
  67. package/lib/exercises/math/complex/inverseComplex.js +0 -1
  68. package/lib/exercises/math/complex/moduloFromAlgebraicComplex.d.ts.map +1 -1
  69. package/lib/exercises/math/complex/moduloFromAlgebraicComplex.js +0 -1
  70. package/lib/exercises/math/complex/mutiplyComplex.d.ts.map +1 -1
  71. package/lib/exercises/math/complex/mutiplyComplex.js +0 -1
  72. package/lib/exercises/math/conversion/aeraConversion.d.ts.map +1 -1
  73. package/lib/exercises/math/conversion/aeraConversion.js +0 -2
  74. package/lib/exercises/math/conversion/capacityConversion.d.ts.map +1 -1
  75. package/lib/exercises/math/conversion/capacityConversion.js +0 -1
  76. package/lib/exercises/math/conversion/lengthConversion.d.ts.map +1 -1
  77. package/lib/exercises/math/conversion/lengthConversion.js +0 -2
  78. package/lib/exercises/math/conversion/massConversion.d.ts.map +1 -1
  79. package/lib/exercises/math/conversion/massConversion.js +0 -2
  80. package/lib/exercises/math/conversion/volumeCapacityConversion.d.ts.map +1 -1
  81. package/lib/exercises/math/conversion/volumeCapacityConversion.js +0 -2
  82. package/lib/exercises/math/conversion/volumeConversion.d.ts.map +1 -1
  83. package/lib/exercises/math/conversion/volumeConversion.js +0 -2
  84. package/lib/exercises/math/derivation/derivative/expDerivativeOne.d.ts.map +1 -1
  85. package/lib/exercises/math/derivation/derivative/expDerivativeOne.js +0 -1
  86. package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.d.ts.map +1 -1
  87. package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.js +0 -1
  88. package/lib/exercises/math/derivation/derivative/lnDerivativeOne.d.ts.map +1 -1
  89. package/lib/exercises/math/derivation/derivative/lnDerivativeOne.js +0 -1
  90. package/lib/exercises/math/derivation/derivative/lnDerivativeThree.d.ts.map +1 -1
  91. package/lib/exercises/math/derivation/derivative/lnDerivativeThree.js +0 -1
  92. package/lib/exercises/math/derivation/derivative/powerCompositionDerivation.d.ts.map +1 -1
  93. package/lib/exercises/math/derivation/derivative/powerCompositionDerivation.js +0 -2
  94. package/lib/exercises/math/derivation/derivative/powerFunctionDerivative.d.ts.map +1 -1
  95. package/lib/exercises/math/derivation/derivative/powerFunctionDerivative.js +0 -1
  96. package/lib/exercises/math/derivation/derivative/quotientDerivative.d.ts.map +1 -1
  97. package/lib/exercises/math/derivation/derivative/quotientDerivative.js +0 -1
  98. package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.d.ts.map +1 -1
  99. package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.js +0 -1
  100. package/lib/exercises/math/derivation/derivative/secondDegreeDerivative.d.ts.map +1 -1
  101. package/lib/exercises/math/derivation/derivative/secondDegreeDerivative.js +0 -1
  102. package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.d.ts.map +1 -1
  103. package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.js +0 -1
  104. package/lib/exercises/math/derivation/derivativeNumberReading.d.ts.map +1 -1
  105. package/lib/exercises/math/derivation/derivativeNumberReading.js +0 -1
  106. package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +0 -1
  107. package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.js +0 -1
  108. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -1
  109. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +0 -1
  110. package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
  111. package/lib/exercises/math/functions/basics/graphicInequation.js +12 -3
  112. package/lib/exercises/math/functions/cube/cubicEquation.js +0 -1
  113. package/lib/exercises/math/functions/exponential/expEquation.js +0 -1
  114. package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.d.ts.map +1 -1
  115. package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.js +3 -4
  116. package/lib/exercises/math/functions/trinoms/rootsFromFactorizedForm.js +0 -1
  117. package/lib/exercises/math/functions/trinoms/secondDegreeInequation.d.ts.map +1 -1
  118. package/lib/exercises/math/functions/trinoms/secondDegreeInequation.js +0 -1
  119. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.js +1 -1
  120. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.js +1 -1
  121. package/lib/exercises/math/functions/trinoms/summitAbscissFromRoots.d.ts.map +1 -1
  122. package/lib/exercises/math/functions/trinoms/summitAbscissFromRoots.js +0 -2
  123. package/lib/exercises/math/geometry/areas/triangleAreaV2.d.ts.map +1 -1
  124. package/lib/exercises/math/geometry/areas/triangleAreaV2.js +0 -1
  125. package/lib/exercises/math/geometry/cartesian/distanceBetweenTwoPoints.d.ts.map +1 -1
  126. package/lib/exercises/math/geometry/cartesian/distanceBetweenTwoPoints.js +0 -1
  127. package/lib/exercises/math/geometry/cartesian/midpoint.js +0 -1
  128. package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts +4 -1
  129. package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts.map +1 -1
  130. package/lib/exercises/math/geometry/cartesian/placeAPoint.js +1 -1
  131. package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +0 -1
  132. package/lib/exercises/math/geometry/thales/thales.js +0 -1
  133. package/lib/exercises/math/geometry/thales/thalesCalcul.d.ts.map +1 -1
  134. package/lib/exercises/math/geometry/thales/thalesCalcul.js +0 -1
  135. package/lib/exercises/math/geometry/vectors/alignementViaColinearity.d.ts.map +1 -1
  136. package/lib/exercises/math/geometry/vectors/alignementViaColinearity.js +0 -2
  137. package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.d.ts.map +1 -1
  138. package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.js +0 -2
  139. package/lib/exercises/math/percent/averageEvolutionRate.d.ts.map +1 -1
  140. package/lib/exercises/math/percent/averageEvolutionRate.js +16 -0
  141. package/lib/exercises/math/percent/cmToEvolution.d.ts +7 -0
  142. package/lib/exercises/math/percent/cmToEvolution.d.ts.map +1 -0
  143. package/lib/exercises/math/percent/cmToEvolution.js +70 -0
  144. package/lib/exercises/math/percent/evolutionToCM.d.ts +0 -1
  145. package/lib/exercises/math/percent/evolutionToCM.d.ts.map +1 -1
  146. package/lib/exercises/math/percent/evolutionToCM.js +20 -24
  147. package/lib/exercises/math/percent/findProportion.d.ts.map +1 -1
  148. package/lib/exercises/math/percent/findProportion.js +16 -1
  149. package/lib/exercises/math/percent/globalPercent.d.ts.map +1 -1
  150. package/lib/exercises/math/percent/globalPercent.js +14 -0
  151. package/lib/exercises/math/percent/index.d.ts +1 -0
  152. package/lib/exercises/math/percent/index.d.ts.map +1 -1
  153. package/lib/exercises/math/percent/index.js +1 -0
  154. package/lib/exercises/math/percent/isTableProportional.d.ts.map +1 -1
  155. package/lib/exercises/math/percent/isTableProportional.js +35 -33
  156. package/lib/exercises/math/percent/percentToDecimal.d.ts.map +1 -1
  157. package/lib/exercises/math/percent/percentToDecimal.js +14 -1
  158. package/lib/exercises/math/percent/reciprocalPercentage.d.ts.map +1 -1
  159. package/lib/exercises/math/percent/reciprocalPercentage.js +18 -0
  160. package/lib/exercises/math/percent/valuePercent.d.ts.map +1 -1
  161. package/lib/exercises/math/percent/valuePercent.js +7 -0
  162. package/lib/exercises/math/powers/calculateNegativePower.js +0 -1
  163. package/lib/exercises/math/powers/decimalToScientific.d.ts.map +1 -1
  164. package/lib/exercises/math/powers/decimalToScientific.js +0 -1
  165. package/lib/exercises/math/powers/powersPower.d.ts.map +1 -1
  166. package/lib/exercises/math/powers/powersPower.js +0 -1
  167. package/lib/exercises/math/powers/powersProduct.d.ts.map +1 -1
  168. package/lib/exercises/math/powers/powersProduct.js +22 -0
  169. package/lib/exercises/math/powers/scientificToDecimal.d.ts.map +1 -1
  170. package/lib/exercises/math/powers/scientificToDecimal.js +0 -2
  171. package/lib/exercises/math/primitive/expUPrimitive.js +0 -1
  172. package/lib/exercises/math/primitive/exponentialPrimitive.js +0 -1
  173. package/lib/exercises/math/primitive/logarithmePrimitive.js +0 -1
  174. package/lib/exercises/math/primitive/polynomialPrimitive.js +0 -1
  175. package/lib/exercises/math/primitive/sinCosPrimitive.js +0 -1
  176. package/lib/exercises/math/primitive/sinUCosUPrimitive.js +0 -1
  177. package/lib/exercises/math/probaStat/cardBasicProbas.js +0 -1
  178. package/lib/exercises/math/probaStat/diceBasicProbas.js +0 -1
  179. package/lib/exercises/math/probaStat/expectedValueOfBinomialProba.d.ts.map +1 -1
  180. package/lib/exercises/math/probaStat/expectedValueOfBinomialProba.js +14 -2
  181. package/lib/exercises/math/probaStat/probabilityTree.js +0 -1
  182. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
  183. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +13 -4
  184. package/lib/exercises/math/probaStat/varianceOfBinomialProba.d.ts.map +1 -1
  185. package/lib/exercises/math/probaStat/varianceOfBinomialProba.js +21 -1
  186. package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts.map +1 -1
  187. package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +15 -0
  188. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts.map +1 -1
  189. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.js +17 -1
  190. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.js +0 -1
  191. package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.d.ts +10 -0
  192. package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.d.ts.map +1 -0
  193. package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.js +48 -0
  194. package/lib/exercises/math/sequences/arithmetic/index.d.ts +1 -0
  195. package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
  196. package/lib/exercises/math/sequences/arithmetic/index.js +1 -0
  197. package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -1
  198. package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.js +14 -1
  199. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.d.ts.map +1 -1
  200. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.js +15 -1
  201. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.d.ts.map +1 -1
  202. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.js +0 -1
  203. package/lib/exercises/math/sequences/geometric/geometricFindTerm.d.ts +10 -0
  204. package/lib/exercises/math/sequences/geometric/geometricFindTerm.d.ts.map +1 -0
  205. package/lib/exercises/math/sequences/geometric/geometricFindTerm.js +48 -0
  206. package/lib/exercises/math/sequences/geometric/geometricRecognizeReasonFromFirstTerms.d.ts +8 -0
  207. package/lib/exercises/math/sequences/geometric/geometricRecognizeReasonFromFirstTerms.d.ts.map +1 -0
  208. package/lib/exercises/math/sequences/geometric/geometricRecognizeReasonFromFirstTerms.js +46 -0
  209. package/lib/exercises/math/sequences/geometric/index.d.ts +2 -0
  210. package/lib/exercises/math/sequences/geometric/index.d.ts.map +1 -1
  211. package/lib/exercises/math/sequences/geometric/index.js +2 -0
  212. package/lib/exercises/math/sets/intervals/inequalityToInterval.d.ts +2 -3
  213. package/lib/exercises/math/sets/intervals/inequalityToInterval.d.ts.map +1 -1
  214. package/lib/exercises/math/sets/intervals/inequalityToInterval.js +23 -91
  215. package/lib/exercises/math/sets/intervals/intervalToInequality.d.ts +10 -0
  216. package/lib/exercises/math/sets/intervals/intervalToInequality.d.ts.map +1 -0
  217. package/lib/exercises/math/sets/intervals/intervalToInequality.js +112 -0
  218. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts.map +1 -1
  219. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.js +15 -0
  220. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.d.ts.map +1 -1
  221. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.js +26 -1
  222. package/lib/exercises/math/squareRoots/squareRootsSum.d.ts.map +1 -1
  223. package/lib/exercises/math/squareRoots/squareRootsSum.js +0 -1
  224. package/lib/exercises/math/suites/sequenceEvaluation.js +1 -1
  225. package/lib/exercises/math/suites/sequencePlot.d.ts.map +1 -1
  226. package/lib/exercises/math/suites/sequencePlot.js +10 -3
  227. package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.d.ts.map +1 -1
  228. package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.js +0 -1
  229. package/lib/exercises/pc/energy/energyTransfer.d.ts.map +1 -1
  230. package/lib/exercises/pc/energy/energyTransfer.js +0 -1
  231. package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.d.ts.map +1 -1
  232. package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.js +0 -1
  233. package/lib/exercises/pc/mecanicalWaves/elongationReading.d.ts.map +1 -1
  234. package/lib/exercises/pc/mecanicalWaves/elongationReading.js +0 -1
  235. package/lib/index.d.ts +72 -5
  236. package/lib/index.d.ts.map +1 -1
  237. package/lib/index.js +3 -0
  238. package/lib/math/geometry/line.d.ts.map +1 -1
  239. package/lib/math/geometry/line.js +0 -2
  240. package/lib/math/geometry/spaceVector.d.ts +1 -0
  241. package/lib/math/geometry/spaceVector.d.ts.map +1 -1
  242. package/lib/math/geometry/spaceVector.js +3 -0
  243. package/lib/math/polynomials/trinom.js +2 -2
  244. package/lib/pc/constants/molecularChemistry/reaction.js +3 -1
  245. package/lib/playground.d.ts.map +1 -1
  246. package/lib/playground.js +2 -14
  247. package/lib/server.d.ts +1 -0
  248. package/lib/server.d.ts.map +1 -1
  249. package/lib/server.js +4 -1
  250. package/lib/tree/nodes/sets/closure.d.ts +2 -0
  251. package/lib/tree/nodes/sets/closure.d.ts.map +1 -1
  252. package/lib/tree/nodes/sets/closure.js +24 -0
  253. package/lib/tree/nodes/sets/intervalNode.d.ts +3 -0
  254. package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
  255. package/lib/tree/nodes/sets/intervalNode.js +13 -0
  256. package/lib/tree/parsers/latexParser.js +6 -6
  257. package/lib/utils/numberPrototype/toSeparatedThousands.d.ts +2 -0
  258. package/lib/utils/numberPrototype/toSeparatedThousands.d.ts.map +1 -0
  259. package/lib/utils/numberPrototype/toSeparatedThousands.js +12 -0
  260. package/package.json +1 -1
@@ -8,6 +8,15 @@ const exercise_1 = require("../../../exercise");
8
8
  const getDistinctQuestions_1 = require("../../../utils/getDistinctQuestions");
9
9
  const getAnswer = (rand, x1, x2, x3, x4) => {
10
10
  const x = x1 + x2 + x3 + x4;
11
+ const total = x1 + x2 + x3 + x4;
12
+ const totalA = x1 + x3;
13
+ const totalB = x2 + x4;
14
+ const totalC = x1 + x2;
15
+ const totalD = x3 + x4;
16
+ const A_C = x1;
17
+ const A_D = x3;
18
+ const B_C = x2;
19
+ const B_D = x4;
11
20
  let freqString;
12
21
  let frequence;
13
22
  let answer;
@@ -43,8 +52,8 @@ const getAnswer = (rand, x1, x2, x3, x4) => {
43
52
  answer = new rational_1.Rational(x3, x3 + x4).simplify().toTree();
44
53
  break;
45
54
  case 6:
46
- freqString = "conditionnelle de B parmi D";
47
- frequence = "f_D(B)";
55
+ freqString = "conditionnelle de B parmi C";
56
+ frequence = "f_C(B)";
48
57
  answer = new rational_1.Rational(x2, x1 + x2).simplify().toTree();
49
58
  break;
50
59
  case 7:
@@ -60,12 +69,12 @@ const getAnswer = (rand, x1, x2, x3, x4) => {
60
69
  case 9:
61
70
  freqString = "conditionnelle de C parmi B";
62
71
  frequence = "f_B(C)";
63
- answer = new rational_1.Rational(x3, x1 + x3).simplify().toTree();
72
+ answer = new rational_1.Rational(x2, x2 + x4).simplify().toTree();
64
73
  break;
65
74
  case 10:
66
75
  freqString = "conditionnelle de D parmi A";
67
76
  frequence = "f_A(D)";
68
- answer = new rational_1.Rational(x2, x2 + x4).simplify().toTree();
77
+ answer = new rational_1.Rational(x3, x1 + x3).simplify().toTree();
69
78
  break;
70
79
  case 11:
71
80
  freqString = "conditionnelle de D parmi B";
@@ -1 +1 @@
1
- {"version":3,"file":"varianceOfBinomialProba.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/varianceOfBinomialProba.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA0EF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAazD,CAAC"}
1
+ {"version":3,"file":"varianceOfBinomialProba.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/varianceOfBinomialProba.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAalC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+FF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAczD,CAAC"}
@@ -9,6 +9,7 @@ const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
9
9
  const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
10
10
  const powerNode_1 = require("../../../tree/nodes/operators/powerNode");
11
11
  const substractNode_1 = require("../../../tree/nodes/operators/substractNode");
12
+ const alignTex_1 = require("../../../utils/alignTex");
12
13
  const nbOneNode = new numberNode_1.NumberNode(1);
13
14
  const getVarianceOfBinomialProbaQuestion = () => {
14
15
  const nX = (0, randint_1.randint)(1, 9);
@@ -16,8 +17,9 @@ const getVarianceOfBinomialProbaQuestion = () => {
16
17
  const a = (0, randint_1.randint)(1, b);
17
18
  const p = new rational_1.Rational(a, b);
18
19
  const correctAns = getCorrectAnswer(nX, p);
20
+ const answer = correctAns.toTex();
19
21
  const question = {
20
- answer: correctAns.toTex(),
22
+ answer,
21
23
  instruction: `Soit $X$ une variable aléatoire qui suit une loi binomiale de paramètres $n=${nX}$ et $p=${p
22
24
  .toTree()
23
25
  .simplify()
@@ -25,6 +27,23 @@ const getVarianceOfBinomialProbaQuestion = () => {
25
27
  keys: [],
26
28
  answerFormat: "tex",
27
29
  identifiers: { nX, a, b },
30
+ hint: `L'espérance d'une variable aléatoire $X$ qui suit une loi binomiale de paramètres $n$ et $p$ est donnée par :
31
+
32
+ $V(X) = np(1-p)$.`,
33
+ correction: `L'espérance d'une variable aléatoire $X$ qui suit une loi binomiale de paramètres $n$ et $p$ est donnée par :
34
+
35
+ $V(X) = np(1-p)$.
36
+
37
+ Ici, on a donc :
38
+
39
+ ${(0, alignTex_1.alignTex)([
40
+ [
41
+ "V(X)",
42
+ "=",
43
+ new multiplyNode_1.MultiplyNode(nX.toTree(), new multiplyNode_1.MultiplyNode(p.toTree(), new substractNode_1.SubstractNode((1).toTree(), p.toTree())), { forceTimesSign: true }).toTex(),
44
+ ],
45
+ ["", "=", answer],
46
+ ])}`,
28
47
  };
29
48
  return question;
30
49
  };
@@ -71,4 +90,5 @@ exports.varianceOfBinomialProba = {
71
90
  getPropositions,
72
91
  isAnswerValid,
73
92
  subject: "Mathématiques",
93
+ hasHintAndCorrection: true,
74
94
  };
@@ -1 +1 @@
1
- {"version":3,"file":"arithmeticExplicitFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAiDF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAchE,CAAC"}
1
+ {"version":3,"file":"arithmeticExplicitFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA+DF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAehE,CAAC"}
@@ -5,6 +5,9 @@ const exercise_1 = require("../../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
6
  const polynomial_1 = require("../../../../math/polynomials/polynomial");
7
7
  const randint_1 = require("../../../../math/utils/random/randint");
8
+ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
9
+ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
10
+ const alignTex_1 = require("../../../../utils/alignTex");
8
11
  const shuffle_1 = require("../../../../utils/shuffle");
9
12
  const getArithmeticExplicitFormulaUsage = () => {
10
13
  const askedRank = (0, randint_1.randint)(0, 10);
@@ -21,6 +24,17 @@ const getArithmeticExplicitFormulaUsage = () => {
21
24
  keys: ["u", "underscore", "equal"],
22
25
  answerFormat: "tex",
23
26
  identifiers: { firstValue, askedRank, reason },
27
+ hint: `Il suffit de remplacer $n$ par $${askedRank}$ dans la formule donnée.`,
28
+ correction: `On remplace $n$ par $${askedRank}$ dans la formule donnée :
29
+
30
+ ${(0, alignTex_1.alignTex)([
31
+ [
32
+ `u_{${askedRank}}`,
33
+ "=",
34
+ new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(reason.toTree(), askedRank.toTree()), firstValue.toTree()).toTex(),
35
+ ],
36
+ ["", "=", answer],
37
+ ])}`,
24
38
  };
25
39
  return question;
26
40
  };
@@ -52,4 +66,5 @@ exports.arithmeticExplicitFormulaUsage = {
52
66
  getPropositions,
53
67
  isAnswerValid,
54
68
  subject: "Mathématiques",
69
+ hasHintAndCorrection: true,
55
70
  };
@@ -1 +1 @@
1
- {"version":3,"file":"arithmeticFindExplicitFormula.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAsDF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAc/D,CAAC"}
1
+ {"version":3,"file":"arithmeticFindExplicitFormula.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAsEF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAe/D,CAAC"}
@@ -20,6 +20,22 @@ const getArithmeticFindExplicitFormula = () => {
20
20
  keys: ["un", "equal", "n"],
21
21
  answerFormat: "tex",
22
22
  identifiers: { firstValue, reason },
23
+ hint: `Utilise la formule générale d'une suite arithmétique :
24
+
25
+ $u_n = u_0 + n \\times r $,
26
+
27
+ où $u_0$ est le premier terme et $r$ la raison.`,
28
+ correction: `La formule générale d'une suite arithmétique est :
29
+
30
+ $u_n = u_0 + n \\times r $,
31
+
32
+ où $u_0$ est le premier terme et $r$ la raison.
33
+
34
+ Ici, puisque $u_0 = ${firstValue}$ et $r = ${reason}$, on a :
35
+
36
+ $${answer}$
37
+
38
+ `,
23
39
  };
24
40
  return question;
25
41
  };
@@ -40,7 +56,6 @@ const isAnswerValid = (ans, { reason, firstValue }) => {
40
56
  allowRawRightChildAsSolution: true,
41
57
  });
42
58
  const texs = equal.toAllValidTexs();
43
- console.log(texs);
44
59
  return texs.includes(ans);
45
60
  };
46
61
  exports.arithmeticFindExplicitFormula = {
@@ -56,4 +71,5 @@ exports.arithmeticFindExplicitFormula = {
56
71
  getPropositions,
57
72
  isAnswerValid,
58
73
  subject: "Mathématiques",
74
+ hasHintAndCorrection: true,
59
75
  };
@@ -40,7 +40,6 @@ const isAnswerValid = (ans, { reason, firstValue, firstRank }) => {
40
40
  allowRawRightChildAsSolution: true,
41
41
  });
42
42
  const texs = equal.toAllValidTexs();
43
- console.log(texs);
44
43
  return texs.includes(ans);
45
44
  };
46
45
  exports.arithmeticFindExplicitFormulaFirstTermRandom = {
@@ -0,0 +1,10 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ firstRank: number;
4
+ firstTerm: number;
5
+ reason: number;
6
+ askedRank: number;
7
+ };
8
+ export declare const arithmeticFindTerm: Exercise<Identifiers>;
9
+ export {};
10
+ //# sourceMappingURL=arithmeticFindTerm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arithmeticFindTerm.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticFindTerm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAqCF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAepD,CAAC"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.arithmeticFindTerm = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const randint_1 = require("../../../../math/utils/random/randint");
7
+ const random_1 = require("../../../../utils/random");
8
+ const getArithmeticFindTermQuestion = () => {
9
+ const firstRank = (0, random_1.random)([0, 1]);
10
+ const firstTerm = (0, randint_1.randint)(-15, 15);
11
+ const reason = (0, randint_1.randint)(-10, 10, [0]);
12
+ const askedRank = (0, randint_1.randint)(5, 15);
13
+ const answer = firstTerm + reason * (askedRank - firstRank);
14
+ const question = {
15
+ answer: answer + "",
16
+ instruction: `Soit $u$ la suite arithmétique de premier terme $u_${firstRank} = ${firstTerm}$ et de raison $r = ${reason}$. Calculer $u_{${askedRank}}$.`,
17
+ keys: [],
18
+ answerFormat: "tex",
19
+ identifiers: { firstRank, askedRank, firstTerm, reason },
20
+ };
21
+ return question;
22
+ };
23
+ const getPropositions = (n, { answer, askedRank, firstRank, firstTerm, reason }) => {
24
+ const propositions = [];
25
+ (0, exercise_1.addValidProp)(propositions, answer);
26
+ while (propositions.length < n) {
27
+ const fake = firstTerm + reason * (askedRank - (0, randint_1.randint)(-4, 4, [firstRank]));
28
+ (0, exercise_1.tryToAddWrongProp)(propositions, fake + "");
29
+ }
30
+ return (0, exercise_1.shuffleProps)(propositions, n);
31
+ };
32
+ const isAnswerValid = (ans, { answer }) => {
33
+ return ans === answer;
34
+ };
35
+ exports.arithmeticFindTerm = {
36
+ id: "arithmeticFindTerm",
37
+ connector: "=",
38
+ label: "Calculer un terme d'une suite arithmétique à partir de son premier terme et sa raison",
39
+ levels: [],
40
+ isSingleStep: true,
41
+ sections: [],
42
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getArithmeticFindTermQuestion, nb),
43
+ qcmTimer: 60,
44
+ freeTimer: 60,
45
+ getPropositions,
46
+ isAnswerValid,
47
+ subject: "Mathématiques",
48
+ };
@@ -13,4 +13,5 @@ export * from "./arithmeticFirstTermsSum";
13
13
  export * from "./arithmeticFindExplictFormulaFirstTermRandom";
14
14
  export * from "./arithmeticFindReasonRandomRange";
15
15
  export * from "./arithmeticFindRandomTermFromTwoTerms";
16
+ export * from "./arithmeticFindTerm";
16
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,sBAAsB,CAAC"}
@@ -29,3 +29,4 @@ __exportStar(require("./arithmeticFirstTermsSum"), exports);
29
29
  __exportStar(require("./arithmeticFindExplictFormulaFirstTermRandom"), exports);
30
30
  __exportStar(require("./arithmeticFindReasonRandomRange"), exports);
31
31
  __exportStar(require("./arithmeticFindRandomTermFromTwoTerms"), exports);
32
+ __exportStar(require("./arithmeticFindTerm"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"geometricExplicitFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAgDF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAc/D,CAAC"}
1
+ {"version":3,"file":"geometricExplicitFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA8DF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAe/D,CAAC"}
@@ -8,10 +8,11 @@ const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
8
8
  const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
9
9
  const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
10
10
  const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
11
+ const alignTex_1 = require("../../../../utils/alignTex");
11
12
  const shuffle_1 = require("../../../../utils/shuffle");
12
13
  const getGeometricExplicitFormulaUsage = () => {
13
14
  const askedRank = (0, randint_1.randint)(0, 10);
14
- const firstValue = (0, randint_1.randint)(1, 10);
15
+ const firstValue = (0, randint_1.randint)(-5, 10, [0]);
15
16
  const reason = (0, randint_1.randint)(2, 10);
16
17
  const formula = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(firstValue), new powerNode_1.PowerNode(new numberNode_1.NumberNode(reason), new variableNode_1.VariableNode("n")));
17
18
  const formulaTex = formula.toTex();
@@ -23,6 +24,17 @@ const getGeometricExplicitFormulaUsage = () => {
23
24
  keys: ["u", "underscore", "equal"],
24
25
  answerFormat: "tex",
25
26
  identifiers: { firstValue, reason, askedRank },
27
+ hint: `Il suffit de remplacer $n$ par $${askedRank}$ dans la formule donnée.`,
28
+ correction: `On remplace $n$ par $${askedRank}$ dans la formule donnée :
29
+
30
+ ${(0, alignTex_1.alignTex)([
31
+ [
32
+ `u_{${askedRank}}`,
33
+ "=",
34
+ new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(firstValue), new powerNode_1.PowerNode(new numberNode_1.NumberNode(reason), askedRank.toTree())).toTex(),
35
+ ],
36
+ ["", "=", answer],
37
+ ])}`,
26
38
  };
27
39
  return question;
28
40
  };
@@ -54,4 +66,5 @@ exports.geometricExplicitFormulaUsage = {
54
66
  getPropositions,
55
67
  isAnswerValid,
56
68
  subject: "Mathématiques",
69
+ hasHintAndCorrection: true,
57
70
  };
@@ -1 +1 @@
1
- {"version":3,"file":"geometricFindExplicitFormula.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricFindExplicitFormula.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAmEF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAc9D,CAAC"}
1
+ {"version":3,"file":"geometricFindExplicitFormula.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricFindExplicitFormula.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAgFF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAe9D,CAAC"}
@@ -22,6 +22,20 @@ const getGeometricFindExplicitFormula = () => {
22
22
  keys: ["un", "equal", "n"],
23
23
  answerFormat: "tex",
24
24
  identifiers: { reason, firstValue },
25
+ hint: `Utilise la formule générale d'une suite géométrique :
26
+
27
+ $u_n = u_0 \\times r^n $,
28
+
29
+ où $u_0$ est le premier terme et $r$ la raison.`,
30
+ correction: `La formule générale d'une suite géométrique est :
31
+
32
+ $u_n = u_0 \\times r^n $,
33
+
34
+ où $u_0$ est le premier terme et $r$ la raison.
35
+
36
+ Ici, puisque $u_0 = ${firstValue}$ et $r = ${reason}$, on a :
37
+
38
+ $${answer}$`,
25
39
  };
26
40
  return question;
27
41
  };
@@ -42,7 +56,6 @@ const isAnswerValid = (ans, { reason, firstValue }) => {
42
56
  allowRawRightChildAsSolution: true,
43
57
  });
44
58
  const texs = equal.toAllValidTexs();
45
- console.log(ans, texs);
46
59
  return texs.includes(ans);
47
60
  };
48
61
  exports.geometricFindExplicitFormula = {
@@ -58,4 +71,5 @@ exports.geometricFindExplicitFormula = {
58
71
  getPropositions,
59
72
  isAnswerValid,
60
73
  subject: "Mathématiques",
74
+ hasHintAndCorrection: true,
61
75
  };
@@ -1 +1 @@
1
- {"version":3,"file":"geometricFindExplicitFormulaFirstTermRandom.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAgFF,eAAO,MAAM,2CAA2C,EAAE,QAAQ,CAAC,WAAW,CAgB3E,CAAC"}
1
+ {"version":3,"file":"geometricFindExplicitFormulaFirstTermRandom.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA+EF,eAAO,MAAM,2CAA2C,EAAE,QAAQ,CAAC,WAAW,CAgB3E,CAAC"}
@@ -43,7 +43,6 @@ const isAnswerValid = (ans, { reason, firstValue, firstRank }) => {
43
43
  allowRawRightChildAsSolution: true,
44
44
  });
45
45
  const texs = equal.toAllValidTexs();
46
- console.log(ans, texs);
47
46
  return texs.includes(ans);
48
47
  };
49
48
  exports.geometricFindExplicitFormulaFirstTermRandom = {
@@ -0,0 +1,10 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ firstRank: number;
4
+ firstTerm: number;
5
+ reason: number;
6
+ askedRank: number;
7
+ };
8
+ export declare const geometricFindTerm: Exercise<Identifiers>;
9
+ export {};
10
+ //# sourceMappingURL=geometricFindTerm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geometricFindTerm.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricFindTerm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAqCF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAenD,CAAC"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.geometricFindTerm = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const randint_1 = require("../../../../math/utils/random/randint");
7
+ const random_1 = require("../../../../utils/random");
8
+ const getGeometricFindTermQuestion = () => {
9
+ const firstRank = (0, random_1.random)([0, 1]);
10
+ const firstTerm = (0, randint_1.randint)(-10, 10, [0]);
11
+ const reason = (0, randint_1.randint)(2, 6);
12
+ const askedRank = (0, randint_1.randint)(5, 12);
13
+ const answer = firstTerm * Math.pow(reason, askedRank - firstRank);
14
+ const question = {
15
+ answer: answer + "",
16
+ instruction: `Soit $u$ la suite géométrique de premier terme $u_${firstRank} = ${firstTerm}$ et de raison $q = ${reason}$. Calculer $u_{${askedRank}}$.`,
17
+ keys: [],
18
+ answerFormat: "tex",
19
+ identifiers: { firstRank, askedRank, firstTerm, reason },
20
+ };
21
+ return question;
22
+ };
23
+ const getPropositions = (n, { answer, askedRank, firstRank, firstTerm, reason }) => {
24
+ const propositions = [];
25
+ (0, exercise_1.addValidProp)(propositions, answer);
26
+ while (propositions.length < n) {
27
+ const fake = firstTerm * Math.pow(reason, askedRank - (0, randint_1.randint)(-5, 3, [firstRank]));
28
+ (0, exercise_1.tryToAddWrongProp)(propositions, fake + "");
29
+ }
30
+ return (0, exercise_1.shuffleProps)(propositions, n);
31
+ };
32
+ const isAnswerValid = (ans, { answer }) => {
33
+ return ans === answer;
34
+ };
35
+ exports.geometricFindTerm = {
36
+ id: "geometricFindTerm",
37
+ connector: "=",
38
+ label: "Calculer un terme d'une suite géométrique à partir de son premier terme et sa raison",
39
+ levels: [],
40
+ isSingleStep: true,
41
+ sections: [],
42
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getGeometricFindTermQuestion, nb),
43
+ qcmTimer: 60,
44
+ freeTimer: 60,
45
+ getPropositions,
46
+ isAnswerValid,
47
+ subject: "Mathématiques",
48
+ };
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ sequence: number[];
4
+ reason: number;
5
+ };
6
+ export declare const geometricRecognizeReasonFromFirstTerms: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=geometricRecognizeReasonFromFirstTerms.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geometricRecognizeReasonFromFirstTerms.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricRecognizeReasonFromFirstTerms.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAIlC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAqCF,eAAO,MAAM,sCAAsC,EAAE,QAAQ,CAAC,WAAW,CAexE,CAAC"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.geometricRecognizeReasonFromFirstTerms = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const randint_1 = require("../../../../math/utils/random/randint");
7
+ const getGeometricRecognizeReasonFromFirstTermsQuestion = () => {
8
+ const firstTerm = (0, randint_1.randint)(1, 20);
9
+ const reason = (0, randint_1.randint)(-5, 6, [0, 1]);
10
+ const sequence = new Array(5)
11
+ .fill(0)
12
+ .map((el, index) => firstTerm * Math.pow(reason, index));
13
+ const question = {
14
+ answer: reason + "",
15
+ instruction: `Voici les premiers termes d'une suite géométrique $u$ : $${sequence.join("\\ ; \\ ")}$. Quelle est la raison de $u$ ?`,
16
+ keys: [],
17
+ answerFormat: "tex",
18
+ identifiers: { sequence, reason },
19
+ };
20
+ return question;
21
+ };
22
+ const getPropositions = (n, { answer, reason }) => {
23
+ const propositions = [];
24
+ (0, exercise_1.addValidProp)(propositions, answer);
25
+ while (propositions.length < n) {
26
+ (0, exercise_1.tryToAddWrongProp)(propositions, reason + (0, randint_1.randint)(-5, 5, [0]) + "");
27
+ }
28
+ return (0, exercise_1.shuffleProps)(propositions, n);
29
+ };
30
+ const isAnswerValid = (ans, { answer }) => {
31
+ return ans === answer;
32
+ };
33
+ exports.geometricRecognizeReasonFromFirstTerms = {
34
+ id: "geometricRecognizeReasonFromFirstTerms",
35
+ connector: "=",
36
+ label: "Reconnaître la raison d'une suite géométrique via ses premiers termes",
37
+ levels: [],
38
+ isSingleStep: true,
39
+ sections: [],
40
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getGeometricRecognizeReasonFromFirstTermsQuestion, nb),
41
+ qcmTimer: 60,
42
+ freeTimer: 60,
43
+ getPropositions,
44
+ isAnswerValid,
45
+ subject: "Mathématiques",
46
+ };
@@ -5,4 +5,6 @@ export * from "./geometricFirstTermsSum";
5
5
  export * from "./geometricReasonUsage";
6
6
  export * from "./geometricRecurrenceFormulaUsage";
7
7
  export * from "./geometricFindExplicitFormulaFirstTermRandom";
8
+ export * from "./geometricFindTerm";
9
+ export * from "./geometricRecognizeReasonFromFirstTerms";
8
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC;AAClD,cAAc,+CAA+C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC;AAClD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,qBAAqB,CAAC;AACpC,cAAc,0CAA0C,CAAC"}
@@ -21,3 +21,5 @@ __exportStar(require("./geometricFirstTermsSum"), exports);
21
21
  __exportStar(require("./geometricReasonUsage"), exports);
22
22
  __exportStar(require("./geometricRecurrenceFormulaUsage"), exports);
23
23
  __exportStar(require("./geometricFindExplicitFormulaFirstTermRandom"), exports);
24
+ __exportStar(require("./geometricFindTerm"), exports);
25
+ __exportStar(require("./geometricRecognizeReasonFromFirstTerms"), exports);
@@ -1,9 +1,8 @@
1
1
  import { Exercise } from "../../../../exercises/exercise";
2
2
  import { ClosureType } from "../../../../tree/nodes/sets/closure";
3
3
  type Identifiers = {
4
- isIntervalToInequality: boolean;
5
- intervalMin: number;
6
- intervalMax: number;
4
+ intervalMin: number | string;
5
+ intervalMax: number | string;
7
6
  intervalClosure: ClosureType;
8
7
  };
9
8
  export declare const inequalityToInterval: Exercise<Identifiers>;
@@ -1 +1 @@
1
- {"version":3,"file":"inequalityToInterval.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sets/intervals/inequalityToInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAK5D,KAAK,WAAW,GAAG;IACjB,sBAAsB,EAAE,OAAO,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,WAAW,CAAC;CAC9B,CAAC;AA8KF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CActD,CAAC"}
1
+ {"version":3,"file":"inequalityToInterval.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sets/intervals/inequalityToInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAK5D,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,eAAe,EAAE,WAAW,CAAC;CAC9B,CAAC;AAoFF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CActD,CAAC"}