math-exercises 3.0.214 → 3.0.215

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 (266) hide show
  1. package/lib/exercises/math/arithmetic/findLeftInHugeNumberDivision.d.ts +9 -0
  2. package/lib/exercises/math/arithmetic/findLeftInHugeNumberDivision.d.ts.map +1 -0
  3. package/lib/exercises/math/arithmetic/findLeftInHugeNumberDivision.js +194 -0
  4. package/lib/exercises/math/arithmetic/findMissingNumberToMakeNumberDivisibleBy9.d.ts +8 -0
  5. package/lib/exercises/math/arithmetic/findMissingNumberToMakeNumberDivisibleBy9.d.ts.map +1 -0
  6. package/lib/exercises/math/arithmetic/findMissingNumberToMakeNumberDivisibleBy9.js +121 -0
  7. package/lib/exercises/math/arithmetic/index.d.ts +7 -0
  8. package/lib/exercises/math/arithmetic/index.d.ts.map +1 -1
  9. package/lib/exercises/math/arithmetic/index.js +7 -0
  10. package/lib/exercises/math/arithmetic/isBigNumberPrime.d.ts +7 -0
  11. package/lib/exercises/math/arithmetic/isBigNumberPrime.d.ts.map +1 -0
  12. package/lib/exercises/math/arithmetic/isBigNumberPrime.js +107 -0
  13. package/lib/exercises/math/arithmetic/numberOfEndingZerosOfBigProduct.d.ts +8 -0
  14. package/lib/exercises/math/arithmetic/numberOfEndingZerosOfBigProduct.d.ts.map +1 -0
  15. package/lib/exercises/math/arithmetic/numberOfEndingZerosOfBigProduct.js +139 -0
  16. package/lib/exercises/math/arithmetic/pgcdFromEuclid.d.ts +8 -0
  17. package/lib/exercises/math/arithmetic/pgcdFromEuclid.d.ts.map +1 -0
  18. package/lib/exercises/math/arithmetic/pgcdFromEuclid.js +123 -0
  19. package/lib/exercises/math/arithmetic/solveDiophantianEquationByUsingPrimality.d.ts +7 -0
  20. package/lib/exercises/math/arithmetic/solveDiophantianEquationByUsingPrimality.d.ts.map +1 -0
  21. package/lib/exercises/math/arithmetic/solveDiophantianEquationByUsingPrimality.js +117 -0
  22. package/lib/exercises/math/arithmetic/whichDayInXDays.d.ts +8 -0
  23. package/lib/exercises/math/arithmetic/whichDayInXDays.d.ts.map +1 -0
  24. package/lib/exercises/math/arithmetic/whichDayInXDays.js +81 -0
  25. package/lib/exercises/math/calcul/fractions/fractionsSumFillInTheBlank.d.ts +15 -0
  26. package/lib/exercises/math/calcul/fractions/fractionsSumFillInTheBlank.d.ts.map +1 -0
  27. package/lib/exercises/math/calcul/fractions/fractionsSumFillInTheBlank.js +256 -0
  28. package/lib/exercises/math/calcul/fractions/index.d.ts +1 -0
  29. package/lib/exercises/math/calcul/fractions/index.d.ts.map +1 -1
  30. package/lib/exercises/math/calcul/fractions/index.js +1 -0
  31. package/lib/exercises/math/calcul/index.d.ts +1 -0
  32. package/lib/exercises/math/calcul/index.d.ts.map +1 -1
  33. package/lib/exercises/math/calcul/index.js +1 -0
  34. package/lib/exercises/math/calcul/mentalCaluls/index.d.ts +3 -0
  35. package/lib/exercises/math/calcul/mentalCaluls/index.d.ts.map +1 -1
  36. package/lib/exercises/math/calcul/mentalCaluls/index.js +3 -0
  37. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplication101AndFriends.d.ts +10 -0
  38. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplication101AndFriends.d.ts.map +1 -0
  39. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplication101AndFriends.js +264 -0
  40. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplication11AndFriends.d.ts +10 -0
  41. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplication11AndFriends.d.ts.map +1 -0
  42. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplication11AndFriends.js +264 -0
  43. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationTable.d.ts +11 -0
  44. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationTable.d.ts.map +1 -0
  45. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationTable.js +141 -0
  46. package/lib/exercises/math/calcul/ratio/index.d.ts +1 -0
  47. package/lib/exercises/math/calcul/ratio/index.d.ts.map +1 -1
  48. package/lib/exercises/math/calcul/ratio/index.js +1 -0
  49. package/lib/exercises/math/calcul/ratio/partsUsingRatio.d.ts +13 -0
  50. package/lib/exercises/math/calcul/ratio/partsUsingRatio.d.ts.map +1 -0
  51. package/lib/exercises/math/calcul/ratio/partsUsingRatio.js +237 -0
  52. package/lib/exercises/math/calcul/relatives/index.d.ts +2 -0
  53. package/lib/exercises/math/calcul/relatives/index.d.ts.map +1 -0
  54. package/lib/exercises/math/calcul/relatives/index.js +1 -0
  55. package/lib/exercises/math/calcul/relatives/relativesAddAndSub.d.ts +17 -0
  56. package/lib/exercises/math/calcul/relatives/relativesAddAndSub.d.ts.map +1 -0
  57. package/lib/exercises/math/calcul/relatives/relativesAddAndSub.js +448 -0
  58. package/lib/exercises/math/calculLitteral/factorisation/factoByXK.d.ts +10 -0
  59. package/lib/exercises/math/calculLitteral/factorisation/factoByXK.d.ts.map +1 -0
  60. package/lib/exercises/math/calculLitteral/factorisation/factoByXK.js +190 -0
  61. package/lib/exercises/math/calculLitteral/factorisation/index.d.ts +1 -0
  62. package/lib/exercises/math/calculLitteral/factorisation/index.d.ts.map +1 -1
  63. package/lib/exercises/math/calculLitteral/factorisation/index.js +1 -0
  64. package/lib/exercises/math/complex/algebraic/addComplex.d.ts +10 -0
  65. package/lib/exercises/math/complex/algebraic/addComplex.d.ts.map +1 -0
  66. package/lib/exercises/math/complex/algebraic/addComplex.js +125 -0
  67. package/lib/exercises/math/complex/algebraic/conjugateComplex.d.ts +8 -0
  68. package/lib/exercises/math/complex/algebraic/conjugateComplex.d.ts.map +1 -0
  69. package/lib/exercises/math/complex/algebraic/conjugateComplex.js +105 -0
  70. package/lib/exercises/math/complex/algebraic/conjugateDivideComplex.d.ts +8 -0
  71. package/lib/exercises/math/complex/algebraic/conjugateDivideComplex.d.ts.map +1 -0
  72. package/lib/exercises/math/complex/algebraic/conjugateDivideComplex.js +137 -0
  73. package/lib/exercises/math/complex/algebraic/conjugateMultiplyComplex.d.ts +8 -0
  74. package/lib/exercises/math/complex/algebraic/conjugateMultiplyComplex.d.ts.map +1 -0
  75. package/lib/exercises/math/complex/algebraic/conjugateMultiplyComplex.js +116 -0
  76. package/lib/exercises/math/complex/algebraic/divideComplex.d.ts +8 -0
  77. package/lib/exercises/math/complex/algebraic/divideComplex.d.ts.map +1 -0
  78. package/lib/exercises/math/complex/algebraic/divideComplex.js +128 -0
  79. package/lib/exercises/math/complex/algebraic/index.d.ts +11 -0
  80. package/lib/exercises/math/complex/algebraic/index.d.ts.map +1 -0
  81. package/lib/exercises/math/complex/algebraic/index.js +10 -0
  82. package/lib/exercises/math/complex/algebraic/inverseComplex.d.ts +8 -0
  83. package/lib/exercises/math/complex/algebraic/inverseComplex.d.ts.map +1 -0
  84. package/lib/exercises/math/complex/algebraic/inverseComplex.js +95 -0
  85. package/lib/exercises/math/complex/algebraic/linearCombinaisonComplex.d.ts +10 -0
  86. package/lib/exercises/math/complex/algebraic/linearCombinaisonComplex.d.ts.map +1 -0
  87. package/lib/exercises/math/complex/algebraic/linearCombinaisonComplex.js +105 -0
  88. package/lib/exercises/math/complex/algebraic/moduloFromAlgebraicComplex.d.ts +8 -0
  89. package/lib/exercises/math/complex/algebraic/moduloFromAlgebraicComplex.d.ts.map +1 -0
  90. package/lib/exercises/math/complex/algebraic/moduloFromAlgebraicComplex.js +93 -0
  91. package/lib/exercises/math/complex/algebraic/mutiplyComplex.d.ts +8 -0
  92. package/lib/exercises/math/complex/algebraic/mutiplyComplex.d.ts.map +1 -0
  93. package/lib/exercises/math/complex/algebraic/mutiplyComplex.js +106 -0
  94. package/lib/exercises/math/complex/algebraic/reAndIm.d.ts +9 -0
  95. package/lib/exercises/math/complex/algebraic/reAndIm.d.ts.map +1 -0
  96. package/lib/exercises/math/complex/algebraic/reAndIm.js +92 -0
  97. package/lib/exercises/math/complex/geometric/complexAlgebraicFromModuloAndArg.d.ts +9 -0
  98. package/lib/exercises/math/complex/geometric/complexAlgebraicFromModuloAndArg.d.ts.map +1 -0
  99. package/lib/exercises/math/complex/geometric/complexAlgebraicFromModuloAndArg.js +151 -0
  100. package/lib/exercises/math/complex/geometric/complexDistance.d.ts +11 -0
  101. package/lib/exercises/math/complex/geometric/complexDistance.d.ts.map +1 -0
  102. package/lib/exercises/math/complex/geometric/complexDistance.js +125 -0
  103. package/lib/exercises/math/complex/geometric/complexGeomAffixAlgFromPoint.d.ts +9 -0
  104. package/lib/exercises/math/complex/geometric/complexGeomAffixAlgFromPoint.d.ts.map +1 -0
  105. package/lib/exercises/math/complex/geometric/complexGeomAffixAlgFromPoint.js +326 -0
  106. package/lib/exercises/math/complex/geometric/complexGeomAffixExpFromCenteredRegularPolygon.d.ts +10 -0
  107. package/lib/exercises/math/complex/geometric/complexGeomAffixExpFromCenteredRegularPolygon.d.ts.map +1 -0
  108. package/lib/exercises/math/complex/geometric/complexGeomAffixExpFromCenteredRegularPolygon.js +459 -0
  109. package/lib/exercises/math/complex/geometric/complexGeomAffixExpFromPoint.d.ts +14 -0
  110. package/lib/exercises/math/complex/geometric/complexGeomAffixExpFromPoint.d.ts.map +1 -0
  111. package/lib/exercises/math/complex/geometric/complexGeomAffixExpFromPoint.js +539 -0
  112. package/lib/exercises/math/complex/geometric/complexGeomAffixTrigFromPoint.d.ts +13 -0
  113. package/lib/exercises/math/complex/geometric/complexGeomAffixTrigFromPoint.d.ts.map +1 -0
  114. package/lib/exercises/math/complex/geometric/complexGeomAffixTrigFromPoint.js +485 -0
  115. package/lib/exercises/math/complex/geometric/complexGeomApproxOfCosArgOrSinArgFromPointAndAffixTrig.d.ts +12 -0
  116. package/lib/exercises/math/complex/geometric/complexGeomApproxOfCosArgOrSinArgFromPointAndAffixTrig.d.ts.map +1 -0
  117. package/lib/exercises/math/complex/geometric/complexGeomApproxOfCosArgOrSinArgFromPointAndAffixTrig.js +224 -0
  118. package/lib/exercises/math/complex/geometric/complexGeomArgumentOfFracCBABFromFigure.d.ts +11 -0
  119. package/lib/exercises/math/complex/geometric/complexGeomArgumentOfFracCBABFromFigure.d.ts.map +1 -0
  120. package/lib/exercises/math/complex/geometric/complexGeomArgumentOfFracCBABFromFigure.js +448 -0
  121. package/lib/exercises/math/complex/geometric/complexGeomFindPointFromAffixExp.d.ts +11 -0
  122. package/lib/exercises/math/complex/geometric/complexGeomFindPointFromAffixExp.d.ts.map +1 -0
  123. package/lib/exercises/math/complex/geometric/complexGeomFindPointFromAffixExp.js +223 -0
  124. package/lib/exercises/math/complex/geometric/complexGeomFindPointFromPowerOfUnitRootFromFigure.d.ts +11 -0
  125. package/lib/exercises/math/complex/geometric/complexGeomFindPointFromPowerOfUnitRootFromFigure.d.ts.map +1 -0
  126. package/lib/exercises/math/complex/geometric/complexGeomFindPointFromPowerOfUnitRootFromFigure.js +348 -0
  127. package/lib/exercises/math/complex/geometric/complexGeomPlaceAffixPoint.d.ts +8 -0
  128. package/lib/exercises/math/complex/geometric/complexGeomPlaceAffixPoint.d.ts.map +1 -0
  129. package/lib/exercises/math/complex/geometric/complexGeomPlaceAffixPoint.js +86 -0
  130. package/lib/exercises/math/complex/geometric/complexGeomPlacePointFromZAPlusZ.d.ts +11 -0
  131. package/lib/exercises/math/complex/geometric/complexGeomPlacePointFromZAPlusZ.d.ts.map +1 -0
  132. package/lib/exercises/math/complex/geometric/complexGeomPlacePointFromZAPlusZ.js +311 -0
  133. package/lib/exercises/math/complex/geometric/complexGeomPlacePointFromZATimesZ.d.ts +11 -0
  134. package/lib/exercises/math/complex/geometric/complexGeomPlacePointFromZATimesZ.d.ts.map +1 -0
  135. package/lib/exercises/math/complex/geometric/complexGeomPlacePointFromZATimesZ.js +345 -0
  136. package/lib/exercises/math/complex/geometric/complexGeomPlacePointFromZATransformed.d.ts +16 -0
  137. package/lib/exercises/math/complex/geometric/complexGeomPlacePointFromZATransformed.d.ts.map +1 -0
  138. package/lib/exercises/math/complex/geometric/complexGeomPlacePointFromZATransformed.js +729 -0
  139. package/lib/exercises/math/complex/geometric/complexGeomPlacePointWithAffixInU.d.ts +11 -0
  140. package/lib/exercises/math/complex/geometric/complexGeomPlacePointWithAffixInU.d.ts.map +1 -0
  141. package/lib/exercises/math/complex/geometric/complexGeomPlacePointWithAffixInU.js +253 -0
  142. package/lib/exercises/math/complex/geometric/index.d.ts +12 -0
  143. package/lib/exercises/math/complex/geometric/index.d.ts.map +1 -0
  144. package/lib/exercises/math/complex/geometric/index.js +19 -0
  145. package/lib/exercises/math/complex/index.d.ts +4 -10
  146. package/lib/exercises/math/complex/index.d.ts.map +1 -1
  147. package/lib/exercises/math/complex/index.js +4 -11
  148. package/lib/exercises/math/complex/polynomials/factorizePolynomialInC.d.ts +10 -0
  149. package/lib/exercises/math/complex/polynomials/factorizePolynomialInC.d.ts.map +1 -0
  150. package/lib/exercises/math/complex/polynomials/factorizePolynomialInC.js +176 -0
  151. package/lib/exercises/math/complex/polynomials/index.d.ts +4 -0
  152. package/lib/exercises/math/complex/polynomials/index.d.ts.map +1 -0
  153. package/lib/exercises/math/complex/polynomials/index.js +3 -0
  154. package/lib/exercises/math/complex/polynomials/solveSecondDegreeInComplex.d.ts +10 -0
  155. package/lib/exercises/math/complex/polynomials/solveSecondDegreeInComplex.d.ts.map +1 -0
  156. package/lib/exercises/math/complex/polynomials/solveSecondDegreeInComplex.js +190 -0
  157. package/lib/exercises/math/complex/polynomials/solveZSquareEqualsA.d.ts +11 -0
  158. package/lib/exercises/math/complex/polynomials/solveZSquareEqualsA.d.ts.map +1 -0
  159. package/lib/exercises/math/complex/polynomials/solveZSquareEqualsA.js +158 -0
  160. package/lib/exercises/math/complex/unitRoots/giveNUnitRoot.d.ts +7 -0
  161. package/lib/exercises/math/complex/unitRoots/giveNUnitRoot.d.ts.map +1 -0
  162. package/lib/exercises/math/complex/unitRoots/giveNUnitRoot.js +122 -0
  163. package/lib/exercises/math/complex/unitRoots/giveOneSolutionToComplexPowNEqualsOne.d.ts +8 -0
  164. package/lib/exercises/math/complex/unitRoots/giveOneSolutionToComplexPowNEqualsOne.d.ts.map +1 -0
  165. package/lib/exercises/math/complex/unitRoots/giveOneSolutionToComplexPowNEqualsOne.js +138 -0
  166. package/lib/exercises/math/complex/unitRoots/index.d.ts +3 -0
  167. package/lib/exercises/math/complex/unitRoots/index.d.ts.map +1 -0
  168. package/lib/exercises/math/complex/unitRoots/index.js +2 -0
  169. package/lib/exercises/math/conversion/clock/clockReading.d.ts +12 -0
  170. package/lib/exercises/math/conversion/clock/clockReading.d.ts.map +1 -0
  171. package/lib/exercises/math/conversion/clock/clockReading.js +385 -0
  172. package/lib/exercises/math/conversion/clock/clockReadingPlusTimeOperation.d.ts +2 -0
  173. package/lib/exercises/math/conversion/clock/clockReadingPlusTimeOperation.d.ts.map +1 -0
  174. package/lib/exercises/math/conversion/clock/clockReadingPlusTimeOperation.js +521 -0
  175. package/lib/exercises/math/conversion/clock/clockWritingByManipulatingNeedles.d.ts +2 -0
  176. package/lib/exercises/math/conversion/clock/clockWritingByManipulatingNeedles.d.ts.map +1 -0
  177. package/lib/exercises/math/conversion/clock/clockWritingByManipulatingNeedles.js +359 -0
  178. package/lib/exercises/math/conversion/clock/dateTimeOperationAdd.d.ts +16 -0
  179. package/lib/exercises/math/conversion/clock/dateTimeOperationAdd.d.ts.map +1 -0
  180. package/lib/exercises/math/conversion/clock/dateTimeOperationAdd.js +319 -0
  181. package/lib/exercises/math/conversion/clock/index.d.ts +3 -0
  182. package/lib/exercises/math/conversion/clock/index.d.ts.map +1 -0
  183. package/lib/exercises/math/conversion/clock/index.js +4 -0
  184. package/lib/exercises/math/conversion/index.d.ts +1 -0
  185. package/lib/exercises/math/conversion/index.d.ts.map +1 -1
  186. package/lib/exercises/math/conversion/index.js +1 -0
  187. package/lib/exercises/math/geometry/angles/angleNatureFromFigure.d.ts +11 -0
  188. package/lib/exercises/math/geometry/angles/angleNatureFromFigure.d.ts.map +1 -0
  189. package/lib/exercises/math/geometry/angles/angleNatureFromFigure.js +233 -0
  190. package/lib/exercises/math/geometry/angles/angleNatureFromMeasure.d.ts +10 -0
  191. package/lib/exercises/math/geometry/angles/angleNatureFromMeasure.d.ts.map +1 -0
  192. package/lib/exercises/math/geometry/angles/angleNatureFromMeasure.js +137 -0
  193. package/lib/exercises/math/geometry/angles/index.d.ts +2 -0
  194. package/lib/exercises/math/geometry/angles/index.d.ts.map +1 -1
  195. package/lib/exercises/math/geometry/angles/index.js +2 -0
  196. package/lib/exercises/math/geometry/circles/buildCircleFromRadius.d.ts +9 -0
  197. package/lib/exercises/math/geometry/circles/buildCircleFromRadius.d.ts.map +1 -0
  198. package/lib/exercises/math/geometry/circles/buildCircleFromRadius.js +187 -0
  199. package/lib/exercises/math/geometry/circles/index.d.ts +1 -0
  200. package/lib/exercises/math/geometry/circles/index.d.ts.map +1 -1
  201. package/lib/exercises/math/geometry/circles/index.js +1 -0
  202. package/lib/exercises/math/geometry/lines/buildParallelFromLineAndPoint.d.ts +11 -0
  203. package/lib/exercises/math/geometry/lines/buildParallelFromLineAndPoint.d.ts.map +1 -0
  204. package/lib/exercises/math/geometry/lines/buildParallelFromLineAndPoint.js +154 -0
  205. package/lib/exercises/math/geometry/lines/buildPerpendicularFromLineAndPoint.d.ts +11 -0
  206. package/lib/exercises/math/geometry/lines/buildPerpendicularFromLineAndPoint.d.ts.map +1 -0
  207. package/lib/exercises/math/geometry/lines/buildPerpendicularFromLineAndPoint.js +157 -0
  208. package/lib/exercises/math/geometry/lines/index.d.ts +2 -0
  209. package/lib/exercises/math/geometry/lines/index.d.ts.map +1 -1
  210. package/lib/exercises/math/geometry/lines/index.js +2 -0
  211. package/lib/exercises/math/geometry/triangles/index.d.ts +2 -0
  212. package/lib/exercises/math/geometry/triangles/index.d.ts.map +1 -1
  213. package/lib/exercises/math/geometry/triangles/index.js +2 -1
  214. package/lib/exercises/math/geometry/triangles/traceHeightInTriangle.d.ts +13 -0
  215. package/lib/exercises/math/geometry/triangles/traceHeightInTriangle.d.ts.map +1 -0
  216. package/lib/exercises/math/geometry/triangles/traceHeightInTriangle.js +271 -0
  217. package/lib/exercises/math/geometry/triangles/traceMedianInTriangle.d.ts +8 -0
  218. package/lib/exercises/math/geometry/triangles/traceMedianInTriangle.d.ts.map +1 -1
  219. package/lib/exercises/math/geometry/triangles/traceMedianInTriangle.js +284 -53
  220. package/lib/exercises/math/geometry/vectors/constructions/index.d.ts +1 -0
  221. package/lib/exercises/math/geometry/vectors/constructions/index.d.ts.map +1 -1
  222. package/lib/exercises/math/geometry/vectors/constructions/index.js +1 -0
  223. package/lib/exercises/math/geometry/vectors/constructions/traceVectorSumFromVecs.d.ts +8 -0
  224. package/lib/exercises/math/geometry/vectors/constructions/traceVectorSumFromVecs.d.ts.map +1 -0
  225. package/lib/exercises/math/geometry/vectors/constructions/traceVectorSumFromVecs.js +165 -0
  226. package/lib/exercises/math/geometry/volumes/index.d.ts +1 -0
  227. package/lib/exercises/math/geometry/volumes/index.d.ts.map +1 -1
  228. package/lib/exercises/math/geometry/volumes/index.js +1 -0
  229. package/lib/exercises/math/geometry/volumes/volumeOfCylinder.d.ts +8 -0
  230. package/lib/exercises/math/geometry/volumes/volumeOfCylinder.d.ts.map +1 -0
  231. package/lib/exercises/math/geometry/volumes/volumeOfCylinder.js +157 -0
  232. package/lib/exercises/math/spaceGeometry/basis/index.d.ts +1 -0
  233. package/lib/exercises/math/spaceGeometry/basis/index.d.ts.map +1 -1
  234. package/lib/exercises/math/spaceGeometry/basis/index.js +1 -0
  235. package/lib/exercises/math/spaceGeometry/basis/spaceSegmentLengthInRectangularPrism.d.ts +18 -0
  236. package/lib/exercises/math/spaceGeometry/basis/spaceSegmentLengthInRectangularPrism.d.ts.map +1 -0
  237. package/lib/exercises/math/spaceGeometry/basis/spaceSegmentLengthInRectangularPrism.js +538 -0
  238. package/lib/exercises/math/trigonometry/formulas/trigoAdditionFormulaUsage.d.ts.map +1 -1
  239. package/lib/exercises/math/trigonometry/formulas/trigoAdditionFormulaUsage.js +6 -5
  240. package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaCalcul.js +1 -1
  241. package/lib/exercises/utils/geogebra/toolBarConstructor.d.ts +1 -0
  242. package/lib/exercises/utils/geogebra/toolBarConstructor.d.ts.map +1 -1
  243. package/lib/exercises/utils/geogebra/toolBarConstructor.js +2 -0
  244. package/lib/geogebra/parsers/geogebraParser.d.ts +3 -0
  245. package/lib/geogebra/parsers/geogebraParser.d.ts.map +1 -1
  246. package/lib/geogebra/parsers/geogebraParser.js +27 -0
  247. package/lib/index.d.ts +213 -23
  248. package/lib/index.d.ts.map +1 -1
  249. package/lib/latexTester.js +2 -0
  250. package/lib/math/geometry/angle.d.ts.map +1 -1
  251. package/lib/math/geometry/angle.js +3 -0
  252. package/lib/math/geometry/segment.d.ts +1 -1
  253. package/lib/math/geometry/segment.d.ts.map +1 -1
  254. package/lib/math/geometry/segment.js +5 -2
  255. package/lib/math/utils/geometry/angleBetweenPoints.d.ts +4 -0
  256. package/lib/math/utils/geometry/angleBetweenPoints.d.ts.map +1 -0
  257. package/lib/math/utils/geometry/angleBetweenPoints.js +58 -0
  258. package/lib/math/utils/geometry/angleNWSE.d.ts +3 -0
  259. package/lib/math/utils/geometry/angleNWSE.d.ts.map +1 -0
  260. package/lib/math/utils/geometry/angleNWSE.js +56 -0
  261. package/lib/tests/singleExo.test.d.ts.map +1 -1
  262. package/lib/tests/singleExo.test.js +2 -2
  263. package/lib/utils/strings/frenchDays.d.ts +2 -0
  264. package/lib/utils/strings/frenchDays.d.ts.map +1 -0
  265. package/lib/utils/strings/frenchDays.js +9 -0
  266. package/package.json +1 -1
