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
@@ -4,22 +4,14 @@ exports.inequalityToInterval = void 0;
4
4
  const exercise_1 = require("../../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
6
  const intervals_1 = require("../../../../math/sets/intervals/intervals");
7
- const inequationNode_1 = require("../../../../tree/nodes/inequations/inequationNode");
8
- const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
9
7
  const belongsNode_1 = require("../../../../tree/nodes/sets/belongsNode");
10
8
  const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
11
- const coinFlip_1 = require("../../../../utils/coinFlip");
12
9
  const shuffle_1 = require("../../../../utils/shuffle");
13
10
  const getInequalityToIntervalQuestion = () => {
14
- const isIntervalToInequality = (0, coinFlip_1.coinFlip)();
15
11
  const interval = intervals_1.IntervalConstructor.random();
16
12
  const inequalityString = interval.toInequality();
17
- const answer = isIntervalToInequality
18
- ? inequalityString
19
- : `x\\in${interval.toTex()}`;
20
- const instruction = isIntervalToInequality
21
- ? `Soit $x \\in ${interval.toTex()}$. Traduire cette appartenance en une inégalité.`
22
- : `Soit $${inequalityString}$. Traduire cette inégalité en appartenance à un intervalle.`;
13
+ const answer = `x\\in${interval.toTex()}`;
14
+ const instruction = `Soit $${inequalityString}$. Traduire cette inégalité en appartenance à un intervalle.`;
23
15
  const question = {
24
16
  answer,
25
17
  instruction: instruction,
@@ -37,100 +29,40 @@ const getInequalityToIntervalQuestion = () => {
37
29
  ],
38
30
  answerFormat: "tex",
39
31
  identifiers: {
40
- isIntervalToInequality: isIntervalToInequality,
41
- intervalMin: interval.min,
42
- intervalMax: interval.max,
32
+ intervalMin: interval.min === -Infinity ? "-infty" : interval.min,
33
+ intervalMax: interval.max === Infinity ? "infty" : interval.max,
43
34
  intervalClosure: interval.closure,
44
35
  },
45
36
  };
46
37
  return question;
47
38
  };
48
- const getPropositions = (n, { answer, isIntervalToInequality, intervalClosure, intervalMax, intervalMin }) => {
39
+ const getPropositions = (n, { answer, intervalClosure, intervalMax, intervalMin }) => {
49
40
  const reverseBracket = (bracket) => {
50
41
  return bracket === "[" ? "]" : "[";
51
42
  };
52
- const switchInclusion = (symbol) => {
53
- if (symbol === "\\le")
54
- return "<";
55
- if (symbol === "<")
56
- return "\\le";
57
- if (symbol === ">")
58
- return "\\ge";
59
- return ">";
60
- };
61
- const reverseInequality = (symbol) => {
62
- if (symbol === "\\le")
63
- return "\\ge";
64
- if (symbol === "<")
65
- return ">";
66
- if (symbol === ">")
67
- return "<";
68
- return "\\le";
69
- };
70
- const interval = new intervals_1.Interval(intervalMin.toTree(), intervalMax.toTree(), intervalClosure);
43
+ const min = intervalMin === "-infty" ? -Infinity : intervalMin;
44
+ const max = intervalMax === "infty" ? Infinity : intervalMax;
45
+ const interval = new intervals_1.Interval(min.toTree(), max.toTree(), intervalClosure);
71
46
  const propositions = [];
72
47
  (0, exercise_1.addValidProp)(propositions, answer);
73
- const xNode = new variableNode_1.VariableNode("x");
74
- if (isIntervalToInequality) {
75
- let wrongIneqs = [];
76
- if (interval.min === -Infinity) {
77
- wrongIneqs = [
78
- new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.max)], switchInclusion(interval.rightInequalitySymbol)),
79
- new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.max)], reverseInequality(switchInclusion(interval.rightInequalitySymbol))),
80
- new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.max)], reverseInequality(interval.rightInequalitySymbol)),
81
- ];
82
- }
83
- else if (interval.max === Infinity) {
84
- wrongIneqs = [
85
- new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.min)], switchInclusion(interval.leftInequalitySymbol)),
86
- new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.min)], reverseInequality(switchInclusion(interval.leftInequalitySymbol))),
87
- new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.min)], reverseInequality(interval.leftInequalitySymbol)),
88
- ];
89
- }
90
- else {
91
- wrongIneqs = [
92
- new inequationNode_1.InequationNode([new numberNode_1.NumberNode(interval.min), xNode, new numberNode_1.NumberNode(interval.max)], [
93
- switchInclusion(interval.leftInequalitySymbol),
94
- interval.rightInequalitySymbol,
95
- ]),
96
- new inequationNode_1.InequationNode([new numberNode_1.NumberNode(interval.min), xNode, new numberNode_1.NumberNode(interval.max)], [
97
- interval.leftInequalitySymbol,
98
- switchInclusion(interval.rightInequalitySymbol),
99
- ]),
100
- new inequationNode_1.InequationNode([new numberNode_1.NumberNode(interval.min), xNode, new numberNode_1.NumberNode(interval.max)], [
101
- switchInclusion(interval.leftInequalitySymbol),
102
- switchInclusion(interval.rightInequalitySymbol),
103
- ]),
104
- ];
105
- }
106
- wrongIneqs.forEach((ineq) => {
107
- (0, exercise_1.addWrongProp)(propositions, ineq.toTex());
108
- });
109
- }
110
- else {
111
- const wrongStatements = [
112
- `x\\in${reverseBracket(interval.leftBracket)}${interval.insideToTex()}${interval.rightBracket}`,
113
- `x\\in${interval.leftBracket}${interval.insideToTex()}${reverseBracket(interval.rightBracket)}`,
114
- `x\\in${reverseBracket(interval.leftBracket)}${interval.insideToTex()}${reverseBracket(interval.rightBracket)}`,
115
- ];
116
- wrongStatements.forEach((ineq) => {
117
- (0, exercise_1.addWrongProp)(propositions, ineq);
118
- });
119
- }
48
+ const wrongStatements = [
49
+ `x\\in${reverseBracket(interval.leftBracket)}${interval.insideToTex()}${interval.rightBracket}`,
50
+ `x\\in${interval.leftBracket}${interval.insideToTex()}${reverseBracket(interval.rightBracket)}`,
51
+ `x\\in${reverseBracket(interval.leftBracket)}${interval.insideToTex()}${reverseBracket(interval.rightBracket)}`,
52
+ ];
53
+ wrongStatements.forEach((ineq) => {
54
+ (0, exercise_1.addWrongProp)(propositions, ineq);
55
+ });
120
56
  return (0, shuffle_1.shuffle)(propositions);
