math-exercises 2.0.1 → 2.0.3

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 (1034) hide show
  1. package/lib/exercises/calcul/addAndSub.d.ts +6 -7
  2. package/lib/exercises/calcul/addAndSub.d.ts.map +1 -1
  3. package/lib/exercises/calcul/addAndSub.js +63 -57
  4. package/lib/exercises/calcul/addAndSubWithoutRelatives.d.ts +6 -7
  5. package/lib/exercises/calcul/addAndSubWithoutRelatives.d.ts.map +1 -1
  6. package/lib/exercises/calcul/addAndSubWithoutRelatives.js +73 -66
  7. package/lib/exercises/calcul/arithmetics/euclideanDivision.d.ts +9 -13
  8. package/lib/exercises/calcul/arithmetics/euclideanDivision.d.ts.map +1 -1
  9. package/lib/exercises/calcul/arithmetics/euclideanDivision.js +60 -61
  10. package/lib/exercises/calcul/arithmetics/index.d.ts +4 -0
  11. package/lib/exercises/calcul/arithmetics/index.d.ts.map +1 -0
  12. package/lib/exercises/calcul/arithmetics/index.js +19 -0
  13. package/lib/exercises/calcul/arithmetics/paritySumsAndProducts.d.ts +4 -6
  14. package/lib/exercises/calcul/arithmetics/paritySumsAndProducts.d.ts.map +1 -1
  15. package/lib/exercises/calcul/arithmetics/paritySumsAndProducts.js +115 -113
  16. package/lib/exercises/calcul/arithmetics/primeNumbers.d.ts +6 -10
  17. package/lib/exercises/calcul/arithmetics/primeNumbers.d.ts.map +1 -1
  18. package/lib/exercises/calcul/arithmetics/primeNumbers.js +105 -104
  19. package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.d.ts +8 -14
  20. package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
  21. package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.js +77 -73
  22. package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.d.ts +7 -12
  23. package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
  24. package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.js +68 -61
  25. package/lib/exercises/calcul/fractions/fractionAndIntegerSum.d.ts +7 -12
  26. package/lib/exercises/calcul/fractions/fractionAndIntegerSum.d.ts.map +1 -1
  27. package/lib/exercises/calcul/fractions/fractionAndIntegerSum.js +67 -62
  28. package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.d.ts +8 -10
  29. package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.d.ts.map +1 -1
  30. package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.js +157 -111
  31. package/lib/exercises/calcul/fractions/fractionsDivision.d.ts +7 -9
  32. package/lib/exercises/calcul/fractions/fractionsDivision.d.ts.map +1 -1
  33. package/lib/exercises/calcul/fractions/fractionsDivision.js +62 -53
  34. package/lib/exercises/calcul/fractions/fractionsProduct.d.ts +7 -9
  35. package/lib/exercises/calcul/fractions/fractionsProduct.d.ts.map +1 -1
  36. package/lib/exercises/calcul/fractions/fractionsProduct.js +60 -51
  37. package/lib/exercises/calcul/fractions/fractionsSum.d.ts +7 -9
  38. package/lib/exercises/calcul/fractions/fractionsSum.d.ts.map +1 -1
  39. package/lib/exercises/calcul/fractions/fractionsSum.js +60 -51
  40. package/lib/exercises/calcul/fractions/index.d.ts +9 -0
  41. package/lib/exercises/calcul/fractions/index.d.ts.map +1 -0
  42. package/lib/exercises/calcul/fractions/index.js +24 -0
  43. package/lib/exercises/calcul/fractions/simplifyFraction.d.ts +7 -7
  44. package/lib/exercises/calcul/fractions/simplifyFraction.d.ts.map +1 -1
  45. package/lib/exercises/calcul/fractions/simplifyFraction.js +52 -42
  46. package/lib/exercises/calcul/index.d.ts +9 -0
  47. package/lib/exercises/calcul/index.d.ts.map +1 -0
  48. package/lib/exercises/calcul/index.js +24 -0
  49. package/lib/exercises/calcul/mentalCaluls/index.d.ts +5 -0
  50. package/lib/exercises/calcul/mentalCaluls/index.d.ts.map +1 -0
  51. package/lib/exercises/calcul/mentalCaluls/index.js +20 -0
  52. package/lib/exercises/calcul/mentalCaluls/mentalAddAndSub.d.ts +7 -0
  53. package/lib/exercises/calcul/mentalCaluls/mentalAddAndSub.d.ts.map +1 -0
  54. package/lib/exercises/calcul/mentalCaluls/mentalAddAndSub.js +84 -0
  55. package/lib/exercises/calcul/mentalCaluls/mentalDivisions.d.ts +10 -0
  56. package/lib/exercises/calcul/mentalCaluls/mentalDivisions.d.ts.map +1 -0
  57. package/lib/exercises/calcul/mentalCaluls/mentalDivisions.js +101 -0
  58. package/lib/exercises/calcul/mentalCaluls/mentalMultiplications.d.ts +7 -0
  59. package/lib/exercises/calcul/mentalCaluls/mentalMultiplications.d.ts.map +1 -0
  60. package/lib/exercises/calcul/mentalCaluls/mentalMultiplications.js +84 -0
  61. package/lib/exercises/calcul/mentalCaluls/mentalPercentage.d.ts +9 -0
  62. package/lib/exercises/calcul/mentalCaluls/mentalPercentage.d.ts.map +1 -0
  63. package/lib/exercises/calcul/mentalCaluls/mentalPercentage.js +140 -0
  64. package/lib/exercises/calcul/operations/index.d.ts +3 -0
  65. package/lib/exercises/calcul/operations/index.d.ts.map +1 -0
  66. package/lib/exercises/calcul/operations/index.js +18 -0
  67. package/lib/exercises/calcul/operations/operationsPriorities.d.ts +17 -14
  68. package/lib/exercises/calcul/operations/operationsPriorities.d.ts.map +1 -1
  69. package/lib/exercises/calcul/operations/operationsPriorities.js +121 -113
  70. package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.d.ts +18 -14
  71. package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.d.ts.map +1 -1
  72. package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.js +202 -194
  73. package/lib/exercises/calcul/proportionality/index.d.ts +2 -0
  74. package/lib/exercises/calcul/proportionality/index.d.ts.map +1 -0
  75. package/lib/exercises/calcul/proportionality/index.js +17 -0
  76. package/lib/exercises/calcul/proportionality/proportionalityTable.d.ts +10 -7
  77. package/lib/exercises/calcul/proportionality/proportionalityTable.d.ts.map +1 -1
  78. package/lib/exercises/calcul/proportionality/proportionalityTable.js +65 -61
  79. package/lib/exercises/calcul/rounding/index.d.ts +2 -0
  80. package/lib/exercises/calcul/rounding/index.d.ts.map +1 -0
  81. package/lib/exercises/calcul/rounding/index.js +17 -0
  82. package/lib/exercises/calcul/rounding/rounding.d.ts +21 -23
  83. package/lib/exercises/calcul/rounding/rounding.d.ts.map +1 -1
  84. package/lib/exercises/calcul/rounding/rounding.js +141 -121
  85. package/lib/exercises/calculLitteral/distributivity/allIdentities.d.ts +10 -12
  86. package/lib/exercises/calculLitteral/distributivity/allIdentities.d.ts.map +1 -1
  87. package/lib/exercises/calculLitteral/distributivity/allIdentities.js +72 -52
  88. package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.d.ts +7 -9
  89. package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.d.ts.map +1 -1
  90. package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.js +74 -58
  91. package/lib/exercises/calculLitteral/distributivity/firstIdentity.d.ts +10 -11
  92. package/lib/exercises/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
  93. package/lib/exercises/calculLitteral/distributivity/firstIdentity.js +64 -56
  94. package/lib/exercises/calculLitteral/distributivity/index.d.ts +7 -0
  95. package/lib/exercises/calculLitteral/distributivity/index.d.ts.map +1 -0
  96. package/lib/exercises/calculLitteral/distributivity/index.js +26 -0
  97. package/lib/exercises/calculLitteral/distributivity/secondIdentity.d.ts +10 -11
  98. package/lib/exercises/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
  99. package/lib/exercises/calculLitteral/distributivity/secondIdentity.js +65 -57
  100. package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.d.ts +8 -10
  101. package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -1
  102. package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.js +61 -54
  103. package/lib/exercises/calculLitteral/distributivity/thirdIdentity.d.ts +10 -11
  104. package/lib/exercises/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
  105. package/lib/exercises/calculLitteral/distributivity/thirdIdentity.js +69 -57
  106. package/lib/exercises/calculLitteral/equation/equationSimpleSquare.d.ts +6 -9
  107. package/lib/exercises/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
  108. package/lib/exercises/calculLitteral/equation/equationSimpleSquare.js +140 -94
  109. package/lib/exercises/calculLitteral/equation/equationType1Exercise.d.ts +10 -12
  110. package/lib/exercises/calculLitteral/equation/equationType1Exercise.d.ts.map +1 -1
  111. package/lib/exercises/calculLitteral/equation/equationType1Exercise.js +60 -50
  112. package/lib/exercises/calculLitteral/equation/equationType2Exercise.d.ts +10 -12
  113. package/lib/exercises/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
  114. package/lib/exercises/calculLitteral/equation/equationType2Exercise.js +64 -51
  115. package/lib/exercises/calculLitteral/equation/equationType3Exercise.d.ts +11 -13
  116. package/lib/exercises/calculLitteral/equation/equationType3Exercise.d.ts.map +1 -1
  117. package/lib/exercises/calculLitteral/equation/equationType3Exercise.js +68 -56
  118. package/lib/exercises/calculLitteral/equation/equationType4Exercise.d.ts +12 -14
  119. package/lib/exercises/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -1
  120. package/lib/exercises/calculLitteral/equation/equationType4Exercise.js +75 -58
  121. package/lib/exercises/calculLitteral/equation/expEquation.d.ts +7 -7
  122. package/lib/exercises/calculLitteral/equation/expEquation.d.ts.map +1 -1
  123. package/lib/exercises/calculLitteral/equation/expEquation.js +75 -51
  124. package/lib/exercises/calculLitteral/equation/firstDegreeEquation.d.ts +7 -9
  125. package/lib/exercises/calculLitteral/equation/firstDegreeEquation.d.ts.map +1 -1
  126. package/lib/exercises/calculLitteral/equation/firstDegreeEquation.js +58 -45
  127. package/lib/exercises/calculLitteral/equation/fractionEquation.d.ts +9 -7
  128. package/lib/exercises/calculLitteral/equation/fractionEquation.d.ts.map +1 -1
  129. package/lib/exercises/calculLitteral/equation/fractionEquation.js +82 -58
  130. package/lib/exercises/calculLitteral/equation/index.d.ts +11 -0
  131. package/lib/exercises/calculLitteral/equation/index.d.ts.map +1 -0
  132. package/lib/exercises/calculLitteral/equation/index.js +26 -0
  133. package/lib/exercises/calculLitteral/equation/logEquation.d.ts +7 -7
  134. package/lib/exercises/calculLitteral/equation/logEquation.d.ts.map +1 -1
  135. package/lib/exercises/calculLitteral/equation/logEquation.js +74 -52
  136. package/lib/exercises/calculLitteral/equation/multiplicationEquation.d.ts +9 -7
  137. package/lib/exercises/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -1
  138. package/lib/exercises/calculLitteral/equation/multiplicationEquation.js +78 -65
  139. package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.d.ts +7 -9
  140. package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
  141. package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.js +58 -51
  142. package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.d.ts +7 -9
  143. package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
  144. package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.js +60 -53
  145. package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.d.ts +7 -9
  146. package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
  147. package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.js +66 -55
  148. package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.d.ts +10 -12
  149. package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
  150. package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.js +91 -58
  151. package/lib/exercises/calculLitteral/factorisation/index.d.ts +5 -0
  152. package/lib/exercises/calculLitteral/factorisation/index.d.ts.map +1 -0
  153. package/lib/exercises/calculLitteral/factorisation/index.js +20 -0
  154. package/lib/exercises/calculLitteral/index.d.ts +6 -0
  155. package/lib/exercises/calculLitteral/index.d.ts.map +1 -0
  156. package/lib/exercises/calculLitteral/index.js +21 -0
  157. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType0.d.ts +8 -10
  158. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType0.d.ts.map +1 -1
  159. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType0.js +68 -48
  160. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType1.d.ts +8 -10
  161. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType1.d.ts.map +1 -1
  162. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType1.js +80 -50
  163. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType2.d.ts +9 -10
  164. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType2.d.ts.map +1 -1
  165. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType2.js +83 -50
  166. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType3.d.ts +11 -10
  167. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType3.d.ts.map +1 -1
  168. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType3.js +92 -51
  169. package/lib/exercises/calculLitteral/inequations/index.d.ts +5 -0
  170. package/lib/exercises/calculLitteral/inequations/index.d.ts.map +1 -0
  171. package/lib/exercises/calculLitteral/inequations/index.js +20 -0
  172. package/lib/exercises/calculLitteral/simplifying/evaluateExpression.d.ts +9 -7
  173. package/lib/exercises/calculLitteral/simplifying/evaluateExpression.d.ts.map +1 -1
  174. package/lib/exercises/calculLitteral/simplifying/evaluateExpression.js +63 -48
  175. package/lib/exercises/calculLitteral/simplifying/expSimplifiying.d.ts +9 -8
  176. package/lib/exercises/calculLitteral/simplifying/expSimplifiying.d.ts.map +1 -1
  177. package/lib/exercises/calculLitteral/simplifying/expSimplifiying.js +116 -81
  178. package/lib/exercises/calculLitteral/simplifying/index.d.ts +5 -0
  179. package/lib/exercises/calculLitteral/simplifying/index.d.ts.map +1 -0
  180. package/lib/exercises/calculLitteral/simplifying/index.js +20 -0
  181. package/lib/exercises/calculLitteral/simplifying/logSimplifiying.d.ts +8 -8
  182. package/lib/exercises/calculLitteral/simplifying/logSimplifiying.d.ts.map +1 -1
  183. package/lib/exercises/calculLitteral/simplifying/logSimplifiying.js +77 -61
  184. package/lib/exercises/calculLitteral/simplifying/reduceExpression.d.ts +8 -9
  185. package/lib/exercises/calculLitteral/simplifying/reduceExpression.d.ts.map +1 -1
  186. package/lib/exercises/calculLitteral/simplifying/reduceExpression.js +114 -107
  187. package/lib/exercises/combinatory/anagrams.d.ts +6 -8
  188. package/lib/exercises/combinatory/anagrams.d.ts.map +1 -1
  189. package/lib/exercises/combinatory/anagrams.js +161 -157
  190. package/lib/exercises/combinatory/ballsCounting.d.ts +9 -11
  191. package/lib/exercises/combinatory/ballsCounting.d.ts.map +1 -1
  192. package/lib/exercises/combinatory/ballsCounting.js +110 -103
  193. package/lib/exercises/combinatory/diceCounting.d.ts +6 -8
  194. package/lib/exercises/combinatory/diceCounting.d.ts.map +1 -1
  195. package/lib/exercises/combinatory/diceCounting.js +122 -118
  196. package/lib/exercises/combinatory/index.d.ts +4 -0
  197. package/lib/exercises/combinatory/index.d.ts.map +1 -0
  198. package/lib/exercises/combinatory/index.js +19 -0
  199. package/lib/exercises/complex/addComplex.d.ts +9 -11
  200. package/lib/exercises/complex/addComplex.d.ts.map +1 -1
  201. package/lib/exercises/complex/addComplex.js +64 -51
  202. package/lib/exercises/complex/argumentFromAlgebraicComplex.d.ts +0 -9
  203. package/lib/exercises/complex/argumentFromAlgebraicComplex.d.ts.map +1 -1
  204. package/lib/exercises/complex/argumentFromAlgebraicComplex.js +52 -37
  205. package/lib/exercises/complex/conjugateComplex.ts.d.ts +7 -9
  206. package/lib/exercises/complex/conjugateComplex.ts.d.ts.map +1 -1
  207. package/lib/exercises/complex/conjugateComplex.ts.js +54 -46
  208. package/lib/exercises/complex/conjugateDivideComplex.d.ts +7 -7
  209. package/lib/exercises/complex/conjugateDivideComplex.d.ts.map +1 -1
  210. package/lib/exercises/complex/conjugateDivideComplex.js +61 -49
  211. package/lib/exercises/complex/conjugateMultiplyComplex.d.ts +7 -9
  212. package/lib/exercises/complex/conjugateMultiplyComplex.d.ts.map +1 -1
  213. package/lib/exercises/complex/conjugateMultiplyComplex.js +61 -51
  214. package/lib/exercises/complex/divideComplex.d.ts +7 -7
  215. package/lib/exercises/complex/divideComplex.d.ts.map +1 -1
  216. package/lib/exercises/complex/divideComplex.js +58 -45
  217. package/lib/exercises/complex/index.d.ts +11 -0
  218. package/lib/exercises/complex/index.d.ts.map +1 -0
  219. package/lib/exercises/complex/index.js +27 -0
  220. package/lib/exercises/complex/inverseComplex.d.ts +7 -9
  221. package/lib/exercises/complex/inverseComplex.d.ts.map +1 -1
  222. package/lib/exercises/complex/inverseComplex.js +54 -46
  223. package/lib/exercises/complex/linearCombinaisonComplex.d.ts +9 -7
  224. package/lib/exercises/complex/linearCombinaisonComplex.d.ts.map +1 -1
  225. package/lib/exercises/complex/linearCombinaisonComplex.js +59 -51
  226. package/lib/exercises/complex/moduloFromAlgebraicComplex.d.ts +7 -9
  227. package/lib/exercises/complex/moduloFromAlgebraicComplex.d.ts.map +1 -1
  228. package/lib/exercises/complex/moduloFromAlgebraicComplex.js +55 -43
  229. package/lib/exercises/complex/mutiplyComplex.d.ts +7 -9
  230. package/lib/exercises/complex/mutiplyComplex.d.ts.map +1 -1
  231. package/lib/exercises/complex/mutiplyComplex.js +58 -47
  232. package/lib/exercises/complex/reAndIm.d.ts +8 -10
  233. package/lib/exercises/complex/reAndIm.d.ts.map +1 -1
  234. package/lib/exercises/complex/reAndIm.js +50 -46
  235. package/lib/exercises/conversion/aeraConversion.d.ts +8 -10
  236. package/lib/exercises/conversion/aeraConversion.d.ts.map +1 -1
  237. package/lib/exercises/conversion/aeraConversion.js +60 -47
  238. package/lib/exercises/conversion/capacityConversion.d.ts +8 -10
  239. package/lib/exercises/conversion/capacityConversion.d.ts.map +1 -1
  240. package/lib/exercises/conversion/capacityConversion.js +58 -45
  241. package/lib/exercises/conversion/index.d.ts +7 -0
  242. package/lib/exercises/conversion/index.d.ts.map +1 -0
  243. package/lib/exercises/conversion/index.js +22 -0
  244. package/lib/exercises/conversion/lengthConversion.d.ts +8 -10
  245. package/lib/exercises/conversion/lengthConversion.d.ts.map +1 -1
  246. package/lib/exercises/conversion/lengthConversion.js +58 -45
  247. package/lib/exercises/conversion/massConversion.d.ts +8 -10
  248. package/lib/exercises/conversion/massConversion.d.ts.map +1 -1
  249. package/lib/exercises/conversion/massConversion.js +58 -45
  250. package/lib/exercises/conversion/volumeCapacityConversion.d.ts +9 -7
  251. package/lib/exercises/conversion/volumeCapacityConversion.d.ts.map +1 -1
  252. package/lib/exercises/conversion/volumeCapacityConversion.js +74 -62
  253. package/lib/exercises/conversion/volumeConversion.d.ts +8 -10
  254. package/lib/exercises/conversion/volumeConversion.d.ts.map +1 -1
  255. package/lib/exercises/conversion/volumeConversion.js +60 -47
  256. package/lib/exercises/derivation/derivative/constanteDerivative.d.ts +9 -10
  257. package/lib/exercises/derivation/derivative/constanteDerivative.d.ts.map +1 -1
  258. package/lib/exercises/derivation/derivative/constanteDerivative.js +54 -49
  259. package/lib/exercises/derivation/derivative/expDerivativeOne.d.ts +7 -9
  260. package/lib/exercises/derivation/derivative/expDerivativeOne.d.ts.map +1 -1
  261. package/lib/exercises/derivation/derivative/expDerivativeOne.js +62 -54
  262. package/lib/exercises/derivation/derivative/expDerivativeThree.d.ts +7 -9
  263. package/lib/exercises/derivation/derivative/expDerivativeThree.d.ts.map +1 -1
  264. package/lib/exercises/derivation/derivative/expDerivativeThree.js +55 -49
  265. package/lib/exercises/derivation/derivative/expDerivativeTwo.d.ts +7 -9
  266. package/lib/exercises/derivation/derivative/expDerivativeTwo.d.ts.map +1 -1
  267. package/lib/exercises/derivation/derivative/expDerivativeTwo.js +57 -52
  268. package/lib/exercises/derivation/derivative/firstDegreeDerivative.d.ts +10 -11
  269. package/lib/exercises/derivation/derivative/firstDegreeDerivative.d.ts.map +1 -1
  270. package/lib/exercises/derivation/derivative/firstDegreeDerivative.js +52 -47
  271. package/lib/exercises/derivation/derivative/index.d.ts +18 -0
  272. package/lib/exercises/derivation/derivative/index.d.ts.map +1 -0
  273. package/lib/exercises/derivation/derivative/index.js +38 -0
  274. package/lib/exercises/derivation/derivative/inverseFunctionDerivative.d.ts +6 -8
  275. package/lib/exercises/derivation/derivative/inverseFunctionDerivative.d.ts.map +1 -1
  276. package/lib/exercises/derivation/derivative/inverseFunctionDerivative.js +55 -44
  277. package/lib/exercises/derivation/derivative/lnDerivativeOne.d.ts +7 -9
  278. package/lib/exercises/derivation/derivative/lnDerivativeOne.d.ts.map +1 -1
  279. package/lib/exercises/derivation/derivative/lnDerivativeOne.js +68 -55
  280. package/lib/exercises/derivation/derivative/lnDerivativeThree.d.ts +7 -9
  281. package/lib/exercises/derivation/derivative/lnDerivativeThree.d.ts.map +1 -1
  282. package/lib/exercises/derivation/derivative/lnDerivativeThree.js +83 -61
  283. package/lib/exercises/derivation/derivative/lnDerivativeTwo.d.ts +7 -9
  284. package/lib/exercises/derivation/derivative/lnDerivativeTwo.d.ts.map +1 -1
  285. package/lib/exercises/derivation/derivative/lnDerivativeTwo.js +60 -55
  286. package/lib/exercises/derivation/derivative/powerFunctionDerivative.d.ts +7 -9
  287. package/lib/exercises/derivation/derivative/powerFunctionDerivative.d.ts.map +1 -1
  288. package/lib/exercises/derivation/derivative/powerFunctionDerivative.js +71 -51
  289. package/lib/exercises/derivation/derivative/productDerivative.d.ts +7 -9
  290. package/lib/exercises/derivation/derivative/productDerivative.d.ts.map +1 -1
  291. package/lib/exercises/derivation/derivative/productDerivative.js +59 -45
  292. package/lib/exercises/derivation/derivative/quotientDerivative.d.ts +7 -10
  293. package/lib/exercises/derivation/derivative/quotientDerivative.d.ts.map +1 -1
  294. package/lib/exercises/derivation/derivative/quotientDerivative.js +84 -48
  295. package/lib/exercises/derivation/derivative/rootFunctionDerivative.d.ts +6 -8
  296. package/lib/exercises/derivation/derivative/rootFunctionDerivative.d.ts.map +1 -1
  297. package/lib/exercises/derivation/derivative/rootFunctionDerivative.js +78 -62
  298. package/lib/exercises/derivation/derivative/secondDegreeDerivative.d.ts +9 -10
  299. package/lib/exercises/derivation/derivative/secondDegreeDerivative.d.ts.map +1 -1
  300. package/lib/exercises/derivation/derivative/secondDegreeDerivative.js +74 -55
  301. package/lib/exercises/derivation/derivative/thirdDegreeDerivative.d.ts +9 -10
  302. package/lib/exercises/derivation/derivative/thirdDegreeDerivative.d.ts.map +1 -1
  303. package/lib/exercises/derivation/derivative/thirdDegreeDerivative.js +81 -56
  304. package/lib/exercises/derivation/derivative/thirdDegreeFunctionVariation.d.ts +9 -9
  305. package/lib/exercises/derivation/derivative/thirdDegreeFunctionVariation.d.ts.map +1 -1
  306. package/lib/exercises/derivation/derivative/thirdDegreeFunctionVariation.js +99 -66
  307. package/lib/exercises/derivation/derivative/usualderivative.d.ts +10 -12
  308. package/lib/exercises/derivation/derivative/usualderivative.d.ts.map +1 -1
  309. package/lib/exercises/derivation/derivative/usualderivative.js +108 -67
  310. package/lib/exercises/derivation/derivativeNumberCalcul.d.ts +7 -7
  311. package/lib/exercises/derivation/derivativeNumberCalcul.d.ts.map +1 -1
  312. package/lib/exercises/derivation/derivativeNumberCalcul.js +48 -42
  313. package/lib/exercises/derivation/derivativeNumberReading.d.ts +7 -9
  314. package/lib/exercises/derivation/derivativeNumberReading.d.ts.map +1 -1
  315. package/lib/exercises/derivation/derivativeNumberReading.js +85 -75
  316. package/lib/exercises/derivation/index.d.ts +4 -0
  317. package/lib/exercises/derivation/index.d.ts.map +1 -0
  318. package/lib/exercises/derivation/index.js +19 -0
  319. package/lib/exercises/equaDiff/equaDiffGeneralForme.d.ts +6 -7
  320. package/lib/exercises/equaDiff/equaDiffGeneralForme.d.ts.map +1 -1
  321. package/lib/exercises/equaDiff/equaDiffGeneralForme.js +58 -51
  322. package/lib/exercises/equaDiff/equaDiffGeneralFormeWithIC.d.ts +7 -7
  323. package/lib/exercises/equaDiff/equaDiffGeneralFormeWithIC.d.ts.map +1 -1
  324. package/lib/exercises/equaDiff/equaDiffGeneralFormeWithIC.js +68 -65
  325. package/lib/exercises/equaDiff/index.d.ts +3 -0
  326. package/lib/exercises/equaDiff/index.d.ts.map +1 -0
  327. package/lib/exercises/equaDiff/index.js +18 -0
  328. package/lib/exercises/exercise.d.ts +50 -45
  329. package/lib/exercises/exercise.d.ts.map +1 -1
  330. package/lib/exercises/exercise.js +38 -38
  331. package/lib/exercises/functions/absolute/absoluteValueEquations.d.ts +7 -9
  332. package/lib/exercises/functions/absolute/absoluteValueEquations.d.ts.map +1 -1
  333. package/lib/exercises/functions/absolute/absoluteValueEquations.js +74 -56
  334. package/lib/exercises/functions/absolute/absoluteValueInequations.d.ts +8 -9
  335. package/lib/exercises/functions/absolute/absoluteValueInequations.d.ts.map +1 -1
  336. package/lib/exercises/functions/absolute/absoluteValueInequations.js +69 -47
  337. package/lib/exercises/functions/absolute/index.d.ts +3 -0
  338. package/lib/exercises/functions/absolute/index.d.ts.map +1 -0
  339. package/lib/exercises/functions/absolute/index.js +18 -0
  340. package/lib/exercises/functions/affines/index.d.ts +5 -0
  341. package/lib/exercises/functions/affines/index.d.ts.map +1 -0
  342. package/lib/exercises/functions/affines/index.js +20 -0
  343. package/lib/exercises/functions/affines/leadingCoefficient.d.ts +9 -11
  344. package/lib/exercises/functions/affines/leadingCoefficient.d.ts.map +1 -1
  345. package/lib/exercises/functions/affines/leadingCoefficient.js +83 -84
  346. package/lib/exercises/functions/affines/leadingCoefficientCalculV1.d.ts +9 -11
  347. package/lib/exercises/functions/affines/leadingCoefficientCalculV1.d.ts.map +1 -1
  348. package/lib/exercises/functions/affines/leadingCoefficientCalculV1.js +55 -47
  349. package/lib/exercises/functions/affines/leadingCoefficientCalculV2.d.ts +9 -11
  350. package/lib/exercises/functions/affines/leadingCoefficientCalculV2.d.ts.map +1 -1
  351. package/lib/exercises/functions/affines/leadingCoefficientCalculV2.js +54 -46
  352. package/lib/exercises/functions/affines/signFunction.d.ts +8 -7
  353. package/lib/exercises/functions/affines/signFunction.d.ts.map +1 -1
  354. package/lib/exercises/functions/affines/signFunction.js +83 -68
  355. package/lib/exercises/functions/basics/imageFunction.d.ts +9 -7
  356. package/lib/exercises/functions/basics/imageFunction.d.ts.map +1 -1
  357. package/lib/exercises/functions/basics/imageFunction.js +64 -49
  358. package/lib/exercises/functions/basics/imageFunctionGeogebra.d.ts +9 -7
  359. package/lib/exercises/functions/basics/imageFunctionGeogebra.d.ts.map +1 -1
  360. package/lib/exercises/functions/basics/imageFunctionGeogebra.js +91 -74
  361. package/lib/exercises/functions/basics/index.d.ts +5 -0
  362. package/lib/exercises/functions/basics/index.d.ts.map +1 -0
  363. package/lib/exercises/functions/basics/index.js +20 -0
  364. package/lib/exercises/functions/basics/inverseImageFunction.d.ts +7 -7
  365. package/lib/exercises/functions/basics/inverseImageFunction.d.ts.map +1 -1
  366. package/lib/exercises/functions/basics/inverseImageFunction.js +52 -48
  367. package/lib/exercises/functions/basics/inverseImageFunctionGeogebra.d.ts +10 -10
  368. package/lib/exercises/functions/basics/inverseImageFunctionGeogebra.d.ts.map +1 -1
  369. package/lib/exercises/functions/basics/inverseImageFunctionGeogebra.js +188 -145
  370. package/lib/exercises/functions/cube/cubicEquation.d.ts +6 -8
  371. package/lib/exercises/functions/cube/cubicEquation.d.ts.map +1 -1
  372. package/lib/exercises/functions/cube/cubicEquation.js +55 -43
  373. package/lib/exercises/functions/cube/index.d.ts +2 -0
  374. package/lib/exercises/functions/cube/index.d.ts.map +1 -0
  375. package/lib/exercises/functions/cube/index.js +17 -0
  376. package/lib/exercises/functions/index.d.ts +7 -0
  377. package/lib/exercises/functions/index.d.ts.map +1 -0
  378. package/lib/exercises/functions/index.js +22 -0
  379. package/lib/exercises/functions/rationalFraction/index.d.ts +2 -0
  380. package/lib/exercises/functions/rationalFraction/index.d.ts.map +1 -0
  381. package/lib/exercises/functions/rationalFraction/index.js +17 -0
  382. package/lib/exercises/functions/rationalFraction/rationalFractionForbiddenValue.d.ts +9 -11
  383. package/lib/exercises/functions/rationalFraction/rationalFractionForbiddenValue.d.ts.map +1 -1
  384. package/lib/exercises/functions/rationalFraction/rationalFractionForbiddenValue.js +64 -56
  385. package/lib/exercises/functions/trinoms/alphaBetaFromDevForm.d.ts +7 -7
  386. package/lib/exercises/functions/trinoms/alphaBetaFromDevForm.d.ts.map +1 -1
  387. package/lib/exercises/functions/trinoms/alphaBetaFromDevForm.js +51 -45
  388. package/lib/exercises/functions/trinoms/alphaBetaInCanonicalForm.d.ts +9 -11
  389. package/lib/exercises/functions/trinoms/alphaBetaInCanonicalForm.d.ts.map +1 -1
  390. package/lib/exercises/functions/trinoms/alphaBetaInCanonicalForm.js +66 -58
  391. package/lib/exercises/functions/trinoms/canonicalFromDevForm.d.ts +8 -8
  392. package/lib/exercises/functions/trinoms/canonicalFromDevForm.d.ts.map +1 -1
  393. package/lib/exercises/functions/trinoms/canonicalFromDevForm.js +52 -43
  394. package/lib/exercises/functions/trinoms/deltaTrinom.d.ts +8 -10
  395. package/lib/exercises/functions/trinoms/deltaTrinom.d.ts.map +1 -1
  396. package/lib/exercises/functions/trinoms/deltaTrinom.js +52 -45
  397. package/lib/exercises/functions/trinoms/extremumFromCanonicalForm.d.ts +8 -10
  398. package/lib/exercises/functions/trinoms/extremumFromCanonicalForm.d.ts.map +1 -1
  399. package/lib/exercises/functions/trinoms/extremumFromCanonicalForm.js +57 -48
  400. package/lib/exercises/functions/trinoms/extremumTypeFromAlgebricForm.d.ts +8 -8
  401. package/lib/exercises/functions/trinoms/extremumTypeFromAlgebricForm.d.ts.map +1 -1
  402. package/lib/exercises/functions/trinoms/extremumTypeFromAlgebricForm.js +43 -41
  403. package/lib/exercises/functions/trinoms/index.d.ts +11 -0
  404. package/lib/exercises/functions/trinoms/index.d.ts.map +1 -0
  405. package/lib/exercises/functions/trinoms/index.js +26 -0
  406. package/lib/exercises/functions/trinoms/niceRootsFromDevForm.d.ts +8 -7
  407. package/lib/exercises/functions/trinoms/niceRootsFromDevForm.d.ts.map +1 -1
  408. package/lib/exercises/functions/trinoms/niceRootsFromDevForm.js +56 -44
  409. package/lib/exercises/functions/trinoms/rootsFromDevForm.d.ts +8 -7
  410. package/lib/exercises/functions/trinoms/rootsFromDevForm.d.ts.map +1 -1
  411. package/lib/exercises/functions/trinoms/rootsFromDevForm.js +56 -44
  412. package/lib/exercises/functions/trinoms/rootsFromFactorizedForm.d.ts +8 -10
  413. package/lib/exercises/functions/trinoms/rootsFromFactorizedForm.d.ts.map +1 -1
  414. package/lib/exercises/functions/trinoms/rootsFromFactorizedForm.js +70 -57
  415. package/lib/exercises/functions/trinoms/variationsFromAlgebricForm.d.ts +8 -8
  416. package/lib/exercises/functions/trinoms/variationsFromAlgebricForm.d.ts.map +1 -1
  417. package/lib/exercises/functions/trinoms/variationsFromAlgebricForm.js +44 -40
  418. package/lib/exercises/geometry/areas/circleArea.d.ts +9 -0
  419. package/lib/exercises/geometry/areas/circleArea.d.ts.map +1 -0
  420. package/lib/exercises/geometry/areas/circleArea.js +52 -0
  421. package/lib/exercises/geometry/areas/index.d.ts +7 -0
  422. package/lib/exercises/geometry/areas/index.d.ts.map +1 -0
  423. package/lib/exercises/geometry/areas/index.js +22 -0
  424. package/lib/exercises/geometry/areas/rectangleArea.d.ts +8 -0
  425. package/lib/exercises/geometry/areas/rectangleArea.d.ts.map +1 -0
  426. package/lib/exercises/geometry/areas/rectangleArea.js +46 -0
  427. package/lib/exercises/geometry/areas/rightTriangleArea.d.ts +7 -0
  428. package/lib/exercises/geometry/areas/rightTriangleArea.d.ts.map +1 -0
  429. package/lib/exercises/geometry/areas/rightTriangleArea.js +75 -0
  430. package/lib/exercises/geometry/areas/squareArea.d.ts +7 -0
  431. package/lib/exercises/geometry/areas/squareArea.d.ts.map +1 -0
  432. package/lib/exercises/geometry/areas/squareArea.js +46 -0
  433. package/lib/exercises/geometry/areas/triangleArea.d.ts +5 -0
  434. package/lib/exercises/geometry/areas/triangleArea.d.ts.map +1 -0
  435. package/lib/exercises/geometry/areas/triangleArea.js +97 -0
  436. package/lib/exercises/geometry/areas/triangleAreaV2.d.ts +7 -0
  437. package/lib/exercises/geometry/areas/triangleAreaV2.d.ts.map +1 -0
  438. package/lib/exercises/geometry/areas/triangleAreaV2.js +71 -0
  439. package/lib/exercises/geometry/cartesian/distanceBetweenTwoPoints.d.ts +7 -9
  440. package/lib/exercises/geometry/cartesian/distanceBetweenTwoPoints.d.ts.map +1 -1
  441. package/lib/exercises/geometry/cartesian/distanceBetweenTwoPoints.js +95 -65
  442. package/lib/exercises/geometry/cartesian/index.d.ts +3 -0
  443. package/lib/exercises/geometry/cartesian/index.d.ts.map +1 -0
  444. package/lib/exercises/geometry/cartesian/index.js +18 -0
  445. package/lib/exercises/geometry/cartesian/midpoint.d.ts +7 -7
  446. package/lib/exercises/geometry/cartesian/midpoint.d.ts.map +1 -1
  447. package/lib/exercises/geometry/cartesian/midpoint.js +63 -48
  448. package/lib/exercises/geometry/index.d.ts +7 -0
  449. package/lib/exercises/geometry/index.d.ts.map +1 -0
  450. package/lib/exercises/geometry/index.js +22 -0
  451. package/lib/exercises/geometry/perimeters/circleCircumference.d.ts +9 -0
  452. package/lib/exercises/geometry/perimeters/circleCircumference.d.ts.map +1 -0
  453. package/lib/exercises/geometry/perimeters/circleCircumference.js +52 -0
  454. package/lib/exercises/geometry/perimeters/index.d.ts +5 -0
  455. package/lib/exercises/geometry/perimeters/index.d.ts.map +1 -0
  456. package/lib/exercises/geometry/perimeters/index.js +20 -0
  457. package/lib/exercises/geometry/perimeters/rectanglePerimeter.d.ts +8 -0
  458. package/lib/exercises/geometry/perimeters/rectanglePerimeter.d.ts.map +1 -0
  459. package/lib/exercises/geometry/perimeters/rectanglePerimeter.js +46 -0
  460. package/lib/exercises/geometry/perimeters/squarePerimeter.d.ts +7 -0
  461. package/lib/exercises/geometry/perimeters/squarePerimeter.d.ts.map +1 -0
  462. package/lib/exercises/geometry/perimeters/squarePerimeter.js +46 -0
  463. package/lib/exercises/geometry/perimeters/trianglePerimeter.d.ts +7 -0
  464. package/lib/exercises/geometry/perimeters/trianglePerimeter.d.ts.map +1 -0
  465. package/lib/exercises/geometry/perimeters/trianglePerimeter.js +46 -0
  466. package/lib/exercises/geometry/pythagore/index.d.ts +3 -0
  467. package/lib/exercises/geometry/pythagore/index.d.ts.map +1 -0
  468. package/lib/exercises/geometry/pythagore/index.js +18 -0
  469. package/lib/exercises/geometry/pythagore/pythagore.d.ts +9 -0
  470. package/lib/exercises/geometry/pythagore/pythagore.d.ts.map +1 -0
  471. package/lib/exercises/geometry/pythagore/pythagore.js +65 -0
  472. package/lib/exercises/geometry/pythagore/pythagoreCalcul.d.ts +8 -0
  473. package/lib/exercises/geometry/pythagore/pythagoreCalcul.d.ts.map +1 -0
  474. package/lib/exercises/geometry/pythagore/pythagoreCalcul.js +102 -0
  475. package/lib/exercises/geometry/thales/index.d.ts +3 -0
  476. package/lib/exercises/geometry/thales/index.d.ts.map +1 -0
  477. package/lib/exercises/geometry/thales/index.js +18 -0
  478. package/lib/exercises/geometry/thales/thales.d.ts +7 -0
  479. package/lib/exercises/geometry/thales/thales.d.ts.map +1 -0
  480. package/lib/exercises/geometry/thales/thales.js +130 -0
  481. package/lib/exercises/geometry/thales/thalesCalcul.d.ts +10 -0
  482. package/lib/exercises/geometry/thales/thalesCalcul.d.ts.map +1 -0
  483. package/lib/exercises/geometry/thales/thalesCalcul.js +145 -0
  484. package/lib/exercises/geometry/vectors/chasles.d.ts +7 -8
  485. package/lib/exercises/geometry/vectors/chasles.d.ts.map +1 -1
  486. package/lib/exercises/geometry/vectors/chasles.js +63 -56
  487. package/lib/exercises/geometry/vectors/coordinatesReading.d.ts +9 -11
  488. package/lib/exercises/geometry/vectors/coordinatesReading.d.ts.map +1 -1
  489. package/lib/exercises/geometry/vectors/coordinatesReading.js +66 -62
  490. package/lib/exercises/geometry/vectors/determinant.d.ts +7 -9
  491. package/lib/exercises/geometry/vectors/determinant.d.ts.map +1 -1
  492. package/lib/exercises/geometry/vectors/determinant.js +54 -47
  493. package/lib/exercises/geometry/vectors/index.d.ts +6 -0
  494. package/lib/exercises/geometry/vectors/index.d.ts.map +1 -0
  495. package/lib/exercises/geometry/vectors/index.js +21 -0
  496. package/lib/exercises/geometry/vectors/scalarProductViaCoords.d.ts +7 -7
  497. package/lib/exercises/geometry/vectors/scalarProductViaCoords.d.ts.map +1 -1
  498. package/lib/exercises/geometry/vectors/scalarProductViaCoords.js +52 -45
  499. package/lib/exercises/geometry/vectors/vectorCoordinatesFromTwoPoints.d.ts +7 -9
  500. package/lib/exercises/geometry/vectors/vectorCoordinatesFromTwoPoints.d.ts.map +1 -1
  501. package/lib/exercises/geometry/vectors/vectorCoordinatesFromTwoPoints.js +52 -48
  502. package/lib/exercises/index.d.ts +19 -0
  503. package/lib/exercises/index.d.ts.map +1 -0
  504. package/lib/exercises/index.js +34 -0
  505. package/lib/exercises/limits/index.d.ts +10 -0
  506. package/lib/exercises/limits/index.d.ts.map +1 -0
  507. package/lib/exercises/limits/index.js +25 -0
  508. package/lib/exercises/limits/polynomLimit.d.ts +7 -8
  509. package/lib/exercises/limits/polynomLimit.d.ts.map +1 -1
  510. package/lib/exercises/limits/polynomLimit.js +53 -47
  511. package/lib/exercises/limits/polynomLimitNoFI.d.ts +7 -8
  512. package/lib/exercises/limits/polynomLimitNoFI.d.ts.map +1 -1
  513. package/lib/exercises/limits/polynomLimitNoFI.js +53 -47
  514. package/lib/exercises/limits/rationalFracForbiddenValueLimit.d.ts +8 -8
  515. package/lib/exercises/limits/rationalFracForbiddenValueLimit.d.ts.map +1 -1
  516. package/lib/exercises/limits/rationalFracForbiddenValueLimit.js +73 -61
  517. package/lib/exercises/limits/rationalFracLimit.d.ts +8 -8
  518. package/lib/exercises/limits/rationalFracLimit.d.ts.map +1 -1
  519. package/lib/exercises/limits/rationalFracLimit.js +101 -64
  520. package/lib/exercises/limits/sequenceGeometricLimit.d.ts +7 -9
  521. package/lib/exercises/limits/sequenceGeometricLimit.d.ts.map +1 -1
  522. package/lib/exercises/limits/sequenceGeometricLimit.js +51 -43
  523. package/lib/exercises/limits/sequencePolynomLimit.d.ts +6 -8
  524. package/lib/exercises/limits/sequencePolynomLimit.d.ts.map +1 -1
  525. package/lib/exercises/limits/sequencePolynomLimit.js +52 -46
  526. package/lib/exercises/limits/sequencePolynomNoFILimit.d.ts +6 -8
  527. package/lib/exercises/limits/sequencePolynomNoFILimit.d.ts.map +1 -1
  528. package/lib/exercises/limits/sequencePolynomNoFILimit.js +52 -46
  529. package/lib/exercises/limits/sequencePolynomProductLimit.d.ts +7 -8
  530. package/lib/exercises/limits/sequencePolynomProductLimit.d.ts.map +1 -1
  531. package/lib/exercises/limits/sequencePolynomProductLimit.js +70 -54
  532. package/lib/exercises/limits/sequenceRationalFracLimit.d.ts +7 -8
  533. package/lib/exercises/limits/sequenceRationalFracLimit.d.ts.map +1 -1
  534. package/lib/exercises/limits/sequenceRationalFracLimit.js +100 -63
  535. package/lib/exercises/percent/applyPercent.d.ts +8 -7
  536. package/lib/exercises/percent/applyPercent.d.ts.map +1 -1
  537. package/lib/exercises/percent/applyPercent.js +78 -60
  538. package/lib/exercises/percent/averageEvolutionRate.d.ts +7 -7
  539. package/lib/exercises/percent/averageEvolutionRate.d.ts.map +1 -1
  540. package/lib/exercises/percent/averageEvolutionRate.js +54 -48
  541. package/lib/exercises/percent/evolutionToCM.d.ts +7 -9
  542. package/lib/exercises/percent/evolutionToCM.d.ts.map +1 -1
  543. package/lib/exercises/percent/evolutionToCM.js +64 -55
  544. package/lib/exercises/percent/globalPercent.d.ts +6 -7
  545. package/lib/exercises/percent/globalPercent.d.ts.map +1 -1
  546. package/lib/exercises/percent/globalPercent.js +71 -61
  547. package/lib/exercises/percent/index.d.ts +6 -0
  548. package/lib/exercises/percent/index.d.ts.map +1 -0
  549. package/lib/exercises/percent/index.js +21 -0
  550. package/lib/exercises/percent/reciprocalPercentage.d.ts +7 -7
  551. package/lib/exercises/percent/reciprocalPercentage.d.ts.map +1 -1
  552. package/lib/exercises/percent/reciprocalPercentage.js +61 -50
  553. package/lib/exercises/powers/calculateNegativePower.d.ts +7 -9
  554. package/lib/exercises/powers/calculateNegativePower.d.ts.map +1 -1
  555. package/lib/exercises/powers/calculateNegativePower.js +73 -57
  556. package/lib/exercises/powers/calculatePower.d.ts +7 -9
  557. package/lib/exercises/powers/calculatePower.d.ts.map +1 -1
  558. package/lib/exercises/powers/calculatePower.js +65 -61
  559. package/lib/exercises/powers/decimalToScientific.d.ts +6 -8
  560. package/lib/exercises/powers/decimalToScientific.d.ts.map +1 -1
  561. package/lib/exercises/powers/decimalToScientific.js +76 -69
  562. package/lib/exercises/powers/index.d.ts +10 -0
  563. package/lib/exercises/powers/index.d.ts.map +1 -0
  564. package/lib/exercises/powers/index.js +25 -0
  565. package/lib/exercises/powers/powerDefinition.d.ts +7 -9
  566. package/lib/exercises/powers/powerDefinition.d.ts.map +1 -1
  567. package/lib/exercises/powers/powerDefinition.js +55 -50
  568. package/lib/exercises/powers/powersDivision.d.ts +12 -14
  569. package/lib/exercises/powers/powersDivision.d.ts.map +1 -1
  570. package/lib/exercises/powers/powersDivision.js +87 -65
  571. package/lib/exercises/powers/powersOfTenToDecimal.d.ts +9 -11
  572. package/lib/exercises/powers/powersOfTenToDecimal.d.ts.map +1 -1
  573. package/lib/exercises/powers/powersOfTenToDecimal.js +72 -66
  574. package/lib/exercises/powers/powersPower.d.ts +12 -14
  575. package/lib/exercises/powers/powersPower.d.ts.map +1 -1
  576. package/lib/exercises/powers/powersPower.js +94 -71
  577. package/lib/exercises/powers/powersProduct.d.ts +12 -14
  578. package/lib/exercises/powers/powersProduct.d.ts.map +1 -1
  579. package/lib/exercises/powers/powersProduct.js +89 -66
  580. package/lib/exercises/powers/scientificToDecimal.d.ts +10 -12
  581. package/lib/exercises/powers/scientificToDecimal.d.ts.map +1 -1
  582. package/lib/exercises/powers/scientificToDecimal.js +72 -66
  583. package/lib/exercises/primitive/constantPrimitive.d.ts +10 -0
  584. package/lib/exercises/primitive/constantPrimitive.d.ts.map +1 -0
  585. package/lib/exercises/primitive/constantPrimitive.js +56 -0
  586. package/lib/exercises/primitive/expUPrimitive.d.ts +10 -0
  587. package/lib/exercises/primitive/expUPrimitive.d.ts.map +1 -0
  588. package/lib/exercises/primitive/expUPrimitive.js +76 -0
  589. package/lib/exercises/primitive/exponentialPrimitive.d.ts +10 -0
  590. package/lib/exercises/primitive/exponentialPrimitive.d.ts.map +1 -0
  591. package/lib/exercises/primitive/exponentialPrimitive.js +72 -0
  592. package/lib/exercises/primitive/index.d.ts +8 -0
  593. package/lib/exercises/primitive/index.d.ts.map +1 -0
  594. package/lib/exercises/primitive/index.js +31 -0
  595. package/lib/exercises/primitive/logarithmePrimitive.d.ts +9 -0
  596. package/lib/exercises/primitive/logarithmePrimitive.d.ts.map +1 -0
  597. package/lib/exercises/primitive/logarithmePrimitive.js +79 -0
  598. package/lib/exercises/primitive/polynomialPrimitive.d.ts +10 -0
  599. package/lib/exercises/primitive/polynomialPrimitive.d.ts.map +1 -0
  600. package/lib/exercises/primitive/polynomialPrimitive.js +60 -0
  601. package/lib/exercises/primitive/sinCosPrimitive.d.ts +11 -0
  602. package/lib/exercises/primitive/sinCosPrimitive.d.ts.map +1 -0
  603. package/lib/exercises/primitive/sinCosPrimitive.js +79 -0
  604. package/lib/exercises/primitive/sinUCosUPrimitive.d.ts +11 -0
  605. package/lib/exercises/primitive/sinUCosUPrimitive.d.ts.map +1 -0
  606. package/lib/exercises/primitive/sinUCosUPrimitive.js +85 -0
  607. package/lib/exercises/primitive/usualPrimitives.d.ts +11 -0
  608. package/lib/exercises/primitive/usualPrimitives.d.ts.map +1 -0
  609. package/lib/exercises/primitive/usualPrimitives.js +108 -0
  610. package/lib/exercises/probaStat/ballsBasicProbas.d.ts +7 -9
  611. package/lib/exercises/probaStat/ballsBasicProbas.d.ts.map +1 -1
  612. package/lib/exercises/probaStat/ballsBasicProbas.js +63 -51
  613. package/lib/exercises/probaStat/cardBasicProbas.d.ts +6 -8
  614. package/lib/exercises/probaStat/cardBasicProbas.d.ts.map +1 -1
  615. package/lib/exercises/probaStat/cardBasicProbas.js +104 -83
  616. package/lib/exercises/probaStat/conditionalProbability.d.ts +9 -7
  617. package/lib/exercises/probaStat/conditionalProbability.d.ts.map +1 -1
  618. package/lib/exercises/probaStat/conditionalProbability.js +91 -86
  619. package/lib/exercises/probaStat/diceBasicProbas.d.ts +8 -10
  620. package/lib/exercises/probaStat/diceBasicProbas.d.ts.map +1 -1
  621. package/lib/exercises/probaStat/diceBasicProbas.js +77 -61
  622. package/lib/exercises/probaStat/index.d.ts +8 -0
  623. package/lib/exercises/probaStat/index.d.ts.map +1 -0
  624. package/lib/exercises/probaStat/index.js +23 -0
  625. package/lib/exercises/probaStat/probabilityTree.d.ts +12 -16
  626. package/lib/exercises/probaStat/probabilityTree.d.ts.map +1 -1
  627. package/lib/exercises/probaStat/probabilityTree.js +140 -129
  628. package/lib/exercises/probaStat/stats1var/averageWithTable.d.ts +8 -0
  629. package/lib/exercises/probaStat/stats1var/averageWithTable.d.ts.map +1 -0
  630. package/lib/exercises/probaStat/stats1var/averageWithTable.js +68 -0
  631. package/lib/exercises/probaStat/stats1var/index.d.ts +7 -0
  632. package/lib/exercises/probaStat/stats1var/index.d.ts.map +1 -0
  633. package/lib/exercises/probaStat/stats1var/index.js +22 -0
  634. package/lib/exercises/probaStat/stats1var/marginalAndConditionalFrequency.d.ts +11 -0
  635. package/lib/exercises/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -0
  636. package/lib/exercises/probaStat/stats1var/marginalAndConditionalFrequency.js +129 -0
  637. package/lib/exercises/probaStat/stats1var/median.d.ts +7 -0
  638. package/lib/exercises/probaStat/stats1var/median.d.ts.map +1 -0
  639. package/lib/exercises/probaStat/stats1var/median.js +71 -0
  640. package/lib/exercises/probaStat/stats1var/medianList.d.ts +7 -0
  641. package/lib/exercises/probaStat/stats1var/medianList.d.ts.map +1 -0
  642. package/lib/exercises/probaStat/stats1var/medianList.js +56 -0
  643. package/lib/exercises/probaStat/stats1var/quartiles.d.ts +9 -0
  644. package/lib/exercises/probaStat/stats1var/quartiles.d.ts.map +1 -0
  645. package/lib/exercises/probaStat/stats1var/quartiles.js +84 -0
  646. package/lib/exercises/probaStat/stats1var/quartilesList.d.ts +8 -0
  647. package/lib/exercises/probaStat/stats1var/quartilesList.d.ts.map +1 -0
  648. package/lib/exercises/probaStat/stats1var/quartilesList.js +72 -0
  649. package/lib/exercises/probaStat/stats2var/averagePoint.d.ts +7 -7
  650. package/lib/exercises/probaStat/stats2var/averagePoint.d.ts.map +1 -1
  651. package/lib/exercises/probaStat/stats2var/averagePoint.js +65 -47
  652. package/lib/exercises/probaStat/stats2var/index.d.ts +2 -0
  653. package/lib/exercises/probaStat/stats2var/index.d.ts.map +1 -0
  654. package/lib/exercises/probaStat/stats2var/index.js +17 -0
  655. package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts +8 -10
  656. package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts.map +1 -1
  657. package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +48 -44
  658. package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts +7 -9
  659. package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts.map +1 -1
  660. package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.js +55 -43
  661. package/lib/exercises/sequences/arithmetic/arithmeticFindReason.d.ts +8 -7
  662. package/lib/exercises/sequences/arithmetic/arithmeticFindReason.d.ts.map +1 -1
  663. package/lib/exercises/sequences/arithmetic/arithmeticFindReason.js +48 -44
  664. package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.d.ts +8 -7
  665. package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.d.ts.map +1 -1
  666. package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.js +47 -43
  667. package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.d.ts +8 -7
  668. package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.d.ts.map +1 -1
  669. package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.js +47 -43
  670. package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.d.ts +8 -10
  671. package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.d.ts.map +1 -1
  672. package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.js +57 -53
  673. package/lib/exercises/sequences/arithmetic/firstIntegersSum.d.ts +6 -8
  674. package/lib/exercises/sequences/arithmetic/firstIntegersSum.d.ts.map +1 -1
  675. package/lib/exercises/sequences/arithmetic/firstIntegersSum.js +46 -42
  676. package/lib/exercises/sequences/arithmetic/index.d.ts +8 -0
  677. package/lib/exercises/sequences/arithmetic/index.d.ts.map +1 -0
  678. package/lib/exercises/sequences/arithmetic/index.js +23 -0
  679. package/lib/exercises/sequences/explicitFormulaUsage.d.ts +7 -9
  680. package/lib/exercises/sequences/explicitFormulaUsage.d.ts.map +1 -1
  681. package/lib/exercises/sequences/explicitFormulaUsage.js +50 -46
  682. package/lib/exercises/sequences/genericSequenceVariations.d.ts +6 -8
  683. package/lib/exercises/sequences/genericSequenceVariations.d.ts.map +1 -1
  684. package/lib/exercises/sequences/genericSequenceVariations.js +52 -48
  685. package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.d.ts +8 -10
  686. package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -1
  687. package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.js +52 -49
  688. package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.d.ts +7 -9
  689. package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.d.ts.map +1 -1
  690. package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.js +60 -49
  691. package/lib/exercises/sequences/geometric/geometricFindReason.d.ts +8 -9
  692. package/lib/exercises/sequences/geometric/geometricFindReason.d.ts.map +1 -1
  693. package/lib/exercises/sequences/geometric/geometricFindReason.js +51 -46
  694. package/lib/exercises/sequences/geometric/geometricFirstTermsSum.d.ts +7 -9
  695. package/lib/exercises/sequences/geometric/geometricFirstTermsSum.d.ts.map +1 -1
  696. package/lib/exercises/sequences/geometric/geometricFirstTermsSum.js +55 -43
  697. package/lib/exercises/sequences/geometric/geometricReasonUsage.d.ts +8 -9
  698. package/lib/exercises/sequences/geometric/geometricReasonUsage.d.ts.map +1 -1
  699. package/lib/exercises/sequences/geometric/geometricReasonUsage.js +49 -45
  700. package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts +8 -9
  701. package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts.map +1 -1
  702. package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.js +49 -45
  703. package/lib/exercises/sequences/geometric/index.d.ts +7 -0
  704. package/lib/exercises/sequences/geometric/index.d.ts.map +1 -0
  705. package/lib/exercises/sequences/geometric/index.js +22 -0
  706. package/lib/exercises/sequences/index.d.ts +6 -0
  707. package/lib/exercises/sequences/index.d.ts.map +1 -0
  708. package/lib/exercises/sequences/index.js +21 -0
  709. package/lib/exercises/sequences/recurrenceFormulaUsage.d.ts +8 -10
  710. package/lib/exercises/sequences/recurrenceFormulaUsage.d.ts.map +1 -1
  711. package/lib/exercises/sequences/recurrenceFormulaUsage.js +55 -51
  712. package/lib/exercises/sets/index.d.ts +3 -0
  713. package/lib/exercises/sets/index.d.ts.map +1 -0
  714. package/lib/exercises/sets/index.js +18 -0
  715. package/lib/exercises/sets/intervals/index.d.ts +4 -0
  716. package/lib/exercises/sets/intervals/index.d.ts.map +1 -0
  717. package/lib/exercises/sets/intervals/index.js +19 -0
  718. package/lib/exercises/sets/intervals/inequalityToInterval.d.ts +7 -9
  719. package/lib/exercises/sets/intervals/inequalityToInterval.d.ts.map +1 -1
  720. package/lib/exercises/sets/intervals/inequalityToInterval.js +145 -98
  721. package/lib/exercises/sets/intervals/intervalsIntersection.d.ts +7 -9
  722. package/lib/exercises/sets/intervals/intervalsIntersection.d.ts.map +1 -1
  723. package/lib/exercises/sets/intervals/intervalsIntersection.js +56 -44
  724. package/lib/exercises/sets/intervals/intervalsUnion.d.ts +7 -9
  725. package/lib/exercises/sets/intervals/intervalsUnion.d.ts.map +1 -1
  726. package/lib/exercises/sets/intervals/intervalsUnion.js +48 -44
  727. package/lib/exercises/sets/setBelonging.d.ts +7 -7
  728. package/lib/exercises/sets/setBelonging.d.ts.map +1 -1
  729. package/lib/exercises/sets/setBelonging.js +84 -71
  730. package/lib/exercises/squareRoots/index.d.ts +3 -0
  731. package/lib/exercises/squareRoots/index.d.ts.map +1 -0
  732. package/lib/exercises/squareRoots/index.js +18 -0
  733. package/lib/exercises/squareRoots/simpifySquareRoot.d.ts +6 -7
  734. package/lib/exercises/squareRoots/simpifySquareRoot.d.ts.map +1 -1
  735. package/lib/exercises/squareRoots/simpifySquareRoot.js +54 -48
  736. package/lib/exercises/squareRoots/squareRootEquation.d.ts +6 -8
  737. package/lib/exercises/squareRoots/squareRootEquation.d.ts.map +1 -1
  738. package/lib/exercises/squareRoots/squareRootEquation.js +54 -44
  739. package/lib/exercises/trigonometry/index.d.ts +6 -0
  740. package/lib/exercises/trigonometry/index.d.ts.map +1 -0
  741. package/lib/exercises/trigonometry/index.js +21 -0
  742. package/lib/exercises/trigonometry/mainRemarkableValues.d.ts +7 -7
  743. package/lib/exercises/trigonometry/mainRemarkableValues.d.ts.map +1 -1
  744. package/lib/exercises/trigonometry/mainRemarkableValues.js +69 -56
  745. package/lib/exercises/trigonometry/remarkableValues.d.ts +7 -7
  746. package/lib/exercises/trigonometry/remarkableValues.d.ts.map +1 -1
  747. package/lib/exercises/trigonometry/remarkableValues.js +70 -59
  748. package/lib/exercises/trigonometry/trigonometry.d.ts +11 -0
  749. package/lib/exercises/trigonometry/trigonometry.d.ts.map +1 -0
  750. package/lib/exercises/trigonometry/trigonometry.js +114 -0
  751. package/lib/exercises/trigonometry/trigonometryAngleCalcul.d.ts +9 -0
  752. package/lib/exercises/trigonometry/trigonometryAngleCalcul.d.ts.map +1 -0
  753. package/lib/exercises/trigonometry/trigonometryAngleCalcul.js +73 -0
  754. package/lib/exercises/trigonometry/trigonometrySideCalcul.d.ts +10 -0
  755. package/lib/exercises/trigonometry/trigonometrySideCalcul.d.ts.map +1 -0
  756. package/lib/exercises/trigonometry/trigonometrySideCalcul.js +85 -0
  757. package/lib/exercises/utils/cardsData.d.ts +21 -21
  758. package/lib/exercises/utils/cardsData.js +26 -26
  759. package/lib/exercises/utils/geogebra/getAdaptedCoords.js +1 -1
  760. package/lib/exercises/utils/getDistinctQuestions.d.ts +10 -10
  761. package/lib/exercises/utils/getDistinctQuestions.d.ts.map +1 -1
  762. package/lib/exercises/utils/getDistinctQuestions.js +37 -38
  763. package/lib/exercises/utils/keys/equationKeys.d.ts +3 -0
  764. package/lib/exercises/utils/keys/equationKeys.d.ts.map +1 -0
  765. package/lib/exercises/utils/keys/equationKeys.js +12 -0
  766. package/lib/exercises/utils/keys/inequationKeys.d.ts +3 -0
  767. package/lib/exercises/utils/keys/inequationKeys.d.ts.map +1 -0
  768. package/lib/exercises/utils/keys/inequationKeys.js +17 -0
  769. package/lib/index.d.ts +694 -15
  770. package/lib/index.d.ts.map +1 -1
  771. package/lib/index.js +61 -33
  772. package/lib/math/complex/complex.d.ts +24 -23
  773. package/lib/math/complex/complex.d.ts.map +1 -1
  774. package/lib/math/complex/complex.js +104 -106
  775. package/lib/math/geometry/point.d.ts +31 -32
  776. package/lib/math/geometry/point.d.ts.map +1 -1
  777. package/lib/math/geometry/point.js +73 -72
  778. package/lib/math/geometry/triangles.d.ts +53 -53
  779. package/lib/math/geometry/triangles.js +183 -183
  780. package/lib/math/geometry/vector.d.ts +17 -17
  781. package/lib/math/geometry/vector.d.ts.map +1 -1
  782. package/lib/math/geometry/vector.js +49 -39
  783. package/lib/math/numbers/decimals/decimal.d.ts +27 -27
  784. package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
  785. package/lib/math/numbers/decimals/decimal.js +187 -184
  786. package/lib/math/numbers/epsilon.d.ts +1 -1
  787. package/lib/math/numbers/epsilon.js +10 -10
  788. package/lib/math/numbers/integer/integer.d.ts +20 -16
  789. package/lib/math/numbers/integer/integer.d.ts.map +1 -1
  790. package/lib/math/numbers/integer/integer.js +111 -84
  791. package/lib/math/numbers/integer/power.d.ts +13 -13
  792. package/lib/math/numbers/integer/power.d.ts.map +1 -1
  793. package/lib/math/numbers/integer/power.js +52 -52
  794. package/lib/math/numbers/integer/primes.d.ts +1 -1
  795. package/lib/math/numbers/integer/primes.d.ts.map +1 -1
  796. package/lib/math/numbers/integer/primes.js +7 -4
  797. package/lib/math/numbers/nombre.d.ts +17 -22
  798. package/lib/math/numbers/nombre.d.ts.map +1 -1
  799. package/lib/math/numbers/nombre.js +37 -32
  800. package/lib/math/numbers/rationals/rational.d.ts +28 -31
  801. package/lib/math/numbers/rationals/rational.d.ts.map +1 -1
  802. package/lib/math/numbers/rationals/rational.js +132 -126
  803. package/lib/math/numbers/reals/extendedRingElement.d.ts +14 -12
  804. package/lib/math/numbers/reals/extendedRingElement.d.ts.map +1 -1
  805. package/lib/math/numbers/reals/extendedRingElement.js +41 -41
  806. package/lib/math/numbers/reals/real.d.ts +31 -30
  807. package/lib/math/numbers/reals/real.d.ts.map +1 -1
  808. package/lib/math/numbers/reals/real.js +114 -104
  809. package/lib/math/polynomials/affine.d.ts +15 -15
  810. package/lib/math/polynomials/affine.js +44 -44
  811. package/lib/math/polynomials/monom.d.ts +4 -4
  812. package/lib/math/polynomials/monom.js +14 -14
  813. package/lib/math/polynomials/polynomial.d.ts +45 -42
  814. package/lib/math/polynomials/polynomial.d.ts.map +1 -1
  815. package/lib/math/polynomials/polynomial.js +377 -310
  816. package/lib/math/polynomials/rationalFrac.d.ts +12 -0
  817. package/lib/math/polynomials/rationalFrac.d.ts.map +1 -0
  818. package/lib/math/polynomials/rationalFrac.js +50 -0
  819. package/lib/math/polynomials/trinom.d.ts +29 -28
  820. package/lib/math/polynomials/trinom.d.ts.map +1 -1
  821. package/lib/math/polynomials/trinom.js +176 -141
  822. package/lib/math/sequences/arithmeticSequence.js +1 -1
  823. package/lib/math/sequences/geometricSequence.d.ts +13 -13
  824. package/lib/math/sequences/geometricSequence.js +76 -76
  825. package/lib/math/sequences/sequence.d.ts +24 -24
  826. package/lib/math/sequences/sequence.js +22 -22
  827. package/lib/math/sets/discreteSet.d.ts +10 -10
  828. package/lib/math/sets/discreteSet.js +28 -28
  829. package/lib/math/sets/emptySet.js +6 -6
  830. package/lib/math/sets/intervals/intervals.d.ts +35 -40
  831. package/lib/math/sets/intervals/intervals.d.ts.map +1 -1
  832. package/lib/math/sets/intervals/intervals.js +261 -247
  833. package/lib/math/sets/mathSet.d.ts +8 -8
  834. package/lib/math/sets/mathSet.js +11 -11
  835. package/lib/math/sets/mathSetInterface.d.ts +6 -6
  836. package/lib/math/sets/mathSetInterface.js +2 -2
  837. package/lib/math/trigonometry/remarkableValue.d.ts +15 -10
  838. package/lib/math/trigonometry/remarkableValue.d.ts.map +1 -1
  839. package/lib/math/trigonometry/remarkableValue.js +40 -29
  840. package/lib/math/trigonometry/remarkableValues.d.ts +2 -2
  841. package/lib/math/trigonometry/remarkableValues.d.ts.map +1 -1
  842. package/lib/math/trigonometry/remarkableValues.js +67 -56
  843. package/lib/math/utils/arithmetic/coprimesOf.d.ts +1 -1
  844. package/lib/math/utils/arithmetic/coprimesOf.js +13 -13
  845. package/lib/math/utils/arithmetic/dividersOf.d.ts +1 -1
  846. package/lib/math/utils/arithmetic/dividersOf.js +12 -12
  847. package/lib/math/utils/arithmetic/gcd.d.ts +2 -1
  848. package/lib/math/utils/arithmetic/gcd.d.ts.map +1 -1
  849. package/lib/math/utils/arithmetic/gcd.js +14 -7
  850. package/lib/math/utils/arithmetic/isSquare.d.ts +1 -1
  851. package/lib/math/utils/arithmetic/isSquare.js +7 -7
  852. package/lib/math/utils/arithmetic/lcd.d.ts +1 -1
  853. package/lib/math/utils/arithmetic/lcd.js +12 -12
  854. package/lib/math/utils/arithmetic/nonCoprimesOf.d.ts +1 -1
  855. package/lib/math/utils/arithmetic/nonCoprimesOf.js +13 -13
  856. package/lib/math/utils/arithmetic/nonDividersOf.d.ts +1 -1
  857. package/lib/math/utils/arithmetic/nonDividersOf.js +14 -14
  858. package/lib/math/utils/arithmetic/primeFactors.d.ts +5 -5
  859. package/lib/math/utils/arithmetic/primeFactors.js +22 -22
  860. package/lib/math/utils/decimals/decimalPartLengthOf.d.ts +1 -1
  861. package/lib/math/utils/decimals/decimalPartLengthOf.js +14 -14
  862. package/lib/math/utils/latex/frenchify.d.ts +1 -1
  863. package/lib/math/utils/latex/frenchify.d.ts.map +1 -1
  864. package/lib/math/utils/latex/frenchify.js +9 -7
  865. package/lib/math/utils/random/randTupleInt.d.ts +13 -13
  866. package/lib/math/utils/random/randTupleInt.js +30 -30
  867. package/lib/math/utils/random/randint.d.ts +4 -4
  868. package/lib/math/utils/random/randint.js +18 -18
  869. package/lib/math/utils/round.d.ts +1 -1
  870. package/lib/math/utils/round.js +8 -8
  871. package/lib/server.d.ts +2 -1
  872. package/lib/server.d.ts.map +1 -1
  873. package/lib/server.js +119 -73
  874. package/lib/tree/nodes/algebraicNode.d.ts +4 -0
  875. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -0
  876. package/lib/tree/nodes/algebraicNode.js +5 -0
  877. package/lib/tree/nodes/complex/complexNode.d.ts +12 -16
  878. package/lib/tree/nodes/complex/complexNode.d.ts.map +1 -1
  879. package/lib/tree/nodes/complex/complexNode.js +43 -67
  880. package/lib/tree/nodes/equations/equalNode.d.ts +13 -0
  881. package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -0
  882. package/lib/tree/nodes/equations/equalNode.js +38 -0
  883. package/lib/tree/nodes/equations/equationSolutionNode.d.ts +21 -0
  884. package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -0
  885. package/lib/tree/nodes/equations/equationSolutionNode.js +44 -0
  886. package/lib/tree/nodes/equations/multiEqualNode.d.ts +14 -0
  887. package/lib/tree/nodes/equations/multiEqualNode.d.ts.map +1 -0
  888. package/lib/tree/nodes/equations/multiEqualNode.js +39 -0
  889. package/lib/tree/nodes/functions/absNode.d.ts +16 -0
  890. package/lib/tree/nodes/functions/absNode.d.ts.map +1 -0
  891. package/lib/tree/nodes/functions/absNode.js +41 -0
  892. package/lib/tree/nodes/functions/cosNode.d.ts +15 -12
  893. package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
  894. package/lib/tree/nodes/functions/cosNode.js +41 -36
  895. package/lib/tree/nodes/functions/expNode.d.ts +16 -17
  896. package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
  897. package/lib/tree/nodes/functions/expNode.js +53 -45
  898. package/lib/tree/nodes/functions/functionNode.d.ts +16 -16
  899. package/lib/tree/nodes/functions/functionNode.d.ts.map +1 -1
  900. package/lib/tree/nodes/functions/functionNode.js +18 -22
  901. package/lib/tree/nodes/functions/logNode.d.ts +16 -12
  902. package/lib/tree/nodes/functions/logNode.d.ts.map +1 -1
  903. package/lib/tree/nodes/functions/logNode.js +51 -36
  904. package/lib/tree/nodes/functions/oppositeNode.d.ts +20 -10
  905. package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -1
  906. package/lib/tree/nodes/functions/oppositeNode.js +82 -44
  907. package/lib/tree/nodes/functions/sinNode.d.ts +15 -12
  908. package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -1
  909. package/lib/tree/nodes/functions/sinNode.js +41 -36
  910. package/lib/tree/nodes/functions/sqrtNode.d.ts +15 -11
  911. package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
  912. package/lib/tree/nodes/functions/sqrtNode.js +54 -33
  913. package/lib/tree/nodes/geometry/lengthNode.d.ts +14 -0
  914. package/lib/tree/nodes/geometry/lengthNode.d.ts.map +1 -0
  915. package/lib/tree/nodes/geometry/lengthNode.js +33 -0
  916. package/lib/tree/nodes/geometry/pointNode.d.ts +15 -0
  917. package/lib/tree/nodes/geometry/pointNode.d.ts.map +1 -0
  918. package/lib/tree/nodes/geometry/pointNode.js +41 -0
  919. package/lib/tree/nodes/geometry/vectorNode.d.ts +14 -0
  920. package/lib/tree/nodes/geometry/vectorNode.d.ts.map +1 -0
  921. package/lib/tree/nodes/geometry/vectorNode.js +30 -0
  922. package/lib/tree/nodes/inequations/inequationNode.d.ts +21 -0
  923. package/lib/tree/nodes/inequations/inequationNode.d.ts.map +1 -0
  924. package/lib/tree/nodes/inequations/inequationNode.js +116 -0
  925. package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts +21 -0
  926. package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts.map +1 -0
  927. package/lib/tree/nodes/inequations/inequationSolutionNode.js +46 -0
  928. package/lib/tree/nodes/node.d.ts +33 -15
  929. package/lib/tree/nodes/node.d.ts.map +1 -1
  930. package/lib/tree/nodes/node.js +18 -11
  931. package/lib/tree/nodes/numbers/constantNode.d.ts +13 -12
  932. package/lib/tree/nodes/numbers/constantNode.d.ts.map +1 -1
  933. package/lib/tree/nodes/numbers/constantNode.js +32 -28
  934. package/lib/tree/nodes/numbers/infiniteNode.d.ts +5 -0
  935. package/lib/tree/nodes/numbers/infiniteNode.d.ts.map +1 -0
  936. package/lib/tree/nodes/numbers/infiniteNode.js +7 -0
  937. package/lib/tree/nodes/numbers/numberNode.d.ts +15 -13
  938. package/lib/tree/nodes/numbers/numberNode.d.ts.map +1 -1
  939. package/lib/tree/nodes/numbers/numberNode.js +37 -33
  940. package/lib/tree/nodes/numbers/percentNode.d.ts +12 -0
  941. package/lib/tree/nodes/numbers/percentNode.d.ts.map +1 -0
  942. package/lib/tree/nodes/numbers/percentNode.js +26 -0
  943. package/lib/tree/nodes/numbers/piNode.d.ts +2 -2
  944. package/lib/tree/nodes/numbers/piNode.js +5 -5
  945. package/lib/tree/nodes/operators/addNode.d.ts +18 -10
  946. package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
  947. package/lib/tree/nodes/operators/addNode.js +77 -41
  948. package/lib/tree/nodes/operators/divideNode.d.ts +19 -14
  949. package/lib/tree/nodes/operators/divideNode.d.ts.map +1 -1
  950. package/lib/tree/nodes/operators/divideNode.js +63 -56
  951. package/lib/tree/nodes/operators/fractionNode.d.ts +21 -19
  952. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  953. package/lib/tree/nodes/operators/fractionNode.js +67 -59
  954. package/lib/tree/nodes/operators/multiplyNode.d.ts +19 -15
  955. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  956. package/lib/tree/nodes/operators/multiplyNode.js +193 -72
  957. package/lib/tree/nodes/operators/operatorNode.d.ts +20 -21
  958. package/lib/tree/nodes/operators/operatorNode.d.ts.map +1 -1
  959. package/lib/tree/nodes/operators/operatorNode.js +17 -35
  960. package/lib/tree/nodes/operators/powerNode.d.ts +19 -15
  961. package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
  962. package/lib/tree/nodes/operators/powerNode.js +77 -67
  963. package/lib/tree/nodes/operators/substractNode.d.ts +14 -10
  964. package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
  965. package/lib/tree/nodes/operators/substractNode.js +49 -42
  966. package/lib/tree/nodes/sets/belongsNode.d.ts +15 -0
  967. package/lib/tree/nodes/sets/belongsNode.d.ts.map +1 -0
  968. package/lib/tree/nodes/sets/belongsNode.js +36 -0
  969. package/lib/tree/nodes/sets/discreteSetNode.d.ts +15 -0
  970. package/lib/tree/nodes/sets/discreteSetNode.d.ts.map +1 -0
  971. package/lib/tree/nodes/sets/discreteSetNode.js +54 -0
  972. package/lib/tree/nodes/sets/intervalNode.d.ts +24 -0
  973. package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -0
  974. package/lib/tree/nodes/sets/intervalNode.js +71 -0
  975. package/lib/tree/nodes/sets/setNode.d.ts +4 -0
  976. package/lib/tree/nodes/sets/setNode.d.ts.map +1 -0
  977. package/lib/tree/nodes/sets/setNode.js +2 -0
  978. package/lib/tree/nodes/sets/unionIntervalNode.d.ts +20 -0
  979. package/lib/tree/nodes/sets/unionIntervalNode.d.ts.map +1 -0
  980. package/lib/tree/nodes/sets/unionIntervalNode.js +44 -0
  981. package/lib/tree/nodes/variables/variableNode.d.ts +12 -11
  982. package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -1
  983. package/lib/tree/nodes/variables/variableNode.js +30 -26
  984. package/lib/tree/parsers/derivateParser.js +62 -62
  985. package/lib/tree/parsers/simplify.d.ts +0 -3
  986. package/lib/tree/parsers/simplify.d.ts.map +1 -1
  987. package/lib/tree/parsers/simplify.js +99 -76
  988. package/lib/tree/utilities/functionComposition.d.ts +5 -0
  989. package/lib/tree/utilities/functionComposition.d.ts.map +1 -0
  990. package/lib/tree/utilities/functionComposition.js +14 -0
  991. package/lib/tree/utilities/operatorComposition.d.ts +5 -0
  992. package/lib/tree/utilities/operatorComposition.d.ts.map +1 -0
  993. package/lib/tree/utilities/operatorComposition.js +14 -0
  994. package/lib/types/class.d.ts +4 -0
  995. package/lib/types/class.d.ts.map +1 -0
  996. package/lib/types/class.js +2 -0
  997. package/lib/types/keyIds.d.ts +31 -29
  998. package/lib/types/keyIds.d.ts.map +1 -1
  999. package/lib/types/keyIds.js +2 -2
  1000. package/lib/utils/arrayEqual.d.ts +1 -1
  1001. package/lib/utils/arrayEqual.js +13 -13
  1002. package/lib/utils/average.d.ts +1 -1
  1003. package/lib/utils/average.js +9 -9
  1004. package/lib/utils/cartesianProducts.d.ts +13 -0
  1005. package/lib/utils/cartesianProducts.d.ts.map +1 -0
  1006. package/lib/utils/cartesianProducts.js +64 -0
  1007. package/lib/utils/coinFlip.d.ts +1 -1
  1008. package/lib/utils/coinFlip.js +7 -7
  1009. package/lib/utils/diceFlip.d.ts +1 -1
  1010. package/lib/utils/diceFlip.js +12 -12
  1011. package/lib/utils/enumToArray.d.ts +7 -7
  1012. package/lib/utils/enumToArray.js +16 -16
  1013. package/lib/utils/isInt.d.ts +2 -0
  1014. package/lib/utils/isInt.d.ts.map +1 -0
  1015. package/lib/utils/isInt.js +7 -0
  1016. package/lib/utils/isLetter.d.ts +2 -0
  1017. package/lib/utils/isLetter.d.ts.map +1 -0
  1018. package/lib/utils/isLetter.js +7 -0
  1019. package/lib/utils/permutations.d.ts +2 -0
  1020. package/lib/utils/permutations.d.ts.map +1 -0
  1021. package/lib/utils/permutations.js +21 -0
  1022. package/lib/utils/probaFlip.d.ts +6 -6
  1023. package/lib/utils/probaFlip.js +12 -12
  1024. package/lib/utils/probaLawFlip.d.ts +1 -1
  1025. package/lib/utils/probaLawFlip.js +19 -19
  1026. package/lib/utils/random.d.ts +1 -1
  1027. package/lib/utils/random.js +7 -7
  1028. package/lib/utils/randomEnumValue.d.ts +1 -1
  1029. package/lib/utils/randomEnumValue.js +9 -9
  1030. package/lib/utils/randomLetter.d.ts +1 -1
  1031. package/lib/utils/randomLetter.js +9 -9
  1032. package/lib/utils/shuffle.d.ts +1 -1
  1033. package/lib/utils/shuffle.js +15 -15
  1034. package/package.json +3 -4
@@ -1,46 +1,51 @@
1
- import { KeyId } from '../types/keyIds';
2
- export declare const addValidProp: (props: Proposition[], statement: string, format?: 'tex' | 'raw') => void;
3
- export declare const addWrongProp: (props: Proposition[], statement: string, format?: 'tex' | 'raw') => void;
4
- export declare const tryToAddWrongProp: (props: Proposition[], statement: string, format?: 'tex' | 'raw') => void;
5
- export declare const shuffleProps: (props: Proposition[], n: number) => Proposition[];
6
- export type GeneratorOptions = {};
7
- export type Proposition = {
8
- id: string;
9
- statement: string;
10
- isRightAnswer: boolean;
11
- format: 'tex' | 'raw';
12
- };
13
- export interface Question<TQCMProps = {}, TVEAProps = {}> {
14
- instruction: string;
15
- startStatement?: string;
16
- answer: string;
17
- answerFormat: 'tex' | 'raw';
18
- keys?: KeyId[];
19
- commands?: string[];
20
- coords?: number[];
21
- options?: any;
22
- divisionFormat?: 'fraction' | 'obelus';
23
- qcmGeneratorProps?: TQCMProps;
24
- veaProps?: TVEAProps;
25
- }
26
- export type QCMGenerator<T> = (n: number, args: T) => Proposition[];
27
- export type VEA<T> = (studentAnswer: string, args: T) => boolean;
28
- export type QuestionGenerator<TQCMProps = {}, TVEAProps = {}, TOptions = {}> = (opts?: TOptions) => Question<TQCMProps, TVEAProps>;
29
- export interface MathExercise<TQCMProps = {}, TVEAProps = {}> {
30
- id: string;
31
- isSingleStep: boolean;
32
- label: string;
33
- sections: MathSection[];
34
- levels: MathLevel[];
35
- connector?: '=' | '\\iff' | '\\approx';
36
- generator: (n: number) => Question<TQCMProps, TVEAProps>[];
37
- maxAllowedQuestions?: number;
38
- answerType?: 'QCM' | 'free';
39
- qcmTimer: number;
40
- freeTimer: number;
41
- getPropositions?: QCMGenerator<TQCMProps>;
42
- isAnswerValid?: VEA<TVEAProps>;
43
- }
44
- export type MathLevel = '6ème' | '5ème' | '4ème' | '3ème' | '2nde' | '1reTech' | '1reESM' | '1reSpé' | 'TermSpé' | 'TermTech' | 'MathExp' | 'MathComp' | 'CAP' | '2ndPro' | '1rePro' | 'TermPro';
45
- export type MathSection = 'Arithmétique' | 'Calcul littéral' | 'Calculs' | 'Combinatoire et dénombrement' | 'Conversions' | 'Dérivation' | 'Droites' | 'Ensembles et intervalles' | 'Équations' | 'Équations différentielles' | 'Exponentielle' | 'Fonction cube' | 'Fonction inverse' | 'Fonctions' | 'Fonctions affines' | 'Fonctions de référence' | 'Fractions' | 'Géométrie cartésienne' | 'Géométrie euclidienne' | 'Inéquations' | 'Intégration' | 'Limites' | 'Logarithme népérien' | 'Nombres complexes' | 'Pourcentages' | 'Primitives' | 'Probabilités' | 'Proportionnalité' | 'Puissances' | 'Racines carrées' | 'Second degré' | 'Statistiques' | 'Suites' | 'Trigonométrie' | 'Valeur absolue' | 'Vecteurs';
1
+ import { KeyId } from "../types/keyIds";
2
+ export declare const addValidProp: (props: Proposition[], statement: string, format?: "tex" | "raw") => void;
3
+ export declare const addWrongProp: (props: Proposition[], statement: string, format?: "tex" | "raw") => void;
4
+ export declare const tryToAddWrongProp: (props: Proposition[], statement: string, format?: "tex" | "raw") => void;
5
+ export declare const shuffleProps: (props: Proposition[], n: number) => Proposition[];
6
+ export type GeneratorOptions = {};
7
+ export type Proposition = {
8
+ id: string;
9
+ statement: string;
10
+ isRightAnswer: boolean;
11
+ format: "tex" | "raw";
12
+ };
13
+ export interface Question<TIdentifiers = {}> {
14
+ instruction: string;
15
+ startStatement?: string;
16
+ answer: string;
17
+ answerFormat: "tex" | "raw";
18
+ keys?: KeyId[];
19
+ commands?: string[];
20
+ coords?: number[];
21
+ options?: any;
22
+ divisionFormat?: "fraction" | "obelus";
23
+ identifiers: TIdentifiers;
24
+ }
25
+ export type QCMGenerator<TIdentifiers> = (n: number, args: {
26
+ answer: string;
27
+ } & TIdentifiers) => Proposition[];
28
+ export type VEA<TIdentifiers> = (studentAnswer: string, args: {
29
+ answer: string;
30
+ } & TIdentifiers) => boolean;
31
+ export type QuestionGenerator<TIdentifiers = {}, TOptions = {}> = (opts?: TOptions) => Question<TIdentifiers>;
32
+ export interface MathExercise<TIdentifiers = {}> {
33
+ id: string;
34
+ isSingleStep: boolean;
35
+ label: string;
36
+ sections: MathSection[];
37
+ levels: MathLevel[];
38
+ connector?: "=" | "\\iff" | "\\approx";
39
+ generator: (n: number) => Question<TIdentifiers>[];
40
+ maxAllowedQuestions?: number;
41
+ answerType?: "QCM" | "free";
42
+ qcmTimer: number;
43
+ freeTimer: number;
44
+ getPropositions?: QCMGenerator<{
45
+ answer: string;
46
+ } & TIdentifiers>;
47
+ isAnswerValid?: VEA<TIdentifiers>;
48
+ }
49
+ export type MathLevel = "6ème" | "5ème" | "4ème" | "3ème" | "2nde" | "1reTech" | "1reESM" | "1reSpé" | "TermSpé" | "TermTech" | "MathExp" | "MathComp" | "CAP" | "2ndPro" | "1rePro" | "TermPro";
50
+ export type MathSection = "Aires" | "Arithmétique" | "Calcul littéral" | "Calculs" | "Combinatoire et dénombrement" | "Conversions" | "Dérivation" | "Droites" | "Ensembles et intervalles" | "Équations" | "Équations différentielles" | "Exponentielle" | "Fonction cube" | "Fonction inverse" | "Fonctions" | "Fonctions affines" | "Fonctions de référence" | "Fractions" | "Géométrie cartésienne" | "Géométrie euclidienne" | "Inéquations" | "Intégration" | "Limites" | "Logarithme népérien" | "Nombres complexes" | "Périmètres" | "Pourcentages" | "Primitives" | "Probabilités" | "Proportionnalité" | "Puissances" | "Racines carrées" | "Second degré" | "Statistiques" | "Suites" | "Théorème de Pythagore" | "Théorème de Thalès" | "Trigonométrie" | "Valeur absolue" | "Vecteurs";
46
51
  //# sourceMappingURL=exercise.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"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"}
@@ -1,38 +1,38 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.shuffleProps = exports.tryToAddWrongProp = exports.addWrongProp = exports.addValidProp = void 0;
4
- const shuffle_1 = require("../utils/shuffle");
5
- const uuidv4_1 = require("uuidv4");
6
- const addValidProp = (props, statement, format = 'tex') => {
7
- props.push({
8
- id: (0, uuidv4_1.uuid)(),
9
- statement,
10
- isRightAnswer: true,
11
- format: format,
12
- });
13
- };
14
- exports.addValidProp = addValidProp;
15
- const addWrongProp = (props, statement, format = 'tex') => {
16
- props.push({
17
- id: (0, uuidv4_1.uuid)(),
18
- statement,
19
- isRightAnswer: false,
20
- format: format,
21
- });
22
- };
23
- exports.addWrongProp = addWrongProp;
24
- const tryToAddWrongProp = (props, statement, format = 'tex') => {
25
- if (!props.some((prop) => prop.statement === statement)) {
26
- props.push({
27
- id: (0, uuidv4_1.uuid)(),
28
- statement,
29
- isRightAnswer: false,
30
- format: format,
31
- });
32
- }
33
- };
34
- exports.tryToAddWrongProp = tryToAddWrongProp;
35
- const shuffleProps = (props, n) => {
36
- return (0, shuffle_1.shuffle)([props[0], ...(0, shuffle_1.shuffle)(props.slice(1)).slice(0, n - 1)]);
37
- };
38
- exports.shuffleProps = shuffleProps;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.shuffleProps = exports.tryToAddWrongProp = exports.addWrongProp = exports.addValidProp = void 0;
4
+ const shuffle_1 = require("../utils/shuffle");
5
+ const uuidv4_1 = require("uuidv4");
6
+ const addValidProp = (props, statement, format = "tex") => {
7
+ props.push({
8
+ id: (0, uuidv4_1.uuid)(),
9
+ statement,
10
+ isRightAnswer: true,
11
+ format: format,
12
+ });
13
+ };
14
+ exports.addValidProp = addValidProp;
15
+ const addWrongProp = (props, statement, format = "tex") => {
16
+ props.push({
17
+ id: (0, uuidv4_1.uuid)(),
18
+ statement,
19
+ isRightAnswer: false,
20
+ format: format,
21
+ });
22
+ };
23
+ exports.addWrongProp = addWrongProp;
24
+ const tryToAddWrongProp = (props, statement, format = "tex") => {
25
+ if (!props.some((prop) => prop.statement === statement)) {
26
+ props.push({
27
+ id: (0, uuidv4_1.uuid)(),
28
+ statement,
29
+ isRightAnswer: false,
30
+ format: format,
31
+ });
32
+ }
33
+ };
34
+ exports.tryToAddWrongProp = tryToAddWrongProp;
35
+ const shuffleProps = (props, n) => {
36
+ return (0, shuffle_1.shuffle)([props[0], ...(0, shuffle_1.shuffle)(props.slice(1)).slice(0, n - 1)]);
37
+ };
38
+ exports.shuffleProps = shuffleProps;
@@ -1,10 +1,8 @@
1
- import { MathExercise } from '../../../exercises/exercise';
2
- type QCMProps = {
3
- answer: string;
4
- a: number;
5
- b: number;
6
- };
7
- type VEAProps = {};
8
- export declare const absoluteValueEquations: MathExercise<QCMProps, VEAProps>;
9
- export {};
1
+ import { MathExercise } from "../../../exercises/exercise";
2
+ type Identifiers = {
3
+ a: number;
4
+ b: number;
5
+ };
6
+ export declare const absoluteValueEquations: MathExercise<Identifiers>;
7
+ export {};
10
8
  //# sourceMappingURL=absoluteValueEquations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"absoluteValueEquations.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/absolute/absoluteValueEquations.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EAOb,MAAM,0BAA0B,CAAC;AASlC,KAAK,QAAQ,GAAG;IACd,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AACF,KAAK,QAAQ,GAAG,EAAE,CAAC;AA2CnB,eAAO,MAAM,sBAAsB,EAAE,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAWnE,CAAC"}
1
+ {"version":3,"file":"absoluteValueEquations.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/absolute/absoluteValueEquations.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAgEF,eAAO,MAAM,sBAAsB,EAAE,YAAY,CAAC,WAAW,CAa5D,CAAC"}
@@ -1,56 +1,74 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.absoluteValueEquations = void 0;
4
- const exercise_1 = require("../../../exercises/exercise");
5
- const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
- const polynomial_1 = require("../../../math/polynomials/polynomial");
7
- const randint_1 = require("../../../math/utils/random/randint");
8
- const coinFlip_1 = require("../../../utils/coinFlip");
9
- const probaFlip_1 = require("../../../utils/probaFlip");
10
- const getAbsoluteValueEquationsQuestion = () => {
11
- const poly = new polynomial_1.Polynomial([(0, randint_1.randint)(-9, 10, [0]), 1]);
12
- const a = (0, probaFlip_1.probaFlip)(0.9) ? (0, randint_1.randint)(1, 10) : (0, coinFlip_1.coinFlip)() ? 0 : (0, randint_1.randint)(-9, 0);
13
- //|x-b| = a
14
- const b = -poly.coefficients[0];
15
- const answer = a === 0 ? `S=\\left\\{${b}\\right\\}` : a < 0 ? `S=\\emptyset` : `S=\\left\\{${b - a};${b + a}\\right\\}`;
16
- const question = {
17
- answer: answer,
18
- instruction: `Résoudre l'équation $|${poly.toTree().toTex()}| = ${a}$.`,
19
- keys: ['S', 'equal', 'emptyset', 'lbrace', 'semicolon', 'rbrace'],
20
- answerFormat: 'tex',
21
- qcmGeneratorProps: { answer, a, b },
22
- };
23
- return question;
24
- };
25
- const getPropositions = (n, { answer, a, b }) => {
26
- const propositions = [];
27
- (0, exercise_1.addValidProp)(propositions, answer);
28
- if (a < 0) {
29
- (0, exercise_1.tryToAddWrongProp)(propositions, `S=\\left\\{${b - a};${b + a}\\right\\}`);
30
- (0, exercise_1.tryToAddWrongProp)(propositions, `S=\\left\\{${b + a}\\right\\}`);
31
- }
32
- else if (a === 0) {
33
- (0, exercise_1.tryToAddWrongProp)(propositions, `S=\\emptyset`);
34
- }
35
- else if (a > 0) {
36
- (0, exercise_1.tryToAddWrongProp)(propositions, `S=\\left\\{${b + a}\\right\\}`);
37
- (0, exercise_1.tryToAddWrongProp)(propositions, `S=\\left\\{${-b - a};${-b + a}\\right\\}`);
38
- }
39
- while (propositions.length < n) {
40
- const wrongAnswer = `S=\\left\\{${(0, randint_1.randint)(-9, 0)};${(0, randint_1.randint)(0, 10)}\\right\\}`;
41
- (0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer);
42
- }
43
- return (0, exercise_1.shuffleProps)(propositions, n);
44
- };
45
- exports.absoluteValueEquations = {
46
- id: 'absoluteValueEquation',
47
- connector: '\\iff',
48
- label: 'Résoudre une équation avec valeur absolue',
49
- levels: ['2nde', '1reESM'],
50
- isSingleStep: true,
51
- sections: ['Valeur absolue', 'Équations'],
52
- generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getAbsoluteValueEquationsQuestion, nb),
53
- qcmTimer: 60,
54
- freeTimer: 60,
55
- getPropositions,
56
- };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.absoluteValueEquations = void 0;
4
+ const exercise_1 = require("../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
+ const polynomial_1 = require("../../../math/polynomials/polynomial");
7
+ const randint_1 = require("../../../math/utils/random/randint");
8
+ const equationSolutionNode_1 = require("../../../tree/nodes/equations/equationSolutionNode");
9
+ const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
10
+ const discreteSetNode_1 = require("../../../tree/nodes/sets/discreteSetNode");
11
+ const coinFlip_1 = require("../../../utils/coinFlip");
12
+ const probaFlip_1 = require("../../../utils/probaFlip");
13
+ const getAbsoluteValueEquationsQuestion = () => {
14
+ const poly = new polynomial_1.Polynomial([(0, randint_1.randint)(-9, 10, [0]), 1]);
15
+ const a = (0, probaFlip_1.probaFlip)(0.9) ? (0, randint_1.randint)(1, 10) : (0, coinFlip_1.coinFlip)() ? 0 : (0, randint_1.randint)(-9, 0);
16
+ //|x-b| = a
17
+ const b = -poly.coefficients[0];
18
+ const answer = a === 0
19
+ ? `S=\\left\\{${b}\\right\\}`
20
+ : a < 0
21
+ ? `S=\\emptyset`
22
+ : `S=\\left\\{${b - a};${b + a}\\right\\}`;
23
+ const question = {
24
+ answer: answer,
25
+ instruction: `Résoudre l'équation $|${poly.toTree().toTex()}| = ${a}$.`,
26
+ keys: ["S", "equal", "emptyset", "lbrace", "semicolon", "rbrace"],
27
+ answerFormat: "tex",
28
+ identifiers: { a, b },
29
+ };
30
+ return question;
31
+ };
32
+ const getPropositions = (n, { answer, a, b }) => {
33
+ const propositions = [];
34
+ (0, exercise_1.addValidProp)(propositions, answer);
35
+ if (a < 0) {
36
+ (0, exercise_1.tryToAddWrongProp)(propositions, `S=\\left\\{${b - a};${b + a}\\right\\}`);
37
+ (0, exercise_1.tryToAddWrongProp)(propositions, `S=\\left\\{${b + a}\\right\\}`);
38
+ }
39
+ else if (a === 0) {
40
+ (0, exercise_1.tryToAddWrongProp)(propositions, `S=\\emptyset`);
41
+ }
42
+ else if (a > 0) {
43
+ (0, exercise_1.tryToAddWrongProp)(propositions, `S=\\left\\{${b + a}\\right\\}`);
44
+ (0, exercise_1.tryToAddWrongProp)(propositions, `S=\\left\\{${-b - a};${-b + a}\\right\\}`);
45
+ }
46
+ while (propositions.length < n) {
47
+ const wrongAnswer = `S=\\left\\{${(0, randint_1.randint)(-9, 0)};${(0, randint_1.randint)(0, 10)}\\right\\}`;
48
+ (0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer);
49
+ }
50
+ return (0, exercise_1.shuffleProps)(propositions, n);
51
+ };
52
+ const isAnswerValid = (ans, { a, b }) => {
53
+ const sols = a === 0
54
+ ? [new numberNode_1.NumberNode(b)]
55
+ : a < 0
56
+ ? []
57
+ : [new numberNode_1.NumberNode(b - a), new numberNode_1.NumberNode(b + a)];
58
+ const answer = new equationSolutionNode_1.EquationSolutionNode(new discreteSetNode_1.DiscreteSetNode(sols));
59
+ const texs = answer.toAllValidTexs();
60
+ return texs.includes(ans);
61
+ };
62
+ exports.absoluteValueEquations = {
63
+ id: "absoluteValueEquation",
64
+ connector: "\\iff",
65
+ label: "Résoudre une équation avec valeur absolue",
66
+ levels: ["2nde", "1reESM"],
67
+ isSingleStep: true,
68
+ sections: ["Valeur absolue", "Équations"],
69
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getAbsoluteValueEquationsQuestion, nb),
70
+ qcmTimer: 60,
71
+ freeTimer: 60,
72
+ getPropositions,
73
+ isAnswerValid,
74
+ };
@@ -1,10 +1,9 @@
1
- import { MathExercise } from '../../../exercises/exercise';
2
- type QCMProps = {
3
- answer: string;
4
- a: number;
5
- b: number;
6
- };
7
- type VEAProps = {};
8
- export declare const absoluteValueInequations: MathExercise<QCMProps, VEAProps>;
9
- export {};
1
+ import { MathExercise } from "../../../exercises/exercise";
2
+ type Identifiers = {
3
+ a: number;
4
+ b: number;
5
+ isStrict: boolean;
6
+ };
7
+ export declare const absoluteValueInequations: MathExercise<Identifiers>;
8
+ export {};
10
9
  //# sourceMappingURL=absoluteValueInequations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"absoluteValueInequations.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/absolute/absoluteValueInequations.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EAOb,MAAM,0BAA0B,CAAC;AAMlC,KAAK,QAAQ,GAAG;IACd,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AACF,KAAK,QAAQ,GAAG,EAAE,CAAC;AAiCnB,eAAO,MAAM,wBAAwB,EAAE,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAWrE,CAAC"}
1
+ {"version":3,"file":"absoluteValueInequations.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/absolute/absoluteValueInequations.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AA+DF,eAAO,MAAM,wBAAwB,EAAE,YAAY,CAAC,WAAW,CAa9D,CAAC"}
@@ -1,47 +1,69 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.absoluteValueInequations = void 0;
4
- const exercise_1 = require("../../../exercises/exercise");
5
- const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
- const polynomial_1 = require("../../../math/polynomials/polynomial");
7
- const randint_1 = require("../../../math/utils/random/randint");
8
- const coinFlip_1 = require("../../../utils/coinFlip");
9
- const getAbsoluteValueInequationsQuestion = () => {
10
- const poly = new polynomial_1.Polynomial([(0, randint_1.randint)(-9, 10, [0]), 1]);
11
- const a = (0, randint_1.randint)(1, 10);
12
- //|x-b| <= a
13
- const b = -poly.coefficients[0];
14
- const isStrict = (0, coinFlip_1.coinFlip)();
15
- const answer = isStrict ? `S=]${b - a};${b + a}[` : `S=[${b - a};${b + a}]`;
16
- const question = {
17
- answer,
18
- instruction: `Résoudre l'inéquation $|${poly.toTree().toTex()}|${isStrict ? '<' : '\\le'}${a}$.`,
19
- keys: ['S', 'equal', 'lbracket', 'semicolon', 'rbracket', 'emptyset'],
20
- answerFormat: 'tex',
21
- qcmGeneratorProps: { answer, a, b },
22
- };
23
- return question;
24
- };
25
- const getPropositions = (n, { answer, a, b }) => {
26
- const propositions = [];
27
- (0, exercise_1.addValidProp)(propositions, answer);
28
- (0, exercise_1.tryToAddWrongProp)(propositions, `S=]${b - a};${b + a}[`);
29
- (0, exercise_1.tryToAddWrongProp)(propositions, `S=[${b - a};${b + a}]`);
30
- (0, exercise_1.tryToAddWrongProp)(propositions, `S=\\left\\{${b - a};${b + a}\\right\\}`);
31
- while (propositions.length < n) {
32
- (0, exercise_1.tryToAddWrongProp)(propositions, `S=[${(0, randint_1.randint)(-9, 0)};${(0, randint_1.randint)(0, 10)}]`);
33
- }
34
- return (0, exercise_1.shuffleProps)(propositions, n);
35
- };
36
- exports.absoluteValueInequations = {
37
- id: 'absoluteValueInequations',
38
- connector: '\\iff',
39
- label: 'Résoudre une inéquation avec valeur absolue',
40
- levels: ['2nde', '1reESM'],
41
- isSingleStep: true,
42
- sections: ['Valeur absolue', 'Inéquations', 'Ensembles et intervalles'],
43
- generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getAbsoluteValueInequationsQuestion, nb),
44
- qcmTimer: 60,
45
- freeTimer: 60,
46
- getPropositions,
47
- };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.absoluteValueInequations = void 0;
4
+ const exercise_1 = require("../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
+ const polynomial_1 = require("../../../math/polynomials/polynomial");
7
+ const randint_1 = require("../../../math/utils/random/randint");
8
+ const inequationSolutionNode_1 = require("../../../tree/nodes/inequations/inequationSolutionNode");
9
+ const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
10
+ const intervalNode_1 = require("../../../tree/nodes/sets/intervalNode");
11
+ const coinFlip_1 = require("../../../utils/coinFlip");
12
+ const getAbsoluteValueInequationsQuestion = () => {
13
+ const poly = new polynomial_1.Polynomial([(0, randint_1.randint)(-9, 10, [0]), 1]);
14
+ const a = (0, randint_1.randint)(1, 10);
15
+ //|x-b| <= a
16
+ const b = -poly.coefficients[0];
17
+ const isStrict = (0, coinFlip_1.coinFlip)();
18
+ const answer = isStrict ? `S=]${b - a};${b + a}[` : `S=[${b - a};${b + a}]`;
19
+ const question = {
20
+ answer,
21
+ instruction: `Résoudre l'inéquation $|${poly.toTree().toTex()}|${isStrict ? "<" : "\\le"}${a}$.`,
22
+ keys: [
23
+ "S",
24
+ "equal",
25
+ "lbracket",
26
+ "semicolon",
27
+ "rbracket",
28
+ "emptyset",
29
+ "x",
30
+ "leq",
31
+ "geq",
32
+ "sup",
33
+ "inf",
34
+ ],
35
+ answerFormat: "tex",
36
+ identifiers: { a, b, isStrict },
37
+ };
38
+ return question;
39
+ };
40
+ const getPropositions = (n, { answer, a, b }) => {
41
+ const propositions = [];
42
+ (0, exercise_1.addValidProp)(propositions, answer);
43
+ (0, exercise_1.tryToAddWrongProp)(propositions, `S=]${b - a};${b + a}[`);
44
+ (0, exercise_1.tryToAddWrongProp)(propositions, `S=[${b - a};${b + a}]`);
45
+ (0, exercise_1.tryToAddWrongProp)(propositions, `S=\\left\\{${b - a};${b + a}\\right\\}`);
46
+ while (propositions.length < n) {
47
+ (0, exercise_1.tryToAddWrongProp)(propositions, `S=[${(0, randint_1.randint)(-9, 0)};${(0, randint_1.randint)(0, 10)}]`);
48
+ }
49
+ return (0, exercise_1.shuffleProps)(propositions, n);
50
+ };
51
+ const isAnswerValid = (ans, { a, b, isStrict }) => {
52
+ const answer = new inequationSolutionNode_1.InequationSolutionNode(new intervalNode_1.IntervalNode(new numberNode_1.NumberNode(b - a), new numberNode_1.NumberNode(b + a), isStrict ? intervalNode_1.ClosureType.OO : intervalNode_1.ClosureType.FF));
53
+ const texs = answer.toAllValidTexs();
54
+ console.log(texs);
55
+ return texs.includes(ans);
56
+ };
57
+ exports.absoluteValueInequations = {
58
+ id: "absoluteValueInequations",
59
+ connector: "\\iff",
60
+ label: "Résoudre une inéquation avec valeur absolue",
61
+ levels: ["2nde", "1reESM"],
62
+ isSingleStep: true,
63
+ sections: ["Valeur absolue", "Inéquations", "Ensembles et intervalles"],
64
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getAbsoluteValueInequationsQuestion, nb),
65
+ qcmTimer: 60,
66
+ freeTimer: 60,
67
+ getPropositions,
68
+ isAnswerValid,
69
+ };
@@ -0,0 +1,3 @@
1
+ export * from "./absoluteValueEquations";
2
+ export * from "./absoluteValueInequations";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/absolute/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./absoluteValueEquations"), exports);
18
+ __exportStar(require("./absoluteValueInequations"), exports);
@@ -0,0 +1,5 @@
1
+ export * from "./leadingCoefficient";
2
+ export * from "./leadingCoefficientCalculV1";
3
+ export * from "./leadingCoefficientCalculV2";
4
+ export * from "./signFunction";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/affines/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./leadingCoefficient"), exports);
18
+ __exportStar(require("./leadingCoefficientCalculV1"), exports);
19
+ __exportStar(require("./leadingCoefficientCalculV2"), exports);
20
+ __exportStar(require("./signFunction"), exports);
@@ -1,12 +1,10 @@
1
- import { MathExercise } from '../../../exercises/exercise';
2
- type QCMProps = {
3
- answer: string;
4
- xA: number;
5
- yA: number;
6
- xB: number;
7
- yB: number;
8
- };
9
- type VEAProps = {};
10
- export declare const leadingCoefficient: MathExercise<QCMProps, VEAProps>;
11
- export {};
1
+ import { MathExercise } from "../../../exercises/exercise";
2
+ type Identifiers = {
3
+ xA: number;
4
+ yA: number;
5
+ xB: number;
6
+ yB: number;
7
+ };
8
+ export declare const leadingCoefficient: MathExercise<Identifiers>;
9
+ export {};
12
10
  //# sourceMappingURL=leadingCoefficient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"leadingCoefficient.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/affines/leadingCoefficient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAOb,MAAM,0BAA0B,CAAC;AAUlC,KAAK,QAAQ,GAAG;IACd,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AACF,KAAK,QAAQ,GAAG,EAAE,CAAC;AAsEnB,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAW/D,CAAC"}
1
+ {"version":3,"file":"leadingCoefficient.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/affines/leadingCoefficient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AA8EF,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,WAAW,CAaxD,CAAC"}