@@ -0,0 +1,141 @@
1
+ import { GeneratorOptionTarget, GeneratorOptionType, addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { defaultArrayedOptsWhereNeeded } from "../../../../exercises/utils/options/arrayedOptions.js";
4
+ import { NumberNode } from "../../../../tree/nodes/numbers/numberNode.js";
5
+ import { MultiplyNode } from "../../../../tree/nodes/operators/multiplyNode.js";
6
+ import { operatorComposition } from "../../../../tree/utilities/operatorComposition.js";
7
+ import { random } from "../../../../utils/alea/random.js";
8
+ import { shuffle } from "../../../../utils/alea/shuffle.js";
9
+ import { alignTex } from "../../../../utils/latex/alignTex.js";
10
+ const getInstruction = (identifiers) => {
11
+ return `Calculer :
12
+
13
+ $$
14
+ ${getStartStatement(identifiers)}
15
+ $$`;
16
+ };
17
+ const getStartStatement = (identifiers) => {
18
+ return getStatementNode(identifiers).toTex();
19
+ };
20
+ const getStatementNode = (identifiers) => {
21
+ const { numbers } = identifiers;
22
+ return operatorComposition(MultiplyNode, numbers.map((e) => e.toTree()));
23
+ };
24
+ const getAnswer = (identifiers) => {
25
+ const statement = getStatementNode(identifiers);
26
+ return statement.simplify().toTex();
27
+ };
28
+ const getHint = (identifiers) => {
29
+ const { numbers } = identifiers;
30
+ const [number1, number2] = numbers;
31
+ return `Voici le début de la table de $${number2.frenchify()}$ :
32
+
33
+ ${alignTex([...new Array(number1).keys()].map((v) => [
34
+ `${v} \\times ${number2}`,
35
+ (v * number2).frenchify(),
36
+ ]))}
37
+
38
+ `;
39
+ };
40
+ const getCorrection = (identifiers) => {
41
+ const { numbers } = identifiers;
42
+ const [_, number2] = numbers;
43
+ return `Voici la table de $${number2.frenchify()}$ :
44
+
45
+ ${alignTex([...new Array(12).keys()].map((v) => [
46
+ `${v} \\times ${number2}`,
47
+ (v * number2).frenchify(),
48
+ ]))}
49
+
50
+ `;
51
+ };
52
+ const getPropositions = (n, { answer, ...identifiers }) => {
53
+ const { numbers: [number1, number2], } = identifiers;
54
+ const propositions = [];
55
+ addValidProp(propositions, answer);
56
+ const poolWrong1 = [
57
+ [number1 - 1, number2],
58
+ [number1, number2 - 1],
59
+ [number1 + 1, number2],
60
+ [number1, number2 + 1],
61
+ ].map(([number1Wrong, number2Wrong]) => number1Wrong * number2Wrong);
62
+ const poolWrong2 = (() => {
63
+ const vProduct = number1 * number2;
64
+ return [
65
+ ...[...Array(5).keys()].map((i) => -i - 1),
66
+ ...[...Array(5).keys()].map((i) => +i + 1),
67
+ ]
68
+ .map((vOffset) => vProduct + vOffset)
69
+ .filter((v) => v >= 1);
70
+ })();
71
+ shuffle([...poolWrong1, ...poolWrong2]).forEach((v) => {
72
+ tryToAddWrongProp(propositions, v.frenchify());
73
+ });
74
+ return shuffleProps(propositions, n);
75
+ };
76
+ const isAnswerValid = (studentAns, { answer }) => {
77
+ const answerTree = new NumberNode(Number(answer.replace(",", ".")));
78
+ const texs = answerTree.toAllValidTexs();
79
+ return texs.includes(studentAns);
80
+ };
81
+ const getMentalMultiplicationTableQuestion = (optsIn) => {
82
+ const arrayedOptions = defaultArrayedOptsWhereNeeded(optsIn, arrayedOptsDefault);
83
+ const [number1, number2] = [
84
+ arrayedOptions.number1Pool,
85
+ arrayedOptions.number2Pool,
86
+ ].map((numberPool) => random(numberPool.map((str) => parseInt(str))));
87
+ const identifiers = { numbers: [number1, number2] };
88
+ return getQuestionFromIdentifiers(identifiers);
89
+ };
90
+ const getQuestionFromIdentifiers = (identifiers) => {
91
+ const question = {
92
+ instruction: getInstruction(identifiers),
93
+ startStatement: getStartStatement(identifiers),
94
+ answer: getAnswer(identifiers),
95
+ keys: [],
96
+ answerFormat: "tex",
97
+ identifiers,
98
+ hint: getHint(identifiers),
99
+ correction: getCorrection(identifiers),
100
+ };
101
+ return question;
102
+ };
103
+ const arrayedOptsDefault = {
104
+ number1Pool: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map((v) => v.frenchify()),
105
+ number2Pool: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map((v) => v.frenchify()),
106
+ };
107
+ const options = [
108
+ {
109
+ id: "number1Pool",
110
+ label: "Valeurs possible pour le premier nombre",
111
+ defaultValue: arrayedOptsDefault.number1Pool,
112
+ values: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map((v) => v.frenchify()),
113
+ target: GeneratorOptionTarget.generation,
114
+ type: GeneratorOptionType.multiselect,
115
+ },
116
+ {
117
+ id: "number2Pool",
118
+ label: "Valeurs possible pour le deuxième nombre",
119
+ defaultValue: arrayedOptsDefault.number2Pool,
120
+ values: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map((v) => v.frenchify()),
121
+ target: GeneratorOptionTarget.generation,
122
+ type: GeneratorOptionType.multiselect,
123
+ },
124
+ ];
125
+ export const mentalMultiplicationTable = {
126
+ id: "mentalMultiplicationTable",
127
+ connector: "=",
128
+ label: "Tables de multiplication de $2$ à $12$",
129
+ isSingleStep: true,
130
+ generator: (nb, opts) => getDistinctQuestions(() => getMentalMultiplicationTableQuestion(opts), nb),
131
+ options,
132
+ qcmTimer: 60,
133
+ freeTimer: 60,
134
+ getPropositions,
135
+ isAnswerValid,
136
+ subject: "Mathématiques",
137
+ getQuestionFromIdentifiers,
138
+ getHint,
139
+ getCorrection,
140
+ hasHintAndCorrection: true,
141
+ };
@@ -1,2 +1,3 @@
1
1
  export * from "./partUsingRatio.js";
2
+ export * from "./partsUsingRatio.js";
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ratio/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ratio/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AAEpC,cAAc,sBAAsB,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from "./partUsingRatio.js";
2
2
  // export * from "./ratioFromParts.js"; //erreur à fix
3
+ export * from "./partsUsingRatio.js";
@@ -0,0 +1,13 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ ratioType: string;
4
+ situationIndex: number;
5
+ total: number;
6
+ ratio: number[];
7
+ };
8
+ type Options = {
9
+ ratioTypes: string[];
10
+ };
11
+ export declare const partsUsingRatio: Exercise<Identifiers, Options>;
12
+ export {};
13
+ //# sourceMappingURL=partsUsingRatio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"partsUsingRatio.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ratio/partsUsingRatio.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAmCrC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAiPF,KAAK,OAAO,GAAG;IACb,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAiBF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAkB1D,CAAC"}
@@ -0,0 +1,237 @@
1
+ import { shuffleProps, GeneratorOptionType, GeneratorOptionTarget, tryToAddWrongProp, addValidProp, propWhile, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { primes } from "../../../../math/numbers/integer/primes.js";
4
+ import { randint } from "../../../../math/utils/random/randint.js";
5
+ import { round } from "../../../../math/utils/round.js";
6
+ import { add } from "../../../../tree/nodes/operators/addNode.js";
7
+ import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
8
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
9
+ import { substract } from "../../../../tree/nodes/operators/substractNode.js";
10
+ import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
11
+ import { probaLawFlip } from "../../../../utils/alea/probaLawFlip.js";
12
+ import { random, randomMany } from "../../../../utils/alea/random.js";
13
+ import { shuffle } from "../../../../utils/alea/shuffle.js";
14
+ const getStrRatio = (ratio) => {
15
+ return `${ratio.join(" : ")}`;
16
+ };
17
+ const getHydrated = (total, ratio) => {
18
+ const denNode = ratio
19
+ .map((v) => v.toTree())
20
+ .reduce((acc, x) => add(acc, x));
21
+ const arrFractionNode = ratio.map((ratio) => frac(ratio, denNode));
22
+ const arrShares = arrFractionNode.map((nodeFraction) => multiply(nodeFraction, total).simplify());
23
+ return {
24
+ denNode,
25
+ arrFractionNode,
26
+ arrShares,
27
+ };
28
+ };
29
+ const situations = ["€", "cL", "bonbons", "pommes", "frites"].map((strUnit) => {
30
+ return {
31
+ instruction: (total, ratio) => `Répartir $${total}$ ${strUnit} suivant le ratio $${getStrRatio(ratio)}$. Séparer chaque part par un point virgule (;).`,
32
+ correction: (total, ratio) => {
33
+ const { denNode, arrFractionNode } = getHydrated(total, ratio);
34
+ return `Le ratio est $${getStrRatio(ratio)}$.
35
+
36
+ On calcule :
37
+
38
+ $$
39
+ ${ratio.reduce((acc, v, i) => (i === 0 ? `${v}` : `${acc} + ${v}`), "")} = ${denNode.simplify().toTex()}
40
+ $$
41
+
42
+ Les fractions correspondantes sont :
43
+
44
+ $$
45
+ ${arrFractionNode
46
+ .map((nodeFraction) => nodeFraction.simplify().toTex())
47
+ .join(";")}
48
+ $$
49
+
50
+ Les parts sont donc (en ${strUnit}) :
51
+
52
+ $$
53
+ ${arrFractionNode
54
+ .map((nodeFraction) => multiply(nodeFraction.simplify(), total).toTex())
55
+ .join(";")}
56
+ $$
57
+
58
+ autrement dit :
59
+
60
+ $$
61
+ ${arrFractionNode
62
+ .map((nodeFraction) => `${multiply(nodeFraction.simplify(), total).simplify().toTex()}`)
63
+ .join(" ; ")}
64
+ $$
65
+
66
+
67
+ `;
68
+ },
69
+ randValues: (ratioType) => {
70
+ switch (ratioType) {
71
+ case "2": {
72
+ const primePool = primes.filter((n) => 1 < n && n < 17);
73
+ const indexPrime1 = randint(0, primePool.length - 2);
74
+ const [num1, num2] = shuffle([
75
+ primePool[indexPrime1],
76
+ primePool[indexPrime1 + randint(1, 3)],
77
+ ]);
78
+ const divisor = num1 + num2;
79
+ const total = randint(2, 10) * divisor;
80
+ return {
81
+ ratio: [num1, num2],
82
+ total,
83
+ };
84
+ }
85
+ case "3": {
86
+ const [num1, num2, num3] = randomMany(primes.filter((n) => 1 < n && n < 17), 3);
87
+ const divisor = num1 + num2 + num3;
88
+ const total = randint(2, 6) * divisor;
89
+ return {
90
+ ratio: [num1, num2, num3],
91
+ total,
92
+ };
93
+ }
94
+ default:
95
+ throw new Error("Unsupported ratioType: " + ratioType);
96
+ }
97
+ },
98
+ };
99
+ });
100
+ const getInstruction = (identifiers) => {
101
+ const { situationIndex, total, ratio } = identifiers;
102
+ const situation = situations[situationIndex];
103
+ return situation.instruction(total, ratio);
104
+ };
105
+ const getAnswer = (identifiers) => {
106
+ const { ratio, total } = identifiers;
107
+ const { arrShares } = getHydrated(total, ratio);
108
+ return `${arrShares.map((node) => node.toTex()).join(";")}`;
109
+ };
110
+ const getHint = () => {
111
+ return `Cherche à quelle fraction du total correspond chaque part, puis multiplie chaque fraction par le total pour chaque part.`;
112
+ };
113
+ const getCorrection = (identifiers) => {
114
+ const { situationIndex, total, ratio } = identifiers;
115
+ const situation = situations[situationIndex];
116
+ return situation.correction(total, ratio);
117
+ };
118
+ const getPropositions = (n, { answer, ...identifiers }) => {
119
+ const { ratio, total } = identifiers;
120
+ const propositions = [];
121
+ addValidProp(propositions, answer);
122
+ const { arrShares } = getHydrated(total, ratio);
123
+ //student: ratio -> percentage
124
+ {
125
+ const arrSharesWrong = ratio.map((v) => {
126
+ const fractionNode = frac(v, 100);
127
+ const nodeWrong = round(multiply(fractionNode, total).simplify().evaluate(), 0).toTree();
128
+ return nodeWrong;
129
+ });
130
+ tryToAddWrongProp(propositions, arrSharesWrong.map((node) => node.toTex()).join(";"));
131
+ }
132
+ //random around
133
+ propWhile(propositions, n, () => {
134
+ const arrSharesWrong = arrShares.reduce((acc, node, i, arr) => {
135
+ const texShare = node.toTex();
136
+ const nodeShareWrong = (() => {
137
+ if (!acc.dictReplacement[texShare]) {
138
+ if (i !== arr.length - 1) {
139
+ const smallV = round(node.evaluate() * 0.2, 0);
140
+ const vOffset = randint(-smallV, smallV);
141
+ const nodeShareWrong = add(node, vOffset).simplify();
142
+ acc.dictReplacement[texShare] = nodeShareWrong;
143
+ return nodeShareWrong;
144
+ }
145
+ else {
146
+ const sumPrev = Object.values(acc.dictReplacement).reduce((acc, node) => add(acc, node).simplify());
147
+ const nodeShareWrong = probaLawFlip([
148
+ [substract(total, sumPrev), 0.78],
149
+ [substract(total + randint(-9, 10, [0]), sumPrev), 0.15],
150
+ [substract(total + random([-10, 10]), sumPrev), 0.07],
151
+ ]);
152
+ return nodeShareWrong.simplify();
153
+ }
154
+ }
155
+ else {
156
+ return acc.dictReplacement[texShare];
157
+ }
158
+ })();
159
+ acc.arrSharesWrong.push(nodeShareWrong);
160
+ return acc;
161
+ }, {
162
+ arrSharesWrong: [],
163
+ dictReplacement: {},
164
+ }).arrSharesWrong;
165
+ tryToAddWrongProp(propositions, arrSharesWrong.map((node) => node.toTex()).join(";"));
166
+ });
167
+ return shuffleProps(propositions, n);
168
+ };
169
+ const getKeys = () => {
170
+ return ["semicolon"];
171
+ };
172
+ const isAnswerValid = (ans, { answer }) => {
173
+ try {
174
+ const [nodeAns, nodeAnswer] = [ans, answer].map((str) => parseAlgebraic(str));
175
+ return substract(nodeAns, nodeAnswer).simplify().evaluate() === 0;
176
+ }
177
+ catch (_) {
178
+ return false;
179
+ }
180
+ };
181
+ const getParstUsingRatioQuestion = (optsIn) => {
182
+ const opts = optsIn ?? optsDefault;
183
+ const ratioType = random(opts.ratioTypes);
184
+ const situationIndex = randint(0, situations.length);
185
+ const situation = situations[situationIndex];
186
+ const { total, ratio } = situation.randValues(ratioType);
187
+ const identifiers = {
188
+ ratioType,
189
+ situationIndex,
190
+ total,
191
+ ratio,
192
+ };
193
+ return getQuestionFromIdentifiers(identifiers, opts);
194
+ };
195
+ const getQuestionFromIdentifiers = (identifiers, options) => {
196
+ return {
197
+ answer: getAnswer(identifiers, options),
198
+ instruction: getInstruction(identifiers, options),
199
+ keys: getKeys(identifiers, options),
200
+ answerFormat: "tex",
201
+ identifiers,
202
+ hint: getHint(identifiers, options),
203
+ correction: getCorrection(identifiers, options),
204
+ options,
205
+ };
206
+ };
207
+ const options = [
208
+ {
209
+ id: "ratioTypes",
210
+ label: "Longueur du ratio",
211
+ type: GeneratorOptionType.multiselect,
212
+ target: GeneratorOptionTarget.generation,
213
+ values: ["2", "3"],
214
+ defaultValue: ["2", "3"],
215
+ },
216
+ ];
217
+ const optsDefault = {
218
+ ratioTypes: ["2", "3"],
219
+ };
220
+ export const partsUsingRatio = {
221
+ id: "partsUsingRatio",
222
+ label: "Partager une valeur selon un ratio donné",
223
+ isSingleStep: true,
224
+ generator: (nb, opts) => getDistinctQuestions(() => getParstUsingRatioQuestion(opts), nb),
225
+ options,
226
+ qcmTimer: 60,
227
+ freeTimer: 60,
228
+ getPropositions,
229
+ subject: "Mathématiques",
230
+ getInstruction,
231
+ getHint,
232
+ getCorrection,
233
+ getAnswer,
234
+ getQuestionFromIdentifiers,
235
+ hasHintAndCorrection: true,
236
+ isAnswerValid,
237
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./relativesAddAndSub.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/relatives/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "./relativesAddAndSub.js";
@@ -0,0 +1,17 @@
1
+ import { Exercise } from "../../../exercise.js";
2
+ /**
3
+ * (±a)±(±b)
4
+ */
5
+ type Identifiers = {
6
+ a: number;
7
+ b: number;
8
+ opType: string;
9
+ explicitWriting: boolean;
10
+ };
11
+ type Options = {
12
+ explicitWriting: string;
13
+ opType: string;
14
+ };
15
+ export declare const relativesAddAndSub: Exercise<Identifiers, Options>;
16
+ export {};
17
+ //# sourceMappingURL=relativesAddAndSub.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relativesAddAndSub.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/relatives/relativesAddAndSub.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,QAAQ,EAmBT,MAAM,sBAAsB,CAAC;AAE9B;;GAEG;AAEH,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AA4ZF,KAAK,OAAO,GAAG;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAmCF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAkB7D,CAAC"}