121
57
  };
122
- const isAnswerValid = (ans, { intervalClosure, intervalMax, intervalMin, isIntervalToInequality }) => {
123
- const interval = new intervals_1.Interval(intervalMin.toTree(), intervalMax.toTree(), intervalClosure).toTree();
124
- console.log("int", interval.toTex());
125
- const inequality = interval.toInequality();
126
- const answer = isIntervalToInequality
127
- ? inequality
128
- : new belongsNode_1.BelongsNode(new variableNode_1.VariableNode("x"), interval, {
129
- allowRawRightChildAsSolution: true,
130
- });
131
- console.log("ans", answer);
58
+ const isAnswerValid = (ans, { intervalClosure, intervalMax, intervalMin }) => {
59
+ const min = intervalMin === "-infty" ? -Infinity : intervalMin;
60
+ const max = intervalMax === "infty" ? Infinity : intervalMax;
61
+ const interval = new intervals_1.Interval(min.toTree(), max.toTree(), intervalClosure).toTree();
62
+ const answer = new belongsNode_1.BelongsNode(new variableNode_1.VariableNode("x"), interval, {
63
+ allowRawRightChildAsSolution: true,
64
+ });
132
65
  const texs = answer.toAllValidTexs();
133
- console.log("texs", texs);
134
66
  return texs.includes(ans);
135
67
  };
136
68
  exports.inequalityToInterval = {
@@ -0,0 +1,10 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ import { ClosureType } from "../../../../tree/nodes/sets/closure";
3
+ type Identifiers = {
4
+ intervalMin: number | string;
5
+ intervalMax: number | string;
6
+ intervalClosure: ClosureType;
7
+ };
8
+ export declare const inequalityToInterval: Exercise<Identifiers>;
9
+ export {};
10
+ //# sourceMappingURL=intervalToInequality.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intervalToInequality.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sets/intervals/intervalToInequality.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;AAkIF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CActD,CAAC"}
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.inequalityToInterval = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const intervals_1 = require("../../../../math/sets/intervals/intervals");
7
+ const inequationNode_1 = require("../../../../tree/nodes/inequations/inequationNode");
8
+ const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
9
+ const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
10
+ const shuffle_1 = require("../../../../utils/shuffle");
11
+ const getIntervalToInequalityQuestion = () => {
12
+ const interval = intervals_1.IntervalConstructor.random();
13
+ const inequalityString = interval.toInequality();
14
+ const answer = inequalityString;
15
+ const instruction = `Soit $x \\in ${interval.toTex()}$. Traduire cette appartenance en une inégalité.`;
16
+ const question = {
17
+ answer,
18
+ instruction: instruction,
19
+ keys: ["x", "inf", "sup", "geq", "leq", "infty"],
20
+ answerFormat: "tex",
21
+ identifiers: {
22
+ intervalMin: interval.min === -Infinity ? "-infty" : interval.min,
23
+ intervalMax: interval.max === Infinity ? "infty" : interval.max,
24
+ intervalClosure: interval.closure,
25
+ },
26
+ };
27
+ return question;
28
+ };
29
+ const getPropositions = (n, { answer, intervalClosure, intervalMax, intervalMin }) => {
30
+ const switchInclusion = (symbol) => {
31
+ if (symbol === "\\le")
32
+ return "<";
33
+ if (symbol === "<")
34
+ return "\\le";
35
+ if (symbol === ">")
36
+ return "\\ge";
37
+ return ">";
38
+ };
39
+ const reverseInequality = (symbol) => {
40
+ if (symbol === "\\le")
41
+ return "\\ge";
42
+ if (symbol === "<")
43
+ return ">";
44
+ if (symbol === ">")
45
+ return "<";
46
+ return "\\le";
47
+ };
48
+ const min = intervalMin === "-infty" ? -Infinity : intervalMin;
49
+ const max = intervalMax === "infty" ? Infinity : intervalMax;
50
+ const interval = new intervals_1.Interval(min.toTree(), max.toTree(), intervalClosure);
51
+ const propositions = [];
52
+ (0, exercise_1.addValidProp)(propositions, answer);
53
+ const xNode = new variableNode_1.VariableNode("x");
54
+ let wrongIneqs = [];
55
+ if (interval.min === -Infinity) {
56
+ wrongIneqs = [
57
+ new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.max)], switchInclusion(interval.rightInequalitySymbol)),
58
+ new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.max)], reverseInequality(switchInclusion(interval.rightInequalitySymbol))),
59
+ new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.max)], reverseInequality(interval.rightInequalitySymbol)),
60
+ ];
61
+ }
62
+ else if (interval.max === Infinity) {
63
+ wrongIneqs = [
64
+ new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.min)], switchInclusion(interval.leftInequalitySymbol)),
65
+ new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.min)], reverseInequality(switchInclusion(interval.leftInequalitySymbol))),
66
+ new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.min)], interval.leftInequalitySymbol),
67
+ ];
68
+ }
69
+ else {
70
+ wrongIneqs = [
71
+ new inequationNode_1.InequationNode([new numberNode_1.NumberNode(interval.min), xNode, new numberNode_1.NumberNode(interval.max)], [
72
+ switchInclusion(interval.leftInequalitySymbol),
73
+ interval.rightInequalitySymbol,
74
+ ]),
75
+ new inequationNode_1.InequationNode([new numberNode_1.NumberNode(interval.min), xNode, new numberNode_1.NumberNode(interval.max)], [
76
+ interval.leftInequalitySymbol,
77
+ switchInclusion(interval.rightInequalitySymbol),
78
+ ]),
79
+ new inequationNode_1.InequationNode([new numberNode_1.NumberNode(interval.min), xNode, new numberNode_1.NumberNode(interval.max)], [
80
+ switchInclusion(interval.leftInequalitySymbol),
81
+ switchInclusion(interval.rightInequalitySymbol),
82
+ ]),
83
+ ];
84
+ }
85
+ wrongIneqs.forEach((ineq) => {
86
+ (0, exercise_1.addWrongProp)(propositions, ineq.toTex());
87
+ });
88
+ return (0, shuffle_1.shuffle)(propositions);
89
+ };
90
+ const isAnswerValid = (ans, { intervalClosure, intervalMax, intervalMin }) => {
91
+ const min = intervalMin === "-infty" ? -Infinity : intervalMin;
92
+ const max = intervalMax === "infty" ? Infinity : intervalMax;
93
+ const interval = new intervals_1.Interval(min.toTree(), max.toTree(), intervalClosure).toTree();
94
+ const inequality = interval.toInequality();
95
+ const answer = inequality;
96
+ const texs = answer.toAllValidTexs();
97
+ return texs.includes(ans);
98
+ };
99
+ exports.inequalityToInterval = {
100
+ id: "intervalToInequality",
101
+ connector: "=",
102
+ label: "Traduire un intervalle en inégalité",
103
+ levels: ["2ndPro", "2nde", "CAP", "1reESM"],
104
+ isSingleStep: true,
105
+ sections: ["Ensembles et intervalles"],
106
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getIntervalToInequalityQuestion, nb),
107
+ qcmTimer: 60,
108
+ freeTimer: 60,
109
+ getPropositions,
110
+ isAnswerValid,
111
+ subject: "Mathématiques",
112
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"spaceVectorCoordinatesFromPoints.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG,EAAE,CAAC;AA6CtB,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAelE,CAAC"}
1
+ {"version":3,"file":"spaceVectorCoordinatesFromPoints.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG,EAAE,CAAC;AAmEtB,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAgBlE,CAAC"}
@@ -5,6 +5,8 @@ const exercise_1 = require("../../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
6
  const spacePoint_1 = require("../../../../math/geometry/spacePoint");
7
7
  const spaceVector_1 = require("../../../../math/geometry/spaceVector");
8
+ const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
9
+ const alignTex_1 = require("../../../../utils/alignTex");
8
10
  const getSpaceVectorCoordinatesFromPointsQuestion = () => {
9
11
  const points = spacePoint_1.SpacePointConstructor.randomDifferent(["A", "B"]);
10
12
  const vector = spaceVector_1.SpaceVectorConstructor.fromPoints(points[0], points[1]);
@@ -22,6 +24,18 @@ const getSpaceVectorCoordinatesFromPointsQuestion = () => {
22
24
  by: points[1].y.evaluate({}),
23
25
  bz: points[1].z.evaluate({}),
24
26
  },
27
+ hint: `Soient deux points $M(x_M;y_M;z_M)$ et $N(x_N;y_N;z_N)$, alors le vecteur $\\overrightarrow{MN}$ a pour coordonnées :
28
+
29
+ $\\overrightarrow{MN} \\begin{pmatrix} x_N - x_M \\\\ y_N - y_M \\\\ z_N - z_M \\end{pmatrix}$`,
30
+ correction: `Les coordonnées du vecteur $\\overrightarrow{AB}$ sont :
31
+
32
+ ${(0, alignTex_1.alignTex)([
33
+ [
34
+ `\\begin{pmatrix} ${new substractNode_1.SubstractNode(points[1].x, points[0].x).toTex()} \\\\ ${new substractNode_1.SubstractNode(points[1].y, points[0].y).toTex()} \\\\ ${new substractNode_1.SubstractNode(points[1].z, points[0].z).toTex()} \\end{pmatrix}`,
35
+ "=",
36
+ vector.toCoordsTex(),
37
+ ],
38
+ ])}`,
25
39
  };
26
40
  return question;
27
41
  };
@@ -49,4 +63,5 @@ exports.spaceVectorCoordinatesFromPoints = {
49
63
  getPropositions,
50
64
  isAnswerValid,
51
65
  subject: "Mathématiques",
66
+ hasHintAndCorrection: true,
52
67
  };
@@ -1 +1 @@
1
- {"version":3,"file":"spaceVectorNormCalculation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA2CF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAa5D,CAAC"}
1
+ {"version":3,"file":"spaceVectorNormCalculation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAwEF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAc5D,CAAC"}
@@ -6,11 +6,15 @@ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQ
6
6
  const spaceVector_1 = require("../../../../math/geometry/spaceVector");
7
7
  const real_1 = require("../../../../math/numbers/reals/real");
8
8
  const sqrtNode_1 = require("../../../../tree/nodes/functions/sqrtNode");
9
+ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
10
+ const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
11
+ const alignTex_1 = require("../../../../utils/alignTex");
9
12
  const getSpaceVectorNormCalculationQuestion = () => {
10
13
  const u = spaceVector_1.SpaceVectorConstructor.random("u", false);
11
14
  const correctAnswer = u.getNorm();
15
+ const answer = correctAnswer.simplify().toTex();
12
16
  const question = {
13
- answer: correctAnswer.simplify().toTex(),
17
+ answer,
14
18
  instruction: `Cacluler la norme du vecteur $${u.toTexWithCoords()}$`,
15
19
  keys: [],
16
20
  answerFormat: "tex",
@@ -19,6 +23,26 @@ const getSpaceVectorNormCalculationQuestion = () => {
19
23
  y: u.y.evaluate({}),
20
24
  z: u.z.evaluate({}),
21
25
  },
26
+ hint: "La norme d'un vecteur de l'espace est la racine carrée de la somme des carrés de ses coordonnées.",
27
+ correction: `La norme d'un vecteur de l'espace est la racine carrée de la somme des carrés de ses coordonnées. Ici, on a donc :
28
+
29
+ ${(0, alignTex_1.alignTex)([
30
+ [
31
+ "\\lVert \\overrightarrow u \\rVert",
32
+ "=",
33
+ new sqrtNode_1.SqrtNode(new addNode_1.AddNode(new powerNode_1.SquareNode(u.x), new addNode_1.AddNode(new powerNode_1.SquareNode(u.y), new powerNode_1.SquareNode(u.z)))).toTex(),
34
+ ],
35
+ [
36
+ "",
37
+ "=",
38
+ new sqrtNode_1.SqrtNode((u.x.evaluate({}) ** 2 +
39
+ u.y.evaluate({}) ** 2 +
40
+ u.z.evaluate({}) ** 2).toTree()).toTex(),
41
+ ],
42
+ ])}
43
+
44
+ Donc $\\lVert \\overrightarrow u \\rVert = ${answer}$.
45
+ `,
22
46
  };
23
47
  return question;
24
48
  };
@@ -51,4 +75,5 @@ exports.spaceVectorNormCalculation = {
51
75
  getPropositions,
52
76
  isAnswerValid,
53
77
  subject: "Mathématiques",
78
+ hasHintAndCorrection: true,
54
79
  };
@@ -1 +1 @@
1
- {"version":3,"file":"squareRootsSum.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/squareRoots/squareRootsSum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvB,CAAC;AA+EF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
1
+ {"version":3,"file":"squareRootsSum.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/squareRoots/squareRootsSum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvB,CAAC;AA8EF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
@@ -62,7 +62,6 @@ const isAnswerValid = (ans, { answer, a, b, c, d, y, x, z }) => {
62
62
  }
63
63
  const tree = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(coeff), new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(b))).simplify();
64
64
  const texs = tree.toAllValidTexs();
65
- console.log("vea SumSQRT answer: ", answer, "texs : ", texs);
66
65
  return texs.includes(ans);
67
66
  };
68
67
  exports.squareRootsSum = {
@@ -130,7 +130,7 @@ const isAnswerValid = (ans, { affine, termeid, termeAdd, termeMult }) => {
130
130
  };
131
131
  exports.sequenceEvaluation = {
132
132
  id: "sequenceEvaluation",
133
- label: "Évaluer un terme d'une suite",
133
+ label: "Exprimer $u_{f(n)}$ en connaissant $u_n$",
134
134
  levels: ["1reSpé"],
135
135
  isSingleStep: true,
136
136
  sections: ["Suites"],
@@ -1 +1 @@
1
- {"version":3,"file":"sequencePlot.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/suites/sequencePlot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAqFF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAc9C,CAAC"}
1
+ {"version":3,"file":"sequencePlot.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/suites/sequencePlot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AA2FF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAe9C,CAAC"}
@@ -16,11 +16,11 @@ const getSequencePlotQuestion = () => {
16
16
  for (let n = 0; n <= nMax; n++) {
17
17
  let u_n;
18
18
  if (isArithmetic) {
19
- const noise = (0, randfloat_1.randfloat)(-1, 1, 1);
19
+ const noise = (0, randfloat_1.randfloat)(-2, 2, 1);
20
20
  u_n = a * n + b + noise;
21
21
  }
22
22
  else {
23
- const noise = (0, randfloat_1.randfloat)(-1, 1, 1);
23
+ const noise = (0, randfloat_1.randfloat)(-2, 2, 1);
24
24
  u_n = b * Math.pow(a, n) + noise;
25
25
  }
26
26
  points.push([n, Math.round(u_n)]);
@@ -41,8 +41,9 @@ const getSequencePlotQuestion = () => {
41
41
  isXAxesNatural: true,
42
42
  isGridSimple: true,
43
43
  });
44
+ const answer = u_nValue.toString();
44
45
  const question = {
45
- answer: u_nValue.toString(),
46
+ answer,
46
47
  instruction: `Ci-dessous est tracé un nuage de points représentant les valeurs d'une suite $(u_n)$. Quelle est la valeur de $u_{${nValue}}$ ?`,
47
48
  commands: ggb.commands,
48
49
  options: ggb.getOptions(),
@@ -55,6 +56,11 @@ const getSequencePlotQuestion = () => {
55
56
  keys: [],
56
57
  answerFormat: "raw",
57
58
  identifiers: { nValue, points, isArithmetic },
59
+ hint: `$u_{${nValue}}$ est l'ordonnée du point d'absicsse $${nValue}$ dans le nuage de points.`,
60
+ correction: `$u_{${nValue}}$ est l'ordonnée du point d'absicsse $${nValue}$ dans le nuage de points.
61
+
62
+ On lit donc : $u_{${nValue}}=${answer}$.
63
+ `,
58
64
  };
59
65
  return question;
60
66
  };
@@ -84,4 +90,5 @@ exports.sequencePlot = {
84
90
  getPropositions,
85
91
  isAnswerValid,
86
92
  subject: "Mathématiques",
93
+ hasHintAndCorrection: true,
87
94
  };
@@ -1 +1 @@
1
- {"version":3,"file":"findAtomEntitiesNumberFromMass.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,OAAO,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAC;AAMhF,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,WAAW,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAuEF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAahE,CAAC"}
1
+ {"version":3,"file":"findAtomEntitiesNumberFromMass.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,OAAO,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAC;AAMhF,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,WAAW,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAsEF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAahE,CAAC"}
@@ -18,7 +18,6 @@ const getFindAtomEntitiesNumberFromMassQuestion = () => {
18
18
  const sampleMassMeasure = new measure_1.Measure(sampleMass, 0, massUnits_1.MassUnit.kg);
19
19
  const atomMass = atoms_1.nucleonMass.value.times(atom.masseAtomique).toSignificant(2);
20
20
  const entitiesNumber = sampleMassMeasure.divide(atomMass).toSignificant(2);
21
- console.log("entitiesNumber", entitiesNumber);
22
21
  const instruction = `Un échantillon a une masse $m = ${sampleMassMeasure.toTex()}$ ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(atom.name) ? "d'" : "de "}${atom.name}. La masse d'un atome ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(atom.name) ? "d'" : "de "}${atom.name} est de $${atomMass.toTex({ scientific: 2 })}$.
23
22
  Déterminer le nombre d'atomes ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(atom.name) ? "d'" : "de "}${atom.name} composant l'échantillon.`;
24
23
  const question = {
@@ -1 +1 @@
1
- {"version":3,"file":"energyTransfer.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/energy/energyTransfer.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAiEF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAahD,CAAC"}
1
+ {"version":3,"file":"energyTransfer.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/energy/energyTransfer.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAgEF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAahD,CAAC"}
@@ -49,7 +49,6 @@ const isAnswerValid = (ans, { answer, energy }) => {
49
49
  const validanswer2 = energy.toTree().toAllValidTexs();
50
50
  let latexs = [];
51
51
  latexs.push(validanswer1, ...validanswer2);
52
- console.log(latexs);
53
52
  return latexs.includes(ans);
54
53
  };
55
54
  exports.energyTransfer = {
@@ -1 +1 @@
1
- {"version":3,"file":"gravitationalAttractionObjectHeight.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/forces/gravitationalAttractionObjectHeight.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAiIF,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CAAC,WAAW,CAerE,CAAC"}
1
+ {"version":3,"file":"gravitationalAttractionObjectHeight.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/forces/gravitationalAttractionObjectHeight.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAgIF,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CAAC,WAAW,CAerE,CAAC"}
@@ -112,7 +112,6 @@ const isAnswerValid = (ans, { answer, h }) => {
112
112
  validanswer2.toSignificant(2).toTex({ hideUnit: true }),
113
113
  validanswer3.toSignificant(2).toTex({ hideUnit: true }),
114
114
  ];
115
- console.log(latexs);
116
115
  return latexs.includes(ans);
117
116
  };
118
117
  exports.gravitationalAttractionObjectHeight = {
@@ -1 +1 @@
1
- {"version":3,"file":"elongationReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mecanicalWaves/elongationReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA6FF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAanD,CAAC"}
1
+ {"version":3,"file":"elongationReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mecanicalWaves/elongationReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA4FF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAanD,CAAC"}
@@ -54,7 +54,6 @@ const isAnswerValid = (ans, { answer, amplitude, period }) => {
54
54
  const node = new multiplyNode_1.MultiplyNode(amplitude.toTree(), new cosNode_1.CosNode(new multiplyNode_1.MultiplyNode(frac, new variableNode_1.VariableNode("t"))));
55
55
  const equal = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y\\left(t\\right)"), node);
56
56
  const texs = equal.toAllValidTexs({ allowRawRightChildAsSolution: true });
57
- console.log(texs);
58
57
  return texs.includes(ans);
59
58
  };
60
59
  exports.elongationReading = {