math-exercises 3.0.56 → 3.0.58

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 (286) hide show
  1. package/lib/exercises/math/calcul/operations/operationsPriorities.d.ts +2 -0
  2. package/lib/exercises/math/calcul/operations/operationsPriorities.d.ts.map +1 -1
  3. package/lib/exercises/math/calcul/operations/operationsPriorities.js +46 -36
  4. package/lib/exercises/math/calculLitteral/equation/choseOperationToSolveEquation.d.ts.map +1 -1
  5. package/lib/exercises/math/calculLitteral/equation/choseOperationToSolveEquation.js +65 -13
  6. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -1
  7. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +1 -4
  8. package/lib/exercises/math/calculLitteral/factorisation/facto1.d.ts +16 -0
  9. package/lib/exercises/math/calculLitteral/factorisation/facto1.d.ts.map +1 -0
  10. package/lib/exercises/math/calculLitteral/factorisation/facto1.js +184 -0
  11. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
  12. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +43 -0
  13. package/lib/exercises/math/calculLitteral/factorisation/index.d.ts +1 -1
  14. package/lib/exercises/math/calculLitteral/factorisation/index.d.ts.map +1 -1
  15. package/lib/exercises/math/calculLitteral/factorisation/index.js +1 -1
  16. package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.d.ts.map +1 -1
  17. package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.js +23 -0
  18. package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.d.ts.map +1 -1
  19. package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.js +23 -0
  20. package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.d.ts.map +1 -1
  21. package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.js +49 -0
  22. package/lib/exercises/math/conversion/capacityConversion.d.ts.map +1 -1
  23. package/lib/exercises/math/conversion/capacityConversion.js +68 -12
  24. package/lib/exercises/math/conversion/hoursToDecimal.d.ts.map +1 -1
  25. package/lib/exercises/math/conversion/hoursToDecimal.js +73 -15
  26. package/lib/exercises/math/conversion/lengthConversion.d.ts.map +1 -1
  27. package/lib/exercises/math/conversion/lengthConversion.js +55 -6
  28. package/lib/exercises/math/conversion/massConversion.d.ts.map +1 -1
  29. package/lib/exercises/math/conversion/massConversion.js +72 -16
  30. package/lib/exercises/math/conversion/volumeConversion.d.ts.map +1 -1
  31. package/lib/exercises/math/conversion/volumeConversion.js +72 -12
  32. package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.d.ts +8 -0
  33. package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.d.ts.map +1 -0
  34. package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.js +102 -0
  35. package/lib/exercises/math/derivation/convexity/convexityTrinomials.d.ts +7 -0
  36. package/lib/exercises/math/derivation/convexity/convexityTrinomials.d.ts.map +1 -0
  37. package/lib/exercises/math/derivation/convexity/convexityTrinomials.js +52 -0
  38. package/lib/exercises/math/derivation/convexity/index.d.ts +4 -0
  39. package/lib/exercises/math/derivation/convexity/index.d.ts.map +1 -0
  40. package/lib/exercises/math/derivation/convexity/index.js +3 -0
  41. package/lib/exercises/math/derivation/convexity/inflexionPointQuadrinomials.d.ts +7 -0
  42. package/lib/exercises/math/derivation/convexity/inflexionPointQuadrinomials.d.ts.map +1 -0
  43. package/lib/exercises/math/derivation/convexity/inflexionPointQuadrinomials.js +134 -0
  44. package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.d.ts +8 -0
  45. package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.d.ts.map +1 -0
  46. package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.js +79 -0
  47. package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.d.ts +8 -0
  48. package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.d.ts.map +1 -0
  49. package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.js +85 -0
  50. package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.d.ts +8 -0
  51. package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.d.ts.map +1 -0
  52. package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.js +86 -0
  53. package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.d.ts +8 -0
  54. package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.d.ts.map +1 -0
  55. package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.js +76 -0
  56. package/lib/exercises/math/derivation/derivative/exp/index.d.ts +6 -0
  57. package/lib/exercises/math/derivation/derivative/exp/index.d.ts.map +1 -0
  58. package/lib/exercises/math/derivation/derivative/exp/index.js +5 -0
  59. package/lib/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.d.ts +7 -0
  60. package/lib/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.d.ts.map +1 -0
  61. package/lib/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.js +84 -0
  62. package/lib/exercises/math/derivation/derivative/index.d.ts +6 -27
  63. package/lib/exercises/math/derivation/derivative/index.d.ts.map +1 -1
  64. package/lib/exercises/math/derivation/derivative/index.js +6 -27
  65. package/lib/exercises/math/derivation/derivative/ln/index.d.ts +4 -0
  66. package/lib/exercises/math/derivation/derivative/ln/index.d.ts.map +1 -0
  67. package/lib/exercises/math/derivation/derivative/ln/index.js +3 -0
  68. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeOne.d.ts +8 -0
  69. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeOne.d.ts.map +1 -0
  70. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeOne.js +81 -0
  71. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeThree.d.ts +8 -0
  72. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeThree.d.ts.map +1 -0
  73. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeThree.js +103 -0
  74. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeTwo.d.ts +8 -0
  75. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeTwo.d.ts.map +1 -0
  76. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeTwo.js +77 -0
  77. package/lib/exercises/math/derivation/derivative/polynomial/constanteDerivative.d.ts +10 -0
  78. package/lib/exercises/math/derivation/derivative/polynomial/constanteDerivative.d.ts.map +1 -0
  79. package/lib/exercises/math/derivation/derivative/polynomial/constanteDerivative.js +71 -0
  80. package/lib/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.d.ts +11 -0
  81. package/lib/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.d.ts.map +1 -0
  82. package/lib/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.js +88 -0
  83. package/lib/exercises/math/derivation/derivative/polynomial/index.d.ts +8 -0
  84. package/lib/exercises/math/derivation/derivative/polynomial/index.d.ts.map +1 -0
  85. package/lib/exercises/math/derivation/derivative/polynomial/index.js +7 -0
  86. package/lib/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.d.ts +10 -0
  87. package/lib/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.d.ts.map +1 -0
  88. package/lib/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.js +115 -0
  89. package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfThirdDegreeFunction.d.ts +10 -0
  90. package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfThirdDegreeFunction.d.ts.map +1 -0
  91. package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfThirdDegreeFunction.js +80 -0
  92. package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfTrinom.d.ts +9 -0
  93. package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfTrinom.d.ts.map +1 -0
  94. package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfTrinom.js +67 -0
  95. package/lib/exercises/math/derivation/derivative/polynomial/thirdDegreeDerivative.d.ts +10 -0
  96. package/lib/exercises/math/derivation/derivative/polynomial/thirdDegreeDerivative.d.ts.map +1 -0
  97. package/lib/exercises/math/derivation/derivative/polynomial/thirdDegreeDerivative.js +134 -0
  98. package/lib/exercises/math/derivation/derivative/polynomial/usualderivative.d.ts +11 -0
  99. package/lib/exercises/math/derivation/derivative/polynomial/usualderivative.d.ts.map +1 -0
  100. package/lib/exercises/math/derivation/derivative/polynomial/usualderivative.js +97 -0
  101. package/lib/exercises/math/derivation/derivative/power/index.d.ts +3 -0
  102. package/lib/exercises/math/derivation/derivative/power/index.d.ts.map +1 -0
  103. package/lib/exercises/math/derivation/derivative/power/index.js +2 -0
  104. package/lib/exercises/math/derivation/derivative/power/powerCompositionDerivation.d.ts +9 -0
  105. package/lib/exercises/math/derivation/derivative/power/powerCompositionDerivation.d.ts.map +1 -0
  106. package/lib/exercises/math/derivation/derivative/power/powerCompositionDerivation.js +122 -0
  107. package/lib/exercises/math/derivation/derivative/power/powerFunctionDerivative.d.ts +8 -0
  108. package/lib/exercises/math/derivation/derivative/power/powerFunctionDerivative.d.ts.map +1 -0
  109. package/lib/exercises/math/derivation/derivative/power/powerFunctionDerivative.js +118 -0
  110. package/lib/exercises/math/derivation/derivative/sqrt/index.d.ts +3 -0
  111. package/lib/exercises/math/derivation/derivative/sqrt/index.d.ts.map +1 -0
  112. package/lib/exercises/math/derivation/derivative/sqrt/index.js +3 -0
  113. package/lib/exercises/math/derivation/derivative/sqrt/rootFunctionDerivative.d.ts +7 -0
  114. package/lib/exercises/math/derivation/derivative/sqrt/rootFunctionDerivative.d.ts.map +1 -0
  115. package/lib/exercises/math/derivation/derivative/sqrt/rootFunctionDerivative.js +115 -0
  116. package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.d.ts +8 -0
  117. package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.d.ts.map +1 -0
  118. package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.js +77 -0
  119. package/lib/exercises/math/derivation/derivative/sqrt/sqrtProductDerivative.d.ts +8 -0
  120. package/lib/exercises/math/derivation/derivative/sqrt/sqrtProductDerivative.d.ts.map +1 -0
  121. package/lib/exercises/math/derivation/derivative/sqrt/sqrtProductDerivative.js +85 -0
  122. package/lib/exercises/math/derivation/derivative/trigo/cosCompositionDerivation.d.ts +8 -0
  123. package/lib/exercises/math/derivation/derivative/trigo/cosCompositionDerivation.d.ts.map +1 -0
  124. package/lib/exercises/math/derivation/derivative/trigo/cosCompositionDerivation.js +81 -0
  125. package/lib/exercises/math/derivation/derivative/trigo/cosSecondDegreeDerivative.d.ts +7 -0
  126. package/lib/exercises/math/derivation/derivative/trigo/cosSecondDegreeDerivative.d.ts.map +1 -0
  127. package/lib/exercises/math/derivation/derivative/trigo/cosSecondDegreeDerivative.js +103 -0
  128. package/lib/exercises/math/derivation/derivative/trigo/index.d.ts +5 -0
  129. package/lib/exercises/math/derivation/derivative/trigo/index.d.ts.map +1 -0
  130. package/lib/exercises/math/derivation/derivative/trigo/index.js +4 -0
  131. package/lib/exercises/math/derivation/derivative/trigo/sinCompositionDerivation.d.ts +8 -0
  132. package/lib/exercises/math/derivation/derivative/trigo/sinCompositionDerivation.d.ts.map +1 -0
  133. package/lib/exercises/math/derivation/derivative/trigo/sinCompositionDerivation.js +70 -0
  134. package/lib/exercises/math/derivation/derivative/trigo/sinSecondDegreeDerivative.d.ts +7 -0
  135. package/lib/exercises/math/derivation/derivative/trigo/sinSecondDegreeDerivative.d.ts.map +1 -0
  136. package/lib/exercises/math/derivation/derivative/trigo/sinSecondDegreeDerivative.js +91 -0
  137. package/lib/exercises/math/derivation/derivativeNumberCalcul.d.ts.map +1 -1
  138. package/lib/exercises/math/derivation/derivativeNumberCalcul.js +4 -2
  139. package/lib/exercises/math/derivation/index.d.ts +2 -0
  140. package/lib/exercises/math/derivation/index.d.ts.map +1 -1
  141. package/lib/exercises/math/derivation/index.js +2 -0
  142. package/lib/exercises/math/derivation/variations/index.d.ts +2 -0
  143. package/lib/exercises/math/derivation/variations/index.d.ts.map +1 -0
  144. package/lib/exercises/math/derivation/variations/index.js +1 -0
  145. package/lib/exercises/math/derivation/variations/thirdDegreeFunctionVariation.d.ts +11 -0
  146. package/lib/exercises/math/derivation/variations/thirdDegreeFunctionVariation.d.ts.map +1 -0
  147. package/lib/exercises/math/derivation/variations/thirdDegreeFunctionVariation.js +168 -0
  148. package/lib/exercises/math/equaDiff/equaDiffAyPlusB.d.ts.map +1 -1
  149. package/lib/exercises/math/equaDiff/equaDiffAyPlusB.js +39 -22
  150. package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.d.ts.map +1 -1
  151. package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.js +7 -1
  152. package/lib/exercises/math/equaDiff/equaDiffGeneralForme.d.ts.map +1 -1
  153. package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +38 -15
  154. package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.d.ts.map +1 -1
  155. package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.js +29 -8
  156. package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.d.ts +8 -0
  157. package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.d.ts.map +1 -0
  158. package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.js +86 -0
  159. package/lib/exercises/math/equaDiff/index.d.ts +1 -1
  160. package/lib/exercises/math/equaDiff/index.d.ts.map +1 -1
  161. package/lib/exercises/math/equaDiff/index.js +1 -1
  162. package/lib/exercises/math/functions/affines/signFunction.d.ts.map +1 -1
  163. package/lib/exercises/math/functions/affines/signFunction.js +23 -11
  164. package/lib/exercises/math/functions/exponential/expEquation.d.ts.map +1 -1
  165. package/lib/exercises/math/functions/exponential/expEquation.js +3 -0
  166. package/lib/exercises/math/functions/exponential/expFactorization.d.ts.map +1 -1
  167. package/lib/exercises/math/functions/exponential/expFactorization.js +3 -0
  168. package/lib/exercises/math/functions/exponential/expSimplifiying.d.ts.map +1 -1
  169. package/lib/exercises/math/functions/exponential/expSimplifiying.js +83 -45
  170. package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.d.ts.map +1 -1
  171. package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.js +12 -5
  172. package/lib/exercises/math/geometry/euclidianConstructions/buildRhombus.d.ts +2 -0
  173. package/lib/exercises/math/geometry/euclidianConstructions/buildRhombus.d.ts.map +1 -0
  174. package/lib/exercises/math/geometry/euclidianConstructions/buildRhombus.js +63 -0
  175. package/lib/exercises/math/geometry/lines/cartesianEquationToReduced.d.ts.map +1 -1
  176. package/lib/exercises/math/geometry/lines/cartesianEquationToReduced.js +68 -29
  177. package/lib/exercises/math/geometry/lines/cartesianEquationsIntersection.d.ts.map +1 -1
  178. package/lib/exercises/math/geometry/lines/cartesianEquationsIntersection.js +56 -4
  179. package/lib/exercises/math/geometry/lines/drawLineFromCartesianEquation.d.ts.map +1 -1
  180. package/lib/exercises/math/geometry/lines/drawLineFromCartesianEquation.js +71 -25
  181. package/lib/exercises/math/limits/polynomLimit.d.ts +1 -1
  182. package/lib/exercises/math/limits/polynomLimit.d.ts.map +1 -1
  183. package/lib/exercises/math/limits/polynomLimit.js +28 -9
  184. package/lib/exercises/math/limits/polynomLimitNoFI.d.ts +1 -1
  185. package/lib/exercises/math/limits/polynomLimitNoFI.d.ts.map +1 -1
  186. package/lib/exercises/math/limits/polynomLimitNoFI.js +29 -10
  187. package/lib/exercises/math/powers/calculateNegativePower.d.ts.map +1 -1
  188. package/lib/exercises/math/powers/calculateNegativePower.js +59 -16
  189. package/lib/exercises/math/powers/decimalToScientific.d.ts.map +1 -1
  190. package/lib/exercises/math/powers/decimalToScientific.js +55 -11
  191. package/lib/exercises/math/powers/index.d.ts +1 -0
  192. package/lib/exercises/math/powers/index.d.ts.map +1 -1
  193. package/lib/exercises/math/powers/index.js +1 -0
  194. package/lib/exercises/math/powers/powersDivision.d.ts +5 -2
  195. package/lib/exercises/math/powers/powersDivision.d.ts.map +1 -1
  196. package/lib/exercises/math/powers/powersDivision.js +68 -53
  197. package/lib/exercises/math/powers/powersMixOperations.d.ts +1 -0
  198. package/lib/exercises/math/powers/powersMixOperations.d.ts.map +1 -1
  199. package/lib/exercises/math/powers/powersMixOperations.js +88 -17
  200. package/lib/exercises/math/powers/powersOfTenMixOperations.d.ts +10 -0
  201. package/lib/exercises/math/powers/powersOfTenMixOperations.d.ts.map +1 -0
  202. package/lib/exercises/math/powers/powersOfTenMixOperations.js +129 -0
  203. package/lib/exercises/math/powers/powersOfTenToDecimal.d.ts.map +1 -1
  204. package/lib/exercises/math/powers/powersOfTenToDecimal.js +32 -3
  205. package/lib/exercises/math/powers/powersProduct.d.ts.map +1 -1
  206. package/lib/exercises/math/powers/powersProduct.js +1 -0
  207. package/lib/exercises/math/powers/scientificToDecimal.d.ts.map +1 -1
  208. package/lib/exercises/math/powers/scientificToDecimal.js +50 -10
  209. package/lib/exercises/math/primitive/klogUPrimitive.js +1 -1
  210. package/lib/exercises/math/primitive/logarithmePrimitive.js +1 -1
  211. package/lib/exercises/math/primitive/polynomialPrimitive.d.ts.map +1 -1
  212. package/lib/exercises/math/primitive/polynomialPrimitive.js +1 -0
  213. package/lib/exercises/math/probaStat/stats1var/averageList.d.ts.map +1 -1
  214. package/lib/exercises/math/probaStat/stats1var/averageList.js +4 -4
  215. package/lib/exercises/math/probaStat/stats1var/averageWithTable.d.ts.map +1 -1
  216. package/lib/exercises/math/probaStat/stats1var/averageWithTable.js +42 -11
  217. package/lib/exercises/math/probaStat/stats1var/choseReasoningForIndicator.d.ts.map +1 -1
  218. package/lib/exercises/math/probaStat/stats1var/choseReasoningForIndicator.js +8 -20
  219. package/lib/exercises/math/probaStat/stats1var/etendueList.d.ts.map +1 -1
  220. package/lib/exercises/math/probaStat/stats1var/etendueList.js +4 -6
  221. package/lib/exercises/math/probaStat/stats1var/interquartilesList.d.ts.map +1 -1
  222. package/lib/exercises/math/probaStat/stats1var/interquartilesList.js +4 -4
  223. package/lib/exercises/math/probaStat/stats1var/interquartilesTable.d.ts.map +1 -1
  224. package/lib/exercises/math/probaStat/stats1var/interquartilesTable.js +4 -4
  225. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
  226. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +13 -9
  227. package/lib/exercises/math/probaStat/stats1var/median.d.ts.map +1 -1
  228. package/lib/exercises/math/probaStat/stats1var/median.js +19 -14
  229. package/lib/exercises/math/probaStat/stats1var/medianList.d.ts.map +1 -1
  230. package/lib/exercises/math/probaStat/stats1var/medianList.js +3 -0
  231. package/lib/exercises/math/probaStat/stats1var/quartiles.d.ts.map +1 -1
  232. package/lib/exercises/math/probaStat/stats1var/quartiles.js +16 -11
  233. package/lib/exercises/math/probaStat/stats1var/quartilesList.d.ts.map +1 -1
  234. package/lib/exercises/math/probaStat/stats1var/quartilesList.js +18 -14
  235. package/lib/exercises/math/probaStat/stats1var/standardDeviationList.d.ts.map +1 -1
  236. package/lib/exercises/math/probaStat/stats1var/standardDeviationList.js +4 -4
  237. package/lib/exercises/math/probaStat/stats1var/standardDeviationTable.d.ts.map +1 -1
  238. package/lib/exercises/math/probaStat/stats1var/standardDeviationTable.js +4 -4
  239. package/lib/exercises/math/probaStat/stats1var/varianceList.d.ts.map +1 -1
  240. package/lib/exercises/math/probaStat/stats1var/varianceList.js +4 -4
  241. package/lib/exercises/math/probaStat/stats1var/varianceTable.d.ts.map +1 -1
  242. package/lib/exercises/math/probaStat/stats1var/varianceTable.js +4 -4
  243. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.d.ts.map +1 -1
  244. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.js +40 -2
  245. package/lib/exercises/math/sequences/geometric/geometricFirstTermsSum.d.ts.map +1 -1
  246. package/lib/exercises/math/sequences/geometric/geometricFirstTermsSum.js +32 -0
  247. package/lib/exercises/math/trigonometry/trigonometry.d.ts.map +1 -1
  248. package/lib/exercises/math/trigonometry/trigonometry.js +67 -1
  249. package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.d.ts.map +1 -1
  250. package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.js +89 -0
  251. package/lib/exercises/pc/index.d.ts +5 -5
  252. package/lib/exercises/pc/index.d.ts.map +1 -1
  253. package/lib/exercises/pc/index.js +5 -5
  254. package/lib/index.d.ts +56 -45
  255. package/lib/index.d.ts.map +1 -1
  256. package/lib/math/geometry/angle.d.ts.map +1 -1
  257. package/lib/math/geometry/angle.js +0 -5
  258. package/lib/math/geometry/vector.d.ts +1 -0
  259. package/lib/math/geometry/vector.d.ts.map +1 -1
  260. package/lib/math/geometry/vector.js +19 -0
  261. package/lib/math/numbers/decimals/decimal.d.ts +1 -0
  262. package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
  263. package/lib/math/numbers/decimals/decimal.js +2 -0
  264. package/lib/math/systems/generalSystem.d.ts +6 -1
  265. package/lib/math/systems/generalSystem.d.ts.map +1 -1
  266. package/lib/math/systems/generalSystem.js +137 -0
  267. package/lib/math/utils/arithmetic/lcm.js +1 -1
  268. package/lib/playground.d.ts.map +1 -1
  269. package/lib/playground.js +4 -34
  270. package/lib/tree/nodes/algebraicNode.d.ts +1 -0
  271. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
  272. package/lib/tree/nodes/equations/equalNode.d.ts +7 -1
  273. package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
  274. package/lib/tree/nodes/equations/equalNode.js +17 -9
  275. package/lib/tree/nodes/functions/logNode.js +2 -4
  276. package/lib/tree/nodes/operators/addNode.js +1 -1
  277. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  278. package/lib/tree/nodes/operators/fractionNode.js +35 -11
  279. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  280. package/lib/tree/nodes/operators/multiplyNode.js +4 -3
  281. package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
  282. package/lib/tree/nodes/operators/powerNode.js +5 -0
  283. package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
  284. package/lib/tree/nodes/sets/intervalNode.js +3 -1
  285. package/lib/tree/parsers/latexParser.js +6 -2
  286. package/package.json +1 -1
@@ -57,7 +57,7 @@ $$`;
57
57
  // const getHint: GetHint<Identifiers> = (identifiers) => {};
58
58
  // const getCorrection: GetCorrection<Identifiers> = (identifiers) => {};
59
59
  const getKeys = (identifiers) => {
60
- return ["ln", "epower", "abs", "x", "C"];
60
+ return ["lnBrackets", "epower", "abs", "x", "C"];
61
61
  };
62
62
  const isAnswerValid = (ans, { answer, ...identifiers }) => {
63
63
  //!VEA chaud
@@ -11,7 +11,7 @@ import { PowerNode } from "../../../tree/nodes/operators/powerNode.js";
11
11
  import { VariableNode } from "../../../tree/nodes/variables/variableNode.js";
12
12
  import { shuffle } from "../../../utils/alea/shuffle.js";
13
13
  const getKeys = () => {
14
- return ["x", "C", "ln", "abs", "epower"];
14
+ return ["x", "C", "lnBrackets", "abs", "epower"];
15
15
  };
16
16
  const getAnswer = (identifiers) => {
17
17
  const { coeffs } = identifiers;
@@ -1 +1 @@
1
- {"version":3,"file":"polynomialPrimitive.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/primitive/polynomialPrimitive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAIR,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAiBF,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,CAAC,WAAW,CAcjE,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,YAAY,CAAC,WAAW,CAexE,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,GAAG,CAAC,WAAW,CAmB7D,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAWrD,CAAC"}
1
+ {"version":3,"file":"polynomialPrimitive.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/primitive/polynomialPrimitive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAIR,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAiBF,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,CAAC,WAAW,CAcjE,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,YAAY,CAAC,WAAW,CAexE,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,GAAG,CAAC,WAAW,CAqB7D,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAWrD,CAAC"}
@@ -53,6 +53,7 @@ export const isPolynomialPrimitiveAnswerValid = (ans, { coeffs, answer }) => {
53
53
  towardsDistribute: true,
54
54
  forbidFactorize: true,
55
55
  forceDistributeFractions: true,
56
+ decimalToFractions: true,
56
57
  })
57
58
  .toTex() === answer);
58
59
  }
@@ -1 +1 @@
1
- {"version":3,"file":"averageList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/averageList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAqFF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAkB7C,CAAC"}
1
+ {"version":3,"file":"averageList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/averageList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA2FF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAe7C,CAAC"}
@@ -50,6 +50,9 @@ const getAverageListQuestion = () => {
50
50
  randomValues.push(randint(1, 20));
51
51
  const sortedValues = randomValues.sort((a, b) => a - b);
52
52
  const identifiers = { sortedValues };
53
+ return getQuestionFromIdentifiers(identifiers);
54
+ };
55
+ const getQuestionFromIdentifiers = (identifiers) => {
53
56
  const question = {
54
57
  answer: getAnswer(identifiers),
55
58
  instruction: getInstruction(identifiers),
@@ -87,8 +90,5 @@ export const averageList = {
87
90
  isAnswerValid,
88
91
  subject: "Mathématiques",
89
92
  hasHintAndCorrection: true,
90
- getInstruction,
91
- getAnswer,
92
- getHint,
93
- getCorrection,
93
+ getQuestionFromIdentifiers,
94
94
  };
@@ -1 +1 @@
1
- {"version":3,"file":"averageWithTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/averageWithTable.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,QAAQ,EAST,MAAM,sBAAsB,CAAC;AAI9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AAgFF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC"}
1
+ {"version":3,"file":"averageWithTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/averageWithTable.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,QAAQ,EAaT,MAAM,sBAAsB,CAAC;AAQ9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AAoHF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAgBlD,CAAC"}
@@ -6,6 +6,27 @@ import { dollarize } from "../../../../utils/latex/dollarize.js";
6
6
  import { addValidProp, tryToAddWrongProp, } from "../../../exercise.js";
7
7
  import { getDistinctQuestions } from "../../../utils/getDistinctQuestions.js";
8
8
  import { numberVEA } from "../../../../exercises/vea/numberVEA.js";
9
+ import { operatorComposition } from "../../../../tree/utilities/operatorComposition.js";
10
+ import { AddNode } from "../../../../tree/nodes/operators/addNode.js";
11
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
12
+ import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
13
+ const getHint = (identifiers) => {
14
+ return `La moyenne est la somme des produits des valeurs par leur effectif, divisée par la somme des effectifs.`;
15
+ };
16
+ const getCorrection = (identifiers) => {
17
+ const { randomEffectives, randomValues } = identifiers;
18
+ const sumEff = operatorComposition(AddNode, randomEffectives.map((e) => e.toTree()));
19
+ const sumProd = operatorComposition(AddNode, randomValues.map((e, i) => multiply(randomEffectives[i].toTree(), e.toTree())));
20
+ const fraction = frac(sumProd, sumEff);
21
+ const simp = fraction.simplify();
22
+ const ev = simp.evaluate();
23
+ return `La moyenne est égale à :
24
+
25
+ $$
26
+ ${fraction.toSimplificationTex()}
27
+ $$
28
+ `;
29
+ };
9
30
  const getInstruction = ({ randomEffectives, randomValues, }) => {
10
31
  return `On considère le tableau d'effectifs suivant :
11
32
 
@@ -16,6 +37,17 @@ ${mdTable([
16
37
 
17
38
  Calculer la moyenne de cette série de valeurs (arrondir au centième).`;
18
39
  };
40
+ const getAnswer = (identifiers) => {
41
+ const { randomEffectives, randomValues } = identifiers;
42
+ let average = 0;
43
+ for (let i = 0; i < randomValues.length; i++)
44
+ average += randomValues[i] * randomEffectives[i];
45
+ const sumEffectives = randomEffectives.reduce((sum, value) => sum + value, 0);
46
+ average /= sumEffectives;
47
+ average = round(average, 2);
48
+ const answer = (average + "").replace(".", ",");
49
+ return answer;
50
+ };
19
51
  const getAverageWithTableQuestion = () => {
20
52
  const getRandomUniqueValues = (count, min, max) => {
21
53
  const uniqueValues = new Set();
@@ -24,23 +56,21 @@ const getAverageWithTableQuestion = () => {
24
56
  }
25
57
  return Array.from(uniqueValues).sort((a, b) => a - b);
26
58
  };
27
- const randomValues = getRandomUniqueValues(5, 1, 20);
28
- const randomEffectives = [1, 2, 3, 4, 5].map((el) => randint(1, 6));
29
- const sumEffectives = randomEffectives.reduce((sum, value) => sum + value, 0);
30
- let average = 0;
31
- for (let i = 0; i < randomValues.length; i++)
32
- average += randomValues[i] * randomEffectives[i];
33
- average /= sumEffectives;
34
- average = round(average, 2);
59
+ const randomValues = getRandomUniqueValues(4, 1, 20);
60
+ const randomEffectives = [1, 2, 3, 4].map((el) => randint(1, 6));
35
61
  const identifiers = { randomEffectives, randomValues };
36
- const answer = (average + "").replace(".", ",");
62
+ return getQuestionFromIdentifiers(identifiers);
63
+ };
64
+ const getQuestionFromIdentifiers = (identifiers) => {
37
65
  const question = {
38
66
  instruction: getInstruction(identifiers),
39
- answer,
67
+ answer: getAnswer(identifiers),
40
68
  keys: [],
41
69
  answerFormat: "tex",
42
70
  identifiers,
43
71
  style: { tableHasNoHeader: true },
72
+ hint: getHint(identifiers),
73
+ correction: getCorrection(identifiers),
44
74
  };
45
75
  return question;
46
76
  };
@@ -71,5 +101,6 @@ export const averageWithTable = {
71
101
  getPropositions,
72
102
  isAnswerValid,
73
103
  subject: "Mathématiques",
74
- getInstruction,
104
+ getQuestionFromIdentifiers,
105
+ hasHintAndCorrection: true,
75
106
  };
@@ -1 +1 @@
1
- {"version":3,"file":"choseReasoningForIndicator.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/choseReasoningForIndicator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AA4HF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAiB5D,CAAC"}
1
+ {"version":3,"file":"choseReasoningForIndicator.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/choseReasoningForIndicator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAqHF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAa5D,CAAC"}
@@ -6,7 +6,6 @@ import { operatorComposition } from "../../../../tree/utilities/operatorComposit
6
6
  import { random } from "../../../../utils/alea/random.js";
7
7
  import { shuffle } from "../../../../utils/alea/shuffle.js";
8
8
  import { average } from "../../../../utils/average.js";
9
- import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
10
9
  const getPropositions = (n, { answer, ...identifiers }) => {
11
10
  const propositions = [];
12
11
  addValidProp(propositions, answer, "raw");
@@ -39,19 +38,13 @@ La ${indicatorAsked} de cette série est $${avg}$.
39
38
 
40
39
  Quelle est la justification correcte ?`;
41
40
  };
42
- // const getHint: GetHint<Identifiers> = (identifiers) => {};
43
- // const getCorrection: GetCorrection<Identifiers> = (identifiers) => {};
44
- const getKeys = (identifiers) => {
45
- return [];
46
- };
47
- const isAnswerValid = (ans, { answer }) => {
48
- try {
49
- throw Error("VEA not implemented");
50
- }
51
- catch (err) {
52
- return handleVEAError(err);
53
- }
54
- };
41
+ // const getHint: GetHint<Identifiers> = (identifiers) => {
42
+ // const { values, indicatorAsked } = identifiers;
43
+ // return indicatorAsked === "moyenne" ? `La moyenne est la somme des valeurs, divisée par le nombre de valeurs.` : `La médiane est la valeur telle qu'il y a autant de valeurs inférieures à elle que de valeurs supérieures.`;
44
+ // };
45
+ // const getCorrection: GetCorrection<Identifiers> = (identifiers) => {
46
+ // return ``
47
+ // };
55
48
  const getChoseReasoningForIndicatorQuestion = (ops) => {
56
49
  const max = 2 * randint(5, 20);
57
50
  const x = max / 2;
@@ -82,7 +75,6 @@ const getQuestionFromIdentifiers = (identifiers) => {
82
75
  const question = {
83
76
  answer: getAnswer(identifiers),
84
77
  instruction: getInstruction(identifiers),
85
- keys: getKeys(identifiers),
86
78
  answerFormat: "raw",
87
79
  identifiers,
88
80
  // hint: getHint(identifiers),
@@ -98,12 +90,8 @@ export const choseReasoningForIndicator = {
98
90
  qcmTimer: 60,
99
91
  freeTimer: 60,
100
92
  getPropositions,
101
- isAnswerValid,
102
93
  subject: "Mathématiques",
103
- getInstruction,
104
- // getHint,
105
- // getCorrection,
106
- getAnswer,
107
94
  answerType: "QCU",
108
95
  getQuestionFromIdentifiers,
96
+ // hasHintAndCorrection: true
109
97
  };
@@ -1 +1 @@
1
- {"version":3,"file":"etendueList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/etendueList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAgFF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAkB7C,CAAC"}
1
+ {"version":3,"file":"etendueList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/etendueList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAqFF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAa7C,CAAC"}
@@ -37,6 +37,9 @@ const getEtendueListQuestion = () => {
37
37
  randomValues.push(randint(1, 20));
38
38
  const sortedValues = randomValues.sort((a, b) => a - b);
39
39
  const identifiers = { sortedValues };
40
+ return getQuestionFromIdentifiers(identifiers);
41
+ };
42
+ const getQuestionFromIdentifiers = (identifiers) => {
40
43
  const question = {
41
44
  answer: getAnswer(identifiers),
42
45
  instruction: getInstruction(identifiers),
@@ -70,9 +73,7 @@ export const etendueList = {
70
73
  id: "etendueList",
71
74
  connector: "=",
72
75
  label: "Calcul de l'étendue d'une liste de valeurs",
73
- levels: [],
74
76
  isSingleStep: true,
75
- sections: [],
76
77
  generator: (nb) => getDistinctQuestions(getEtendueListQuestion, nb),
77
78
  qcmTimer: 60,
78
79
  freeTimer: 60,
@@ -80,8 +81,5 @@ export const etendueList = {
80
81
  isAnswerValid,
81
82
  subject: "Mathématiques",
82
83
  hasHintAndCorrection: true,
83
- getInstruction,
84
- getAnswer,
85
- getHint,
86
- getCorrection,
84
+ getQuestionFromIdentifiers,
87
85
  };
@@ -1 +1 @@
1
- {"version":3,"file":"interquartilesList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/interquartilesList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAoFF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAiBpD,CAAC"}
1
+ {"version":3,"file":"interquartilesList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/interquartilesList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAyFF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAcpD,CAAC"}
@@ -60,6 +60,9 @@ const getInterquartilesListQuestion = (ops) => {
60
60
  const identifiers = {
61
61
  sortedValues: values.sort((a, b) => a - b),
62
62
  };
63
+ return getQuestionFromIdentifiers(identifiers);
64
+ };
65
+ const getQuestionFromIdentifiers = (identifiers) => {
63
66
  const question = {
64
67
  answer: getAnswer(identifiers),
65
68
  instruction: getInstruction(identifiers),
@@ -82,9 +85,6 @@ export const interquartilesList = {
82
85
  getPropositions,
83
86
  isAnswerValid,
84
87
  subject: "Mathématiques",
85
- getInstruction,
86
- getHint,
87
- getCorrection,
88
- getAnswer,
88
+ getQuestionFromIdentifiers,
89
89
  hasHintAndCorrection: true,
90
90
  };
@@ -1 +1 @@
1
- {"version":3,"file":"interquartilesTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/interquartilesTable.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AA6FF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAkBrD,CAAC"}
1
+ {"version":3,"file":"interquartilesTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/interquartilesTable.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAmGF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAcrD,CAAC"}
@@ -65,6 +65,9 @@ const getInterquartilesTableQuestion = (ops) => {
65
65
  sortedValues: values.sort((a, b) => a - b),
66
66
  effectifs,
67
67
  };
68
+ return getQuestionFromIdentifiers(identifiers);
69
+ };
70
+ const getQuestionFromIdentifiers = (identifiers) => {
68
71
  const question = {
69
72
  answer: getAnswer(identifiers),
70
73
  instruction: getInstruction(identifiers),
@@ -90,9 +93,6 @@ export const interquartilesTable = {
90
93
  getPropositions,
91
94
  isAnswerValid,
92
95
  subject: "Mathématiques",
93
- getInstruction,
94
- getHint,
95
- getCorrection,
96
96
  hasHintAndCorrection: true,
97
- getAnswer,
97
+ getQuestionFromIdentifiers,
98
98
  };
@@ -1 +1 @@
1
- {"version":3,"file":"marginalAndConditionalFrequency.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,QAAQ,EAST,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAmLF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAejE,CAAC"}
1
+ {"version":3,"file":"marginalAndConditionalFrequency.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,QAAQ,EAWT,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AA8LF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAajE,CAAC"}
@@ -122,20 +122,26 @@ const getAnswerNode = (rand, x1, x2, x3, x4) => {
122
122
  }
123
123
  return answer;
124
124
  };
125
+ const getAnswer = (identifiers) => {
126
+ const { rand, x1, x2, x3, x4 } = identifiers;
127
+ const answerNode = getAnswerNode(rand, x1, x2, x3, x4);
128
+ const answer = answerNode.toTex();
129
+ return answer;
130
+ };
125
131
  const getMarginalAndConditionalFrequency = () => {
126
132
  const [x1, x2, x3, x4] = [1, 2, 3, 4].map((el) => randint(1, 100));
127
133
  const rand = randint(0, 12);
128
- const answerNode = getAnswerNode(rand, x1, x2, x3, x4);
129
- const answer = answerNode.toTex();
130
134
  const identifiers = { rand, x1, x2, x3, x4 };
131
- const { frequence } = getFreqStrings(rand);
135
+ return getQuestionFromIdentifiers(identifiers);
136
+ };
137
+ const getQuestionFromIdentifiers = (identifiers) => {
132
138
  const question = {
133
139
  instruction: getInstruction(identifiers),
134
- startStatement: `${frequence}`,
135
- answer,
140
+ startStatement: `${getFreqStrings(identifiers.rand).frequence}`,
141
+ answer: getAnswer(identifiers),
136
142
  keys: ["f", "cap", "underscore"],
137
143
  answerFormat: "tex",
138
- identifiers: { rand, x1, x2, x3, x4 },
144
+ identifiers,
139
145
  };
140
146
  return question;
141
147
  };
@@ -158,14 +164,12 @@ export const marginalAndConditionalFrequency = {
158
164
  id: "marginalAndConditionalFrequency",
159
165
  connector: "=",
160
166
  label: "Calculs de fréquences marginales et conditionnelles",
161
- levels: ["1reESM", "1reSpé", "1reTech", "TermTech", "1rePro", "TermPro"],
162
167
  isSingleStep: false,
163
- sections: ["Statistiques"],
164
168
  generator: (nb) => getDistinctQuestions(getMarginalAndConditionalFrequency, nb),
165
169
  qcmTimer: 60,
166
170
  freeTimer: 60,
167
171
  getPropositions,
168
172
  isAnswerValid,
169
173
  subject: "Mathématiques",
170
- getInstruction,
174
+ getQuestionFromIdentifiers,
171
175
  };
@@ -1 +1 @@
1
- {"version":3,"file":"median.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/median.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,QAAQ,EAST,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AAmFF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC"}
1
+ {"version":3,"file":"median.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/median.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,QAAQ,EAWT,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AA8FF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAYjD,CAAC"}
@@ -14,6 +14,20 @@ ${mdTable([
14
14
 
15
15
  Calculer la médiane de cette série de valeurs.`;
16
16
  };
17
+ const getAnswer = (identifiers) => {
18
+ const { randomEffectives, randomValues } = identifiers;
19
+ const n = randomEffectives.reduce((sum, value) => sum + value, 0);
20
+ const middleIndex = Math.floor(n / 2);
21
+ let median;
22
+ if (n % 2 === 0) {
23
+ median = (randomValues[middleIndex - 1] + randomValues[middleIndex]) / 2;
24
+ }
25
+ else {
26
+ median = randomValues[middleIndex];
27
+ }
28
+ const answer = (median + "").replace(".", ",");
29
+ return answer;
30
+ };
17
31
  const getMedianWithTable = () => {
18
32
  const getRandomUniqueValues = (count, min, max) => {
19
33
  const uniqueValues = new Set();
@@ -28,20 +42,13 @@ const getMedianWithTable = () => {
28
42
  for (let i = 0; i < randomEffectives.length; i++)
29
43
  for (let j = 0; j < randomEffectives[i]; j++)
30
44
  sortedValues.push(randomValues[i]);
31
- const n = randomEffectives.reduce((sum, value) => sum + value, 0);
32
- const middleIndex = Math.floor(n / 2);
33
- let median;
34
- if (n % 2 === 0) {
35
- median = (sortedValues[middleIndex - 1] + sortedValues[middleIndex]) / 2;
36
- }
37
- else {
38
- median = sortedValues[middleIndex];
39
- }
40
45
  const identifiers = { randomValues, randomEffectives };
41
- const answer = (median + "").replace(".", ",");
46
+ return getQuestionFromIdentifiers(identifiers);
47
+ };
48
+ const getQuestionFromIdentifiers = (identifiers) => {
42
49
  const question = {
43
50
  instruction: getInstruction(identifiers),
44
- answer,
51
+ answer: getAnswer(identifiers),
45
52
  keys: [],
46
53
  answerFormat: "tex",
47
54
  identifiers,
@@ -64,14 +71,12 @@ export const medianWithTable = {
64
71
  id: "medianWithTable",
65
72
  connector: "=",
66
73
  label: "Calcul de la médiane d'un tableau d'effectifs",
67
- levels: ["3ème", "2nde", "CAP", "2ndPro", "1rePro", "1reTech"],
68
74
  isSingleStep: false,
69
- sections: ["Statistiques"],
70
75
  generator: (nb) => getDistinctQuestions(getMedianWithTable, nb),
71
76
  qcmTimer: 60,
72
77
  freeTimer: 60,
73
78
  getPropositions,
74
79
  isAnswerValid,
75
80
  subject: "Mathématiques",
76
- getInstruction,
81
+ getQuestionFromIdentifiers,
77
82
  };
@@ -1 +1 @@
1
- {"version":3,"file":"medianList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/medianList.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAWT,MAAM,sBAAsB,CAAC;AAE9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAiEF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAehD,CAAC"}
1
+ {"version":3,"file":"medianList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/medianList.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAYT,MAAM,sBAAsB,CAAC;AAE9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAuEF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAehD,CAAC"}
@@ -31,6 +31,9 @@ const getMedianList = () => {
31
31
  randomValues.push(randint(1, 20));
32
32
  const sortedValues = randomValues.sort((a, b) => a - b);
33
33
  const identifiers = { sortedValues };
34
+ return getQuestionFromIdentifiers(identifiers);
35
+ };
36
+ const getQuestionFromIdentifiers = (identifiers) => {
34
37
  const question = {
35
38
  instruction: getInstruction(identifiers),
36
39
  answer: getAnswer(identifiers),
@@ -1 +1 @@
1
- {"version":3,"file":"quartiles.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/quartiles.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,QAAQ,EAST,MAAM,sBAAsB,CAAC;AAI9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAuFF,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,WAAW,CAc3C,CAAC"}
1
+ {"version":3,"file":"quartiles.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/quartiles.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,QAAQ,EAWT,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AA2FF,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,WAAW,CAY3C,CAAC"}
@@ -14,6 +14,16 @@ ${mdTable([
14
14
 
15
15
  Calculer le ${randomQuartile === 0 ? "premier" : "troisième"} quartile de cette série de valeurs.`;
16
16
  };
17
+ const getAnswer = (identifiers) => {
18
+ const { randomValues, randomEffectives, randomQuartile } = identifiers;
19
+ const n = randomEffectives.reduce((sum, value) => sum + value, 0);
20
+ const firstQuartileIndex = Math.round(n / 4 + 0.49);
21
+ const thirdQuartileIndex = Math.round((3 * n) / 4 + 0.49);
22
+ const firstQuartile = randomValues[firstQuartileIndex - 1];
23
+ const thirdQuartile = randomValues[thirdQuartileIndex - 1];
24
+ const answer = (randomQuartile === 0 ? firstQuartile : thirdQuartile) + "";
25
+ return answer;
26
+ };
17
27
  const getQuartiles = () => {
18
28
  const getRandomUniqueValues = (count, min, max) => {
19
29
  const uniqueValues = new Set();
@@ -28,20 +38,17 @@ const getQuartiles = () => {
28
38
  for (let i = 0; i < randomEffectives.length; i++)
29
39
  for (let j = 0; j < randomEffectives[i]; j++)
30
40
  sortedValues.push(randomValues[i]);
31
- const n = randomEffectives.reduce((sum, value) => sum + value, 0);
32
- const firstQuartileIndex = Math.round(n / 4 + 0.49);
33
- const thirdQuartileIndex = Math.round((3 * n) / 4 + 0.49);
34
- const firstQuartile = sortedValues[firstQuartileIndex - 1];
35
- const thirdQuartile = sortedValues[thirdQuartileIndex - 1];
36
41
  const randomQuartile = randint(0, 2);
37
- const answer = (randomQuartile === 0 ? firstQuartile : thirdQuartile) + "";
38
42
  const identifiers = { randomValues, randomEffectives, randomQuartile };
43
+ return getQuestionFromIdentifiers(identifiers);
44
+ };
45
+ const getQuestionFromIdentifiers = (identifiers) => {
39
46
  const question = {
40
47
  instruction: getInstruction(identifiers),
41
- answer,
48
+ answer: getAnswer(identifiers),
42
49
  keys: [],
43
50
  answerFormat: "tex",
44
- identifiers: { randomValues, randomEffectives, randomQuartile },
51
+ identifiers,
45
52
  style: { tableHasNoHeader: true },
46
53
  };
47
54
  return question;
@@ -61,14 +68,12 @@ export const quartiles = {
61
68
  id: "quartiles",
62
69
  connector: "=",
63
70
  label: "Calcul des quartiles d'un tableau d'effectifs",
64
- levels: ["3ème", "2nde", "CAP", "2ndPro", "1rePro", "1reTech"],
65
71
  isSingleStep: false,
66
- sections: ["Statistiques"],
67
72
  generator: (nb) => getDistinctQuestions(getQuartiles, nb),
68
73
  qcmTimer: 60,
69
74
  freeTimer: 60,
70
75
  getPropositions,
71
76
  isAnswerValid,
72
77
  subject: "Mathématiques",
73
- getInstruction,
78
+ getQuestionFromIdentifiers,
74
79
  };
@@ -1 +1 @@
1
- {"version":3,"file":"quartilesList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/quartilesList.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EAUT,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AA2EF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAc/C,CAAC"}
1
+ {"version":3,"file":"quartilesList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/quartilesList.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EAYT,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AA8EF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAY/C,CAAC"}
@@ -14,27 +14,33 @@ $$
14
14
 
15
15
  Calculer le ${quartileToString} de cette série de valeurs.`;
16
16
  };
17
- const getQuartiles = () => {
18
- let randomValues = [];
19
- const length = randint(5, 9);
20
- for (let i = 0; i < length; i++)
21
- randomValues.push(randint(1, 20));
22
- const sortedValues = randomValues.sort((a, b) => a - b);
17
+ const getAnswer = (identifiers) => {
18
+ const { randomValues, randomQuartile } = identifiers;
23
19
  const firstQuartileIndex = Math.round(randomValues.length / 4 + 0.49);
24
20
  const thirdQuartileIndex = Math.round((3 * randomValues.length) / 4 + 0.49);
25
- const firstQuartile = sortedValues[firstQuartileIndex - 1];
26
- const thirdQuartile = sortedValues[thirdQuartileIndex - 1];
27
- const randomQuartile = randint(0, 2);
21
+ const firstQuartile = randomValues[firstQuartileIndex - 1];
22
+ const thirdQuartile = randomValues[thirdQuartileIndex - 1];
28
23
  let choosenQuartile;
29
24
  if (randomQuartile === 0)
30
25
  choosenQuartile = firstQuartile;
31
26
  else
32
27
  choosenQuartile = thirdQuartile;
33
- const identifiers = { randomValues, randomQuartile };
34
28
  const answer = choosenQuartile + "";
29
+ return answer;
30
+ };
31
+ const getQuartiles = () => {
32
+ let randomValues = [];
33
+ const length = randint(5, 9);
34
+ for (let i = 0; i < length; i++)
35
+ randomValues.push(randint(1, 20));
36
+ const randomQuartile = randint(0, 2);
37
+ const identifiers = { randomValues, randomQuartile };
38
+ return getQuestionFromIdentifiers(identifiers);
39
+ };
40
+ const getQuestionFromIdentifiers = (identifiers) => {
35
41
  const question = {
36
42
  instruction: getInstruction(identifiers),
37
- answer,
43
+ answer: getAnswer(identifiers),
38
44
  keys: [],
39
45
  answerFormat: "tex",
40
46
  identifiers,
@@ -60,14 +66,12 @@ export const quartilesList = {
60
66
  id: "quartilesList",
61
67
  connector: "=",
62
68
  label: "Calcul des quartiles d'une liste de valeurs",
63
- levels: ["3ème", "2nde", "CAP", "2ndPro", "1rePro", "1reTech"],
64
69
  isSingleStep: false,
65
- sections: ["Statistiques"],
66
70
  generator: (nb) => getDistinctQuestions(getQuartiles, nb),
67
71
  qcmTimer: 60,
68
72
  freeTimer: 60,
69
73
  getPropositions,
70
74
  isAnswerValid,
71
75
  subject: "Mathématiques",
72
- getInstruction,
76
+ getQuestionFromIdentifiers,
73
77
  };
@@ -1 +1 @@
1
- {"version":3,"file":"standardDeviationList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/standardDeviationList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAwHF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAiBvD,CAAC"}
1
+ {"version":3,"file":"standardDeviationList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/standardDeviationList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA6HF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAcvD,CAAC"}
@@ -98,6 +98,9 @@ const getStandardDeviationListQuestion = (ops) => {
98
98
  const identifiers = {
99
99
  sortedValues: values.sort((a, b) => a - b),
100
100
  };
101
+ return getQuestionFromIdentifiers(identifiers);
102
+ };
103
+ const getQuestionFromIdentifiers = (identifiers) => {
101
104
  const question = {
102
105
  answer: getAnswer(identifiers),
103
106
  instruction: getInstruction(identifiers),
@@ -120,9 +123,6 @@ export const standardDeviationList = {
120
123
  getPropositions,
121
124
  isAnswerValid,
122
125
  subject: "Mathématiques",
123
- getInstruction,
124
- getHint,
125
- getCorrection,
126
- getAnswer,
126
+ getQuestionFromIdentifiers,
127
127
  hasHintAndCorrection: true,
128
128
  };
@@ -1 +1 @@
1
- {"version":3,"file":"standardDeviationTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/standardDeviationTable.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AA6IF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAiBxD,CAAC"}
1
+ {"version":3,"file":"standardDeviationTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/standardDeviationTable.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAkJF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
@@ -111,6 +111,9 @@ const getStandardDeviationTableQuestion = (ops) => {
111
111
  sortedValues: values.sort((a, b) => a - b),
112
112
  effectifs,
113
113
  };
114
+ return getQuestionFromIdentifiers(identifiers);
115
+ };
116
+ const getQuestionFromIdentifiers = (identifiers) => {
114
117
  const question = {
115
118
  answer: getAnswer(identifiers),
116
119
  instruction: getInstruction(identifiers),
@@ -136,9 +139,6 @@ export const standardDeviationTable = {
136
139
  getPropositions,
137
140
  isAnswerValid,
138
141
  subject: "Mathématiques",
139
- getInstruction,
140
- getHint,
141
- getCorrection,
142
- getAnswer,
142
+ getQuestionFromIdentifiers,
143
143
  hasHintAndCorrection: true,
144
144
  };
@@ -1 +1 @@
1
- {"version":3,"file":"varianceList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/varianceList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA6GF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAiB9C,CAAC"}
1
+ {"version":3,"file":"varianceList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/varianceList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAmHF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAc9C,CAAC"}