math-exercises 3.0.72 → 3.0.74

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 (239) hide show
  1. package/lib/exercises/exercise.d.ts +3 -1
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/math/calcul/arithmetics/divisorsList.d.ts.map +1 -1
  4. package/lib/exercises/math/calcul/arithmetics/divisorsList.js +37 -2
  5. package/lib/exercises/math/calcul/arithmetics/getParityBetweenTwoNumbers.d.ts +9 -0
  6. package/lib/exercises/math/calcul/arithmetics/getParityBetweenTwoNumbers.d.ts.map +1 -0
  7. package/lib/exercises/math/calcul/arithmetics/getParityBetweenTwoNumbers.js +114 -0
  8. package/lib/exercises/math/calcul/arithmetics/imageOfSquareFunction.d.ts +8 -0
  9. package/lib/exercises/math/calcul/arithmetics/imageOfSquareFunction.d.ts.map +1 -0
  10. package/lib/exercises/math/calcul/arithmetics/imageOfSquareFunction.js +152 -0
  11. package/lib/exercises/math/calcul/arithmetics/index.d.ts +11 -0
  12. package/lib/exercises/math/calcul/arithmetics/index.d.ts.map +1 -1
  13. package/lib/exercises/math/calcul/arithmetics/index.js +11 -0
  14. package/lib/exercises/math/calcul/arithmetics/isInequalityTrue.d.ts +15 -0
  15. package/lib/exercises/math/calcul/arithmetics/isInequalityTrue.d.ts.map +1 -0
  16. package/lib/exercises/math/calcul/arithmetics/isInequalityTrue.js +143 -0
  17. package/lib/exercises/math/calcul/arithmetics/isMultipleOrDivisor.d.ts +9 -0
  18. package/lib/exercises/math/calcul/arithmetics/isMultipleOrDivisor.d.ts.map +1 -0
  19. package/lib/exercises/math/calcul/arithmetics/isMultipleOrDivisor.js +123 -0
  20. package/lib/exercises/math/calcul/arithmetics/isPointOnCubicFunction.d.ts +9 -0
  21. package/lib/exercises/math/calcul/arithmetics/isPointOnCubicFunction.d.ts.map +1 -0
  22. package/lib/exercises/math/calcul/arithmetics/isPointOnCubicFunction.js +111 -0
  23. package/lib/exercises/math/calcul/arithmetics/isPointOnFunction.d.ts +10 -0
  24. package/lib/exercises/math/calcul/arithmetics/isPointOnFunction.d.ts.map +1 -0
  25. package/lib/exercises/math/calcul/arithmetics/isPointOnFunction.js +133 -0
  26. package/lib/exercises/math/calcul/arithmetics/isPointOnReciprocalFunction.d.ts +9 -0
  27. package/lib/exercises/math/calcul/arithmetics/isPointOnReciprocalFunction.d.ts.map +1 -0
  28. package/lib/exercises/math/calcul/arithmetics/isPointOnReciprocalFunction.js +117 -0
  29. package/lib/exercises/math/calcul/arithmetics/minNumberInequality.d.ts +13 -0
  30. package/lib/exercises/math/calcul/arithmetics/minNumberInequality.d.ts.map +1 -0
  31. package/lib/exercises/math/calcul/arithmetics/minNumberInequality.js +192 -0
  32. package/lib/exercises/math/calcul/arithmetics/paritySumsAndProducts.d.ts.map +1 -1
  33. package/lib/exercises/math/calcul/arithmetics/paritySumsAndProducts.js +114 -0
  34. package/lib/exercises/math/calcul/arithmetics/pgcdCalcul.d.ts.map +1 -1
  35. package/lib/exercises/math/calcul/arithmetics/pgcdCalcul.js +28 -1
  36. package/lib/exercises/math/calcul/arithmetics/ppcmCalcul.d.ts.map +1 -1
  37. package/lib/exercises/math/calcul/arithmetics/ppcmCalcul.js +1 -0
  38. package/lib/exercises/math/calcul/arithmetics/primeNumberIdentification.d.ts +7 -0
  39. package/lib/exercises/math/calcul/arithmetics/primeNumberIdentification.d.ts.map +1 -0
  40. package/lib/exercises/math/calcul/arithmetics/primeNumberIdentification.js +84 -0
  41. package/lib/exercises/math/calcul/arithmetics/primeNumbers.d.ts.map +1 -1
  42. package/lib/exercises/math/calcul/arithmetics/primeNumbers.js +37 -2
  43. package/lib/exercises/math/calcul/arithmetics/squareRootCalculation.d.ts +8 -0
  44. package/lib/exercises/math/calcul/arithmetics/squareRootCalculation.d.ts.map +1 -0
  45. package/lib/exercises/math/calcul/arithmetics/squareRootCalculation.js +107 -0
  46. package/lib/exercises/math/calcul/arithmetics/whichMultipleAmI.d.ts +9 -0
  47. package/lib/exercises/math/calcul/arithmetics/whichMultipleAmI.d.ts.map +1 -0
  48. package/lib/exercises/math/calcul/arithmetics/whichMultipleAmI.js +131 -0
  49. package/lib/exercises/math/calcul/fractions/fractionAndIntegerSum.d.ts.map +1 -1
  50. package/lib/exercises/math/calcul/fractions/fractionAndIntegerSum.js +37 -0
  51. package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.d.ts.map +1 -1
  52. package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.js +57 -6
  53. package/lib/exercises/math/calcul/fractions/fractionsOperations.d.ts.map +1 -1
  54. package/lib/exercises/math/calcul/fractions/fractionsOperations.js +64 -22
  55. package/lib/exercises/math/calcul/fractions/fractionsSubstraction.d.ts.map +1 -1
  56. package/lib/exercises/math/calcul/fractions/fractionsSubstraction.js +143 -4
  57. package/lib/exercises/math/calcul/fractions/fractionsSum.d.ts.map +1 -1
  58. package/lib/exercises/math/calcul/fractions/fractionsSum.js +141 -3
  59. package/lib/exercises/math/calcul/fractions/index.d.ts +1 -0
  60. package/lib/exercises/math/calcul/fractions/index.d.ts.map +1 -1
  61. package/lib/exercises/math/calcul/fractions/index.js +1 -0
  62. package/lib/exercises/math/calcul/fractions/periodicWritingToFraction.js +3 -3
  63. package/lib/exercises/math/calcul/fractions/powerNotation.d.ts +9 -0
  64. package/lib/exercises/math/calcul/fractions/powerNotation.d.ts.map +1 -0
  65. package/lib/exercises/math/calcul/fractions/powerNotation.js +125 -0
  66. package/lib/exercises/math/calcul/proportionality/proportionalityTable.d.ts.map +1 -1
  67. package/lib/exercises/math/calcul/proportionality/proportionalityTable.js +29 -5
  68. package/lib/exercises/math/calcul/sign/absoluteNumber.d.ts +7 -0
  69. package/lib/exercises/math/calcul/sign/absoluteNumber.d.ts.map +1 -0
  70. package/lib/exercises/math/calcul/sign/absoluteNumber.js +80 -0
  71. package/lib/exercises/math/calcul/sign/index.d.ts +1 -0
  72. package/lib/exercises/math/calcul/sign/index.d.ts.map +1 -1
  73. package/lib/exercises/math/calcul/sign/index.js +1 -0
  74. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivitySubstract.d.ts.map +1 -1
  75. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivitySubstract.js +52 -4
  76. package/lib/exercises/math/calculLitteral/distributivity/identitiesWithNonIntegers.d.ts.map +1 -1
  77. package/lib/exercises/math/calculLitteral/distributivity/identitiesWithNonIntegers.js +109 -4
  78. package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.d.ts.map +1 -1
  79. package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.js +67 -21
  80. package/lib/exercises/math/calculLitteral/equation/equa3.d.ts.map +1 -1
  81. package/lib/exercises/math/calculLitteral/equation/equa3.js +0 -2
  82. package/lib/exercises/math/calculLitteral/equation/equationWithDistributivity.d.ts.map +1 -1
  83. package/lib/exercises/math/calculLitteral/equation/equationWithDistributivity.js +53 -9
  84. package/lib/exercises/math/calculLitteral/equation/factorizeEquation.d.ts +9 -0
  85. package/lib/exercises/math/calculLitteral/equation/factorizeEquation.d.ts.map +1 -0
  86. package/lib/exercises/math/calculLitteral/equation/factorizeEquation.js +145 -0
  87. package/lib/exercises/math/calculLitteral/equation/index.d.ts +1 -0
  88. package/lib/exercises/math/calculLitteral/equation/index.d.ts.map +1 -1
  89. package/lib/exercises/math/calculLitteral/equation/index.js +1 -0
  90. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.d.ts.map +1 -1
  91. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.js +32 -4
  92. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.d.ts.map +1 -1
  93. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js +30 -2
  94. package/lib/exercises/math/calculLitteral/inequations/index.d.ts +1 -0
  95. package/lib/exercises/math/calculLitteral/inequations/index.d.ts.map +1 -1
  96. package/lib/exercises/math/calculLitteral/inequations/index.js +1 -0
  97. package/lib/exercises/math/calculLitteral/inequations/inequationsSign.d.ts +9 -0
  98. package/lib/exercises/math/calculLitteral/inequations/inequationsSign.d.ts.map +1 -0
  99. package/lib/exercises/math/calculLitteral/inequations/inequationsSign.js +75 -0
  100. package/lib/exercises/math/calculLitteral/inequations/inverseInequality.d.ts +9 -0
  101. package/lib/exercises/math/calculLitteral/inequations/inverseInequality.d.ts.map +1 -0
  102. package/lib/exercises/math/calculLitteral/inequations/inverseInequality.js +120 -0
  103. package/lib/exercises/math/calculLitteral/simplifying/distributeAndSimplify.d.ts.map +1 -1
  104. package/lib/exercises/math/calculLitteral/simplifying/distributeAndSimplify.js +43 -1
  105. package/lib/exercises/math/curve/index.d.ts +3 -0
  106. package/lib/exercises/math/curve/index.d.ts.map +1 -0
  107. package/lib/exercises/math/curve/index.js +2 -0
  108. package/lib/exercises/math/curve/sqrtCurvePoint.d.ts +8 -0
  109. package/lib/exercises/math/curve/sqrtCurvePoint.d.ts.map +1 -0
  110. package/lib/exercises/math/curve/sqrtCurvePoint.js +132 -0
  111. package/lib/exercises/math/curve/squareCurvePoint.d.ts +8 -0
  112. package/lib/exercises/math/curve/squareCurvePoint.d.ts.map +1 -0
  113. package/lib/exercises/math/curve/squareCurvePoint.js +133 -0
  114. package/lib/exercises/math/functions/absolute/index.d.ts +2 -0
  115. package/lib/exercises/math/functions/absolute/index.d.ts.map +1 -1
  116. package/lib/exercises/math/functions/absolute/index.js +2 -0
  117. package/lib/exercises/math/functions/absolute/removeAbsNotation.d.ts +8 -0
  118. package/lib/exercises/math/functions/absolute/removeAbsNotation.d.ts.map +1 -0
  119. package/lib/exercises/math/functions/absolute/removeAbsNotation.js +105 -0
  120. package/lib/exercises/math/functions/absolute/removeAbsNotationSign.d.ts +8 -0
  121. package/lib/exercises/math/functions/absolute/removeAbsNotationSign.d.ts.map +1 -0
  122. package/lib/exercises/math/functions/absolute/removeAbsNotationSign.js +108 -0
  123. package/lib/exercises/math/functions/affines/affineExpressionReading.d.ts.map +1 -1
  124. package/lib/exercises/math/functions/affines/affineExpressionReading.js +36 -0
  125. package/lib/exercises/math/functions/basics/index.js +1 -0
  126. package/lib/exercises/math/functions/basics/inverseImageFunctionTable.d.ts.map +1 -1
  127. package/lib/exercises/math/functions/basics/inverseImageFunctionTable.js +19 -0
  128. package/lib/exercises/math/functions/basics/valueTableCompletion.d.ts +7 -0
  129. package/lib/exercises/math/functions/basics/valueTableCompletion.d.ts.map +1 -0
  130. package/lib/exercises/math/functions/basics/valueTableCompletion.js +78 -0
  131. package/lib/exercises/math/functions/cube/cubicEquation.d.ts.map +1 -1
  132. package/lib/exercises/math/functions/cube/cubicEquation.js +16 -8
  133. package/lib/exercises/math/functions/cube/imageOfCubeFunction.d.ts +8 -0
  134. package/lib/exercises/math/functions/cube/imageOfCubeFunction.d.ts.map +1 -0
  135. package/lib/exercises/math/functions/cube/imageOfCubeFunction.js +142 -0
  136. package/lib/exercises/math/functions/cube/index.d.ts +1 -0
  137. package/lib/exercises/math/functions/cube/index.d.ts.map +1 -1
  138. package/lib/exercises/math/functions/cube/index.js +1 -0
  139. package/lib/exercises/math/functions/square/getImageOfSquareRootFunction.d.ts +8 -0
  140. package/lib/exercises/math/functions/square/getImageOfSquareRootFunction.d.ts.map +1 -0
  141. package/lib/exercises/math/functions/square/getImageOfSquareRootFunction.js +128 -0
  142. package/lib/exercises/math/functions/square/index.d.ts +1 -0
  143. package/lib/exercises/math/functions/square/index.d.ts.map +1 -1
  144. package/lib/exercises/math/functions/square/index.js +1 -0
  145. package/lib/exercises/math/geometry/euclidian/pythagoreOrThales.d.ts.map +1 -1
  146. package/lib/exercises/math/geometry/euclidian/pythagoreOrThales.js +32 -2
  147. package/lib/exercises/math/index.d.ts +1 -0
  148. package/lib/exercises/math/index.d.ts.map +1 -1
  149. package/lib/exercises/math/index.js +1 -0
  150. package/lib/exercises/math/percent/evolutions/findRightCalculForPriceEvolution.d.ts.map +1 -1
  151. package/lib/exercises/math/percent/evolutions/findRightCalculForPriceEvolution.js +39 -8
  152. package/lib/exercises/math/powers/decimalToScientific.d.ts.map +1 -1
  153. package/lib/exercises/math/powers/decimalToScientific.js +0 -1
  154. package/lib/exercises/math/powers/powersMixOperations.d.ts.map +1 -1
  155. package/lib/exercises/math/powers/powersMixOperations.js +0 -1
  156. package/lib/exercises/math/probaStat/ballsBasicProbas.d.ts.map +1 -1
  157. package/lib/exercises/math/probaStat/ballsBasicProbas.js +1 -3
  158. package/lib/exercises/math/probaStat/cardBasicProbas.d.ts.map +1 -1
  159. package/lib/exercises/math/probaStat/cardBasicProbas.js +37 -0
  160. package/lib/exercises/math/probaStat/issuesCountingForCards.d.ts.map +1 -1
  161. package/lib/exercises/math/probaStat/issuesCountingForCards.js +27 -0
  162. package/lib/exercises/math/probaStat/probaFromTableNoContext.d.ts +3 -1
  163. package/lib/exercises/math/probaStat/probaFromTableNoContext.d.ts.map +1 -1
  164. package/lib/exercises/math/probaStat/probaFromTableNoContext.js +126 -7
  165. package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts.map +1 -1
  166. package/lib/exercises/math/probaStat/probaFromTableWithContext.js +131 -3
  167. package/lib/exercises/math/python/index.d.ts +3 -0
  168. package/lib/exercises/math/python/index.d.ts.map +1 -1
  169. package/lib/exercises/math/python/index.js +3 -0
  170. package/lib/exercises/math/python/pyIfElseCondition.d.ts +8 -0
  171. package/lib/exercises/math/python/pyIfElseCondition.d.ts.map +1 -0
  172. package/lib/exercises/math/python/pyIfElseCondition.js +133 -0
  173. package/lib/exercises/math/python/variableType.d.ts +8 -0
  174. package/lib/exercises/math/python/variableType.d.ts.map +1 -0
  175. package/lib/exercises/math/python/variableType.js +118 -0
  176. package/lib/exercises/math/python/whileLoop.js +1 -1
  177. package/lib/exercises/math/python/whileLoopCount.d.ts +8 -0
  178. package/lib/exercises/math/python/whileLoopCount.d.ts.map +1 -0
  179. package/lib/exercises/math/python/whileLoopCount.js +94 -0
  180. package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts.map +1 -1
  181. package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +1 -0
  182. package/lib/exercises/math/sequences/arithmetic/arithmeticFindReason.d.ts.map +1 -1
  183. package/lib/exercises/math/sequences/arithmetic/arithmeticFindReason.js +2 -1
  184. package/lib/exercises/math/sets/intervals/inequalityToInterval.d.ts.map +1 -1
  185. package/lib/exercises/math/sets/intervals/inequalityToInterval.js +21 -0
  186. package/lib/exercises/math/sets/intervals/intervalToInequality.d.ts.map +1 -1
  187. package/lib/exercises/math/sets/intervals/intervalToInequality.js +20 -0
  188. package/lib/exercises/math/sets/intervals/intervalsUnion.d.ts.map +1 -1
  189. package/lib/exercises/math/sets/intervals/intervalsUnion.js +19 -0
  190. package/lib/exercises/math/sets/setBelonging.d.ts.map +1 -1
  191. package/lib/exercises/math/sets/setBelonging.js +24 -0
  192. package/lib/exercises/math/squareRoots/simpifySquareRoot.d.ts.map +1 -1
  193. package/lib/exercises/math/squareRoots/simpifySquareRoot.js +41 -0
  194. package/lib/exercises/math/squareRoots/squareRootEquation.d.ts.map +1 -1
  195. package/lib/exercises/math/squareRoots/squareRootEquation.js +25 -0
  196. package/lib/exercises/math/squareRoots/squareRootIdentities.d.ts.map +1 -1
  197. package/lib/exercises/math/squareRoots/squareRootIdentities.js +106 -5
  198. package/lib/exercises/math/squareRoots/squareRootsDistributivity.d.ts.map +1 -1
  199. package/lib/exercises/math/squareRoots/squareRootsDistributivity.js +29 -2
  200. package/lib/exercises/math/squareRoots/squareRootsFractions.d.ts.map +1 -1
  201. package/lib/exercises/math/squareRoots/squareRootsFractions.js +33 -4
  202. package/lib/exercises/math/squareRoots/squareRootsProducts.d.ts.map +1 -1
  203. package/lib/exercises/math/squareRoots/squareRootsProducts.js +27 -4
  204. package/lib/exercises/math/squareRoots/squareRootsSum.d.ts.map +1 -1
  205. package/lib/exercises/math/squareRoots/squareRootsSum.js +33 -1
  206. package/lib/exercises/math/squareRoots/squareRootsToSquare.d.ts.map +1 -1
  207. package/lib/exercises/math/squareRoots/squareRootsToSquare.js +46 -4
  208. package/lib/exercises/pc/chemicalElements/weightPercent.d.ts.map +1 -1
  209. package/lib/exercises/pc/chemicalElements/weightPercent.js +0 -1
  210. package/lib/exercises/utils/getDistinctQuestions.d.ts.map +1 -1
  211. package/lib/exercises/utils/getDistinctQuestions.js +6 -0
  212. package/lib/index.d.ts +82 -1
  213. package/lib/index.d.ts.map +1 -1
  214. package/lib/latexTester.d.ts.map +1 -1
  215. package/lib/latexTester.js +5 -2
  216. package/lib/math/numbers/decimals/decimal.d.ts +1 -1
  217. package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
  218. package/lib/math/numbers/decimals/decimal.js +5 -2
  219. package/lib/playground.d.ts.map +1 -1
  220. package/lib/playground.js +9 -7
  221. package/lib/tests/pdfExo.test.d.ts.map +1 -1
  222. package/lib/tests/pdfExo.test.js +2 -2
  223. package/lib/tests/pdfs/mdCodeToLatex.d.ts.map +1 -1
  224. package/lib/tests/pdfs/mdCodeToLatex.js +10 -0
  225. package/lib/tests/pdfs/quizPdfPreambule.js +1 -1
  226. package/lib/tree/nodes/algebraicNode.d.ts +2 -0
  227. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
  228. package/lib/tree/nodes/functions/absNode.d.ts +2 -2
  229. package/lib/tree/nodes/functions/absNode.d.ts.map +1 -1
  230. package/lib/tree/nodes/functions/absNode.js +5 -2
  231. package/lib/tree/nodes/nodeConstructor.js +1 -1
  232. package/lib/tree/nodes/numbers/numberNode.js +2 -2
  233. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  234. package/lib/tree/nodes/operators/fractionNode.js +10 -4
  235. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  236. package/lib/tree/nodes/operators/multiplyNode.js +15 -6
  237. package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
  238. package/lib/tree/nodes/operators/powerNode.js +4 -0
  239. package/package.json +1 -1
@@ -88,6 +88,8 @@ export interface Question<TIdentifiers = {}, TOptions = {}> {
88
88
  divisionFormat?: "fraction" | "obelus";
89
89
  identifiers: TIdentifiers;
90
90
  options?: TOptions;
91
+ answerTable?: string[][];
92
+ initTable?: string[][];
91
93
  }
92
94
  export type QCMGenerator<TIdentifiers, TOptions = {}> = (n: number, args: {
93
95
  answer: string;
@@ -136,7 +138,7 @@ export interface Exercise<TIdentifiers = {}, TOptions = {}> {
136
138
  connector?: "=" | "\\iff" | "\\approx";
137
139
  generator: (n: number, opts?: TOptions) => Question<TIdentifiers, TOptions>[];
138
140
  maxAllowedQuestions?: number;
139
- answerType?: "GGB" | "QCM" | "free" | "QCU";
141
+ answerType?: "GGB" | "QCM" | "free" | "QCU" | "valueTable";
140
142
  isQCM?: boolean;
141
143
  shouldHaveCalculator?: boolean;
142
144
  qcmTimer?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAInD,eAAO,MAAM,SAAS,iBACN,WAAW,EAAE,KACxB,MAAM,WACA,MAAM,IAAI,SAQpB,CAAC;AACF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,iBAAiB,UACrB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAUtB,CAAC;AAEF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,KACjB,MAAM,sBACW,MAAM,kBAQ3B,CAAC;AAEF,oBAAY,qBAAqB;IAC/B,UAAU,eAAe;IACzB,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,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B,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,QAAQ,GACR,YAAY,GACZ,QAAQ,GACR,iBAAiB,GACjB,cAAc,GACd,cAAc,GACd,QAAQ,GACR,UAAU,GACV,uBAAuB,GACvB,oBAAoB,GACpB,eAAe,GACf,gBAAgB,GAChB,UAAU,CAAC;AAEf,MAAM,MAAM,SAAS,GACjB,mBAAmB,GACnB,sBAAsB,GACtB,QAAQ,GACR,kBAAkB,GAClB,WAAW,GACX,SAAS,GACT,cAAc,GACd,+CAA+C,GAC/C,OAAO,GACP,KAAK,GACL,wBAAwB,GACxB,SAAS,GACT,KAAK,GACL,aAAa,GACb,4BAA4B,GAC5B,oBAAoB,GACpB,WAAW,GACX,iBAAiB,GACjB,SAAS,CAAC"}
1
+ {"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAInD,eAAO,MAAM,SAAS,iBACN,WAAW,EAAE,KACxB,MAAM,WACA,MAAM,IAAI,SAQpB,CAAC;AACF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,iBAAiB,UACrB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAUtB,CAAC;AAEF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,KACjB,MAAM,sBACW,MAAM,kBAQ3B,CAAC;AAEF,oBAAY,qBAAqB;IAC/B,UAAU,eAAe;IACzB,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,WAAW,gBAAgB;IAC3B,IAAI,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a,GACb,aAAa,GACb,SAAS,GACT,qBAAqB,GACrB,oBAAoB,GACpB,UAAU,GACV,mBAAmB,GACnB,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,QAAQ,GACR,YAAY,GACZ,QAAQ,GACR,iBAAiB,GACjB,cAAc,GACd,cAAc,GACd,QAAQ,GACR,UAAU,GACV,uBAAuB,GACvB,oBAAoB,GACpB,eAAe,GACf,gBAAgB,GAChB,UAAU,CAAC;AAEf,MAAM,MAAM,SAAS,GACjB,mBAAmB,GACnB,sBAAsB,GACtB,QAAQ,GACR,kBAAkB,GAClB,WAAW,GACX,SAAS,GACT,cAAc,GACd,+CAA+C,GAC/C,OAAO,GACP,KAAK,GACL,wBAAwB,GACxB,SAAS,GACT,KAAK,GACL,aAAa,GACb,4BAA4B,GAC5B,oBAAoB,GACpB,WAAW,GACX,iBAAiB,GACjB,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"divisorsList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/divisorsList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAiEF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAa9C,CAAC"}
1
+ {"version":3,"file":"divisorsList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/divisorsList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAiGF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAc9C,CAAC"}
@@ -1,9 +1,13 @@
1
1
  import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
2
  import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
3
  import { dividersOf } from "../../../../math/utils/arithmetic/dividersOf.js";
4
+ import { isPrime } from "../../../../math/utils/arithmetic/isPrime.js";
4
5
  import { randint } from "../../../../math/utils/random/randint.js";
6
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
5
7
  import { coinFlip } from "../../../../utils/alea/coinFlip.js";
8
+ import { probaFlip } from "../../../../utils/alea/probaFlip.js";
6
9
  import { doWhile } from "../../../../utils/doWhile.js";
10
+ import { alignTex } from "../../../../utils/latex/alignTex.js";
7
11
  const getAnswer = (identifiers) => {
8
12
  const { a } = identifiers;
9
13
  const divisors = dividersOf(a);
@@ -12,13 +16,41 @@ const getAnswer = (identifiers) => {
12
16
  };
13
17
  const getInstruction = (identifiers) => {
14
18
  const { a } = identifiers;
15
- return `Donner la liste des diviseurs de $${a}$ (séparer les valeurs par des point-virgules).`;
19
+ return `Donner la liste des diviseurs positifs de $${a}$ (séparer les valeurs par des point-virgules).`;
16
20
  };
17
21
  const getDivisorsListQuestion = () => {
18
- const a = randint(30, 90);
22
+ let a = 0;
23
+ do {
24
+ a = randint(10, 100);
25
+ } while (isPrime(a) && probaFlip(0.8));
19
26
  const identifiers = { a };
20
27
  return getQuestionFromIdentifiers(identifiers);
21
28
  };
29
+ const getHint = (identifiers) => {
30
+ const { a } = identifiers;
31
+ return `Cherche toutes les façons possibles d'écrire $${a}$ comme un produit de deux nombres entiers positifs. Chaque facteur de ces produits est alors un diviseur de $${a}$.`;
32
+ };
33
+ const getCorrection = (identifiers) => {
34
+ const { a } = identifiers;
35
+ const products = [];
36
+ for (let i = 1; i <= Math.sqrt(a); i++) {
37
+ if (a % i === 0) {
38
+ products.push(multiply(i, a / i));
39
+ }
40
+ }
41
+ return `
42
+ ${alignTex([
43
+ [a.frenchify(), "=", products[0].toTex({ forceNoSimplification: true })],
44
+ ...products.slice(1).map((p) => ["", "=", p.toTex()]),
45
+ ])}
46
+
47
+ Les diviseurs positifs de $${a}$ sont donc :
48
+
49
+ $$
50
+ ${getAnswer(identifiers)}
51
+ $$
52
+ `;
53
+ };
22
54
  const getQuestionFromIdentifiers = (identifiers) => {
23
55
  const question = {
24
56
  answer: getAnswer(identifiers),
@@ -26,6 +58,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
26
58
  keys: ["semicolon"],
27
59
  answerFormat: "tex",
28
60
  identifiers,
61
+ hint: getHint(identifiers),
62
+ correction: getCorrection(identifiers),
29
63
  };
30
64
  return question;
31
65
  };
@@ -67,4 +101,5 @@ export const divisorsList = {
67
101
  subject: "Mathématiques",
68
102
  maxAllowedQuestions: 30,
69
103
  getQuestionFromIdentifiers,
104
+ hasHintAndCorrection: true,
70
105
  };
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ a: number;
4
+ b: number;
5
+ isAskingParity: boolean;
6
+ };
7
+ export declare const getParityBetweenTwoNumbers: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=getParityBetweenTwoNumbers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getParityBetweenTwoNumbers.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/getParityBetweenTwoNumbers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AA0HF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAiB5D,CAAC"}
@@ -0,0 +1,114 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { randint } from "../../../../math/utils/random/randint.js";
4
+ import { coinFlip } from "../../../../utils/alea/coinFlip.js";
5
+ import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
6
+ const getPropositions = (n, { answer }) => {
7
+ const propositions = [];
8
+ addValidProp(propositions, answer);
9
+ while (propositions.length < n) {
10
+ const randomNumber = randint(0, 100);
11
+ tryToAddWrongProp(propositions, randomNumber.frenchify());
12
+ }
13
+ return shuffleProps(propositions, n);
14
+ };
15
+ const getAnswer = (identifiers) => {
16
+ let { a, b, isAskingParity } = identifiers;
17
+ const start = a + 1;
18
+ const end = b - 1;
19
+ const totalNumbers = end - start + 1;
20
+ const evensUpToEnd = Math.floor(end / 2);
21
+ const evensBeforeStart = Math.floor((start - 1) / 2);
22
+ const totalEvenNumbers = evensUpToEnd - evensBeforeStart;
23
+ const count = isAskingParity
24
+ ? totalEvenNumbers
25
+ : totalNumbers - totalEvenNumbers;
26
+ return count.frenchify();
27
+ };
28
+ const getInstruction = (identifiers) => {
29
+ const { a, b, isAskingParity } = identifiers;
30
+ return `Combien y a-t-il de nombres ${isAskingParity ? "pairs" : "impairs"} entre $${a}$ et $${b}$ ?`;
31
+ };
32
+ const getHint = (identifiers) => {
33
+ return `Rappel sur la parité :
34
+
35
+ - Un nombre est pair s'il est divisible par $2$ (il finit par $0$, $2$, $4$, $6$ ou $8$) ;
36
+ - Un nombre est impair s'il n'est **pas** divisible par $2$ (il finit par $1$, $3$, $5$, $7$ ou $9$) ;
37
+ - Pensez que seuls les nombres **strictement entre** les deux bornes sont à prendre en compte.`;
38
+ };
39
+ const getCorrection = (identifiers) => {
40
+ let { a, b, isAskingParity } = identifiers;
41
+ if (a > b) {
42
+ [a, b] = [b, a];
43
+ }
44
+ const start = a + 1;
45
+ const end = b - 1;
46
+ const totalNumbers = end - start + 1;
47
+ const evensUpToEnd = Math.floor(end / 2);
48
+ const evensBeforeStart = Math.floor((start - 1) / 2);
49
+ const totalEvenNumbers = evensUpToEnd - evensBeforeStart;
50
+ const totalOddNumbers = totalNumbers - totalEvenNumbers;
51
+ const number = isAskingParity ? totalEvenNumbers : totalOddNumbers;
52
+ return `
53
+
54
+ Il y a $${totalNumbers}$ nombres entre $${a}$ et $${b}$.
55
+
56
+ Pour trouver combien il y a de nombres pairs :
57
+ - On compte combien il y a de nombres pairs entre $0$ et $${end}$ : c'est $${evensUpToEnd}$ (car un nombre pair apparaît tous les deux nombres, donc on divise par $2$ et on prend la partie entière).
58
+ - On compte combien il y a de nombres pairs entre $0$ et $${start - 1}$ : c'est $${evensBeforeStart}$.
59
+
60
+ - Le nombre de nombres pairs strictement entre $${start}$ et $${end}$ est donc $${evensUpToEnd} - ${evensBeforeStart} = ${totalEvenNumbers}$.
61
+
62
+ Ensuite, comme il y a $${totalNumbers}$ nombres au total, le nombre d'impairs est $${totalNumbers} - ${totalEvenNumbers} = ${totalOddNumbers}$.
63
+
64
+ On cherche les nombres ${isAskingParity ? "pairs" : "impairs"}, donc la réponse finale est $${number}$.`;
65
+ };
66
+ const getKeys = (identifiers) => {
67
+ return [];
68
+ };
69
+ const isAnswerValid = (ans, { answer }) => {
70
+ try {
71
+ return ans === answer;
72
+ }
73
+ catch (err) {
74
+ return handleVEAError(err);
75
+ }
76
+ };
77
+ const getGetParityBetweenTwoNumbersQuestion = (ops) => {
78
+ let a = randint(1, 100);
79
+ let b = randint(1, 100, [a, a - 1, a + 1, a - 2, a + 2]);
80
+ if (a > b) {
81
+ [a, b] = [b, a];
82
+ }
83
+ const isAskingParity = coinFlip();
84
+ const identifiers = { a, b, isAskingParity };
85
+ return getQuestionFromIdentifiers(identifiers);
86
+ };
87
+ const getQuestionFromIdentifiers = (identifiers) => {
88
+ return {
89
+ answer: getAnswer(identifiers),
90
+ instruction: getInstruction(identifiers),
91
+ keys: getKeys(identifiers),
92
+ answerFormat: "tex",
93
+ identifiers,
94
+ hint: getHint(identifiers),
95
+ correction: getCorrection(identifiers),
96
+ };
97
+ };
98
+ export const getParityBetweenTwoNumbers = {
99
+ id: "getParityBetweenTwoNumbers",
100
+ label: "Le nombre de valeurs paires/impaires entre a et b",
101
+ isSingleStep: true,
102
+ generator: (nb, opts) => getDistinctQuestions(() => getGetParityBetweenTwoNumbersQuestion(opts), nb),
103
+ qcmTimer: 60,
104
+ freeTimer: 60,
105
+ getPropositions,
106
+ isAnswerValid,
107
+ subject: "Mathématiques",
108
+ getInstruction,
109
+ getHint,
110
+ getCorrection,
111
+ getAnswer,
112
+ getQuestionFromIdentifiers,
113
+ hasHintAndCorrection: true,
114
+ };
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
3
+ type Identifiers = {
4
+ a: NodeIdentifiers;
5
+ };
6
+ export declare const imageOfSquareFunction: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=imageOfSquareFunction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imageOfSquareFunction.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/imageOfSquareFunction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAW7C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,eAAe,CAAC;CACpB,CAAC;AAwJF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAiBvD,CAAC"}
@@ -0,0 +1,152 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { RationalConstructor } from "../../../../math/numbers/rationals/rational.js";
4
+ import { randint } from "../../../../math/utils/random/randint.js";
5
+ import { sqrt, SqrtNode } from "../../../../tree/nodes/functions/sqrtNode.js";
6
+ import { NodeIds } from "../../../../tree/nodes/node.js";
7
+ import { reifyAlgebraic, } from "../../../../tree/nodes/nodeConstructor.js";
8
+ import { NumberNode } from "../../../../tree/nodes/numbers/numberNode.js";
9
+ import { add } from "../../../../tree/nodes/operators/addNode.js";
10
+ import { divide } from "../../../../tree/nodes/operators/divideNode.js";
11
+ import { FractionNode } from "../../../../tree/nodes/operators/fractionNode.js";
12
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
13
+ import { square } from "../../../../tree/nodes/operators/powerNode.js";
14
+ import { substract } from "../../../../tree/nodes/operators/substractNode.js";
15
+ import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
16
+ import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
17
+ const getPropositions = (n, { answer, ...identifiers }) => {
18
+ const propositions = [];
19
+ addValidProp(propositions, answer);
20
+ const { a } = identifiers;
21
+ if (a.id === NodeIds.fraction) {
22
+ const frac = reifyAlgebraic(a);
23
+ // Erreurs potentielles pour les fractions:
24
+ // - l'élève ne fait le carré que sur le nominateur et dénominateur
25
+ // - l'élève multiplie par 2 à la place de faire un carré
26
+ tryToAddWrongProp(propositions, new FractionNode(frac.leftChild, square(frac.rightChild))
27
+ .simplify()
28
+ .toTex());
29
+ tryToAddWrongProp(propositions, new FractionNode(square(frac.leftChild), frac.rightChild)
30
+ .simplify()
31
+ .toTex());
32
+ tryToAddWrongProp(propositions, new FractionNode(frac.leftChild, multiply(frac.rightChild, 2))
33
+ .simplify()
34
+ .toTex());
35
+ tryToAddWrongProp(propositions, new FractionNode(multiply(frac.leftChild, 2), frac.rightChild)
36
+ .simplify()
37
+ .toTex());
38
+ tryToAddWrongProp(propositions, multiply(frac, 2).simplify().toTex());
39
+ }
40
+ else if (a.id === NodeIds.number) {
41
+ const N = reifyAlgebraic(a);
42
+ // Erreurs potentielles pour les nombres:
43
+ // - Division par 2
44
+ // - Multiplication par 2 (sauf pour le cas N = 2)
45
+ // - Carre de N+1
46
+ // - Carre de N-1
47
+ if (N.value != 2)
48
+ tryToAddWrongProp(propositions, multiply(N, 2).simplify().toTex());
49
+ tryToAddWrongProp(propositions, divide(N, 2).simplify().toTex());
50
+ tryToAddWrongProp(propositions, square(substract(N, 1)).simplify().toTex());
51
+ tryToAddWrongProp(propositions, square(add(N, 1)).simplify().toTex());
52
+ }
53
+ else {
54
+ // Cas racine carre
55
+ // Multiplication de 2 dans la racine
56
+ // Multiplication de 2 en dehors de la racine
57
+ // N^2 pour sqrt(N) (carre effectue deux fois)
58
+ const N = reifyAlgebraic(a);
59
+ tryToAddWrongProp(propositions, sqrt(multiply(N.child, 2)).simplify().toTex());
60
+ tryToAddWrongProp(propositions, multiply(N, 2).simplify().toTex());
61
+ tryToAddWrongProp(propositions, square(N.child).simplify().toTex());
62
+ }
63
+ return shuffleProps(propositions, n);
64
+ };
65
+ const getAnswer = (identifiers) => {
66
+ const { a } = identifiers;
67
+ const correctAnswer = square(reifyAlgebraic(a));
68
+ return correctAnswer.simplify().toTex();
69
+ };
70
+ const getInstruction = (identifiers) => {
71
+ const { a } = identifiers;
72
+ const nNode = reifyAlgebraic(a);
73
+ return `Calculer l'image de $${nNode.toTex()}$ par la fonction carré.`;
74
+ };
75
+ const getHint = (identifiers) => {
76
+ return `La fonction carré est la fonction définie par:
77
+
78
+ $$
79
+ f(x) = x^2
80
+ $$`;
81
+ };
82
+ const getCorrection = (identifiers) => {
83
+ const { a } = identifiers;
84
+ const aNode = reifyAlgebraic(a);
85
+ return `L'image de $${aNode.toTex()}$ par $f(x) = x^2$ est :
86
+
87
+ $$
88
+ f\\left(${aNode.toTex()}\\right) = ${square(aNode).toTex()} = ${getAnswer(identifiers)}
89
+ $$`;
90
+ };
91
+ const getKeys = (identifiers) => {
92
+ return [];
93
+ };
94
+ const isAnswerValid = (ans, { answer }) => {
95
+ try {
96
+ const studentAnswer = parseAlgebraic(ans);
97
+ const correctAnswer = parseAlgebraic(answer);
98
+ return studentAnswer
99
+ .simplify({ decimalToFractions: true })
100
+ .equals(correctAnswer.simplify());
101
+ }
102
+ catch (err) {
103
+ return handleVEAError(err);
104
+ }
105
+ };
106
+ const getImageOfSquareFunctionQuestion = (ops) => {
107
+ let a = null;
108
+ // Soit un nombre, soit une fraction, soit une racine carre
109
+ const choice = randint(1, 4);
110
+ switch (choice) {
111
+ case 1:
112
+ a = new NumberNode(randint(-10, 10));
113
+ break;
114
+ case 2:
115
+ a = RationalConstructor.randomIrreductible().toTree();
116
+ break;
117
+ case 3:
118
+ default:
119
+ a = new SqrtNode(new NumberNode(randint(2, 100)));
120
+ break;
121
+ }
122
+ const identifiers = { a: a.toIdentifiers() };
123
+ return getQuestionFromIdentifiers(identifiers);
124
+ };
125
+ const getQuestionFromIdentifiers = (identifiers) => {
126
+ return {
127
+ answer: getAnswer(identifiers),
128
+ instruction: getInstruction(identifiers),
129
+ keys: getKeys(identifiers),
130
+ answerFormat: "tex",
131
+ identifiers,
132
+ hint: getHint(identifiers),
133
+ correction: getCorrection(identifiers),
134
+ };
135
+ };
136
+ export const imageOfSquareFunction = {
137
+ id: "imageOfSquareFunction",
138
+ label: "Calcul d'image par la fonction carré",
139
+ isSingleStep: true,
140
+ generator: (nb, opts) => getDistinctQuestions(() => getImageOfSquareFunctionQuestion(opts), nb),
141
+ qcmTimer: 60,
142
+ freeTimer: 60,
143
+ getPropositions,
144
+ isAnswerValid,
145
+ subject: "Mathématiques",
146
+ getInstruction,
147
+ getHint,
148
+ getCorrection,
149
+ getAnswer,
150
+ getQuestionFromIdentifiers,
151
+ hasHintAndCorrection: true,
152
+ };
@@ -6,4 +6,15 @@ export * from "./divisorsList.js";
6
6
  export * from "./commonDivisorsList.js";
7
7
  export * from "./divisibiltyCriteria.js";
8
8
  export * from "./ppcmCalcul.js";
9
+ export * from "./getParityBetweenTwoNumbers.js";
10
+ export * from "./primeNumberIdentification.js";
11
+ export * from "./imageOfSquareFunction.js";
12
+ export * from "./isInequalityTrue.js";
13
+ export * from "./minNumberInequality.js";
14
+ export * from "./squareRootCalculation.js";
15
+ export * from "./isPointOnCubicFunction.js";
16
+ export * from "./isPointOnReciprocalFunction.js";
17
+ export * from "./isPointOnFunction.js";
18
+ export * from "./whichMultipleAmI.js";
19
+ export * from "./isMultipleOrDivisor.js";
9
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC"}
@@ -6,3 +6,14 @@ export * from "./divisorsList.js";
6
6
  export * from "./commonDivisorsList.js";
7
7
  export * from "./divisibiltyCriteria.js";
8
8
  export * from "./ppcmCalcul.js";
9
+ export * from "./getParityBetweenTwoNumbers.js";
10
+ export * from "./primeNumberIdentification.js";
11
+ export * from "./imageOfSquareFunction.js";
12
+ export * from "./isInequalityTrue.js";
13
+ export * from "./minNumberInequality.js";
14
+ export * from "./squareRootCalculation.js";
15
+ export * from "./isPointOnCubicFunction.js";
16
+ export * from "./isPointOnReciprocalFunction.js";
17
+ export * from "./isPointOnFunction.js";
18
+ export * from "./whichMultipleAmI.js";
19
+ export * from "./isMultipleOrDivisor.js";
@@ -0,0 +1,15 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
3
+ type Identifiers = {
4
+ a: number;
5
+ b: number;
6
+ c: number;
7
+ d: number;
8
+ x: number;
9
+ left: NodeIdentifiers;
10
+ right: NodeIdentifiers;
11
+ inequalitySign: boolean;
12
+ };
13
+ export declare const isInequalityTrue: Exercise<Identifiers>;
14
+ export {};
15
+ //# sourceMappingURL=isInequalityTrue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isInequalityTrue.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/isInequalityTrue.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAE7C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,EAAE,eAAe,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAyIF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAkBlD,CAAC"}
@@ -0,0 +1,143 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { randint } from "../../../../math/utils/random/randint.js";
4
+ import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
5
+ import { coinFlip } from "../../../../utils/alea/coinFlip.js";
6
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
7
+ import { add } from "../../../../tree/nodes/operators/addNode.js";
8
+ import { reifyAlgebraic, } from "../../../../tree/nodes/nodeConstructor.js";
9
+ const getPropositions = (n, { answer }) => {
10
+ const propositions = [];
11
+ addValidProp(propositions, answer, "raw");
12
+ tryToAddWrongProp(propositions, "Non", "raw");
13
+ tryToAddWrongProp(propositions, "On ne peut pas savoir", "raw");
14
+ tryToAddWrongProp(propositions, "Oui", "raw");
15
+ return shuffleProps(propositions, n);
16
+ };
17
+ const getAnswer = (identifiers) => {
18
+ const { x, inequalitySign, left, right } = identifiers;
19
+ const leftValue = reifyAlgebraic(left)
20
+ .toDetailedEvaluation({ x: x.toTree() })
21
+ .evaluate();
22
+ const rightValue = reifyAlgebraic(right)
23
+ .toDetailedEvaluation({ x: x.toTree() })
24
+ .evaluate();
25
+ const isTrue = inequalitySign
26
+ ? leftValue < rightValue
27
+ : leftValue > rightValue;
28
+ return isTrue ? "Oui" : "Non";
29
+ };
30
+ const getInstruction = (identifiers) => {
31
+ const { x, inequalitySign, left, right } = identifiers;
32
+ const leftNode = reifyAlgebraic(left);
33
+ const rightNode = reifyAlgebraic(right);
34
+ return `On considère l'inéquation suivante :
35
+
36
+ $$
37
+ ${leftNode.toTex()} ${inequalitySign ? "<" : ">"} ${rightNode.toTex()}
38
+ $$
39
+
40
+ Cette inéquation est-elle vraie pour pour $x = ${x}$ ?`;
41
+ };
42
+ const getHint = (identifiers) => {
43
+ return `Remplacer $x$ par $${identifiers.x}$ dans les deux membres. Ensuite, vérifie si l'inégalité est vraie ou non.`;
44
+ };
45
+ const reverseSign = (sign) => {
46
+ let x = "";
47
+ if (sign === "<") {
48
+ x = ">";
49
+ }
50
+ else if (sign === ">") {
51
+ x = "<";
52
+ }
53
+ return x;
54
+ };
55
+ const getCorrection = (identifiers) => {
56
+ const { x, inequalitySign, left, right } = identifiers;
57
+ const leftNode = reifyAlgebraic(left);
58
+ const rightNode = reifyAlgebraic(right);
59
+ const detailedLeft = leftNode.toDetailedEvaluation({ x: x.toTree() });
60
+ const simplifiedLeft = detailedLeft.simplify();
61
+ const detailedRight = rightNode.toDetailedEvaluation({ x: x.toTree() });
62
+ const simplifiedRight = detailedRight.simplify();
63
+ const leftDetTex = detailedLeft.toTex();
64
+ const leftSimTex = simplifiedLeft.toTex();
65
+ const rightDetTex = detailedRight.toTex();
66
+ const rightSimTex = simplifiedRight.toTex();
67
+ const isTrue = getAnswer(identifiers) === "Oui";
68
+ const sign = inequalitySign ? "<" : ">";
69
+ return `Pour $x = ${x}$, le membre de gauche vaut :
70
+
71
+ $$
72
+ ${leftDetTex} = ${leftSimTex}
73
+ $$
74
+
75
+ Le membre de droite vaut :
76
+
77
+ $$
78
+ ${rightDetTex} = ${rightSimTex}
79
+ $$
80
+
81
+ Puisque $${leftSimTex} ${isTrue ? sign : reverseSign(sign)} ${rightSimTex}$, l'inéquation ${isTrue ? "est bien verifiée" : "n'est pas vérifiée"} pour $x = ${x}$.`;
82
+ };
83
+ const getKeys = (identifiers) => {
84
+ return [];
85
+ };
86
+ const isAnswerValid = (ans, { answer }) => {
87
+ try {
88
+ return ans === answer;
89
+ }
90
+ catch (err) {
91
+ return handleVEAError(err);
92
+ }
93
+ };
94
+ const getIsInequalityTrueQuestion = (ops) => {
95
+ const a = randint(-10, 10, [0]);
96
+ const b = randint(-10, 10, [0]);
97
+ const c = randint(-10, 10, [0]);
98
+ const d = randint(-10, 10, [0]);
99
+ const x = randint(-10, 10);
100
+ const inequalitySign = coinFlip();
101
+ const left = add(multiply(a, "x"), b).toIdentifiers();
102
+ const right = add(multiply(c, "x"), -d).toIdentifiers();
103
+ const identifiers = {
104
+ a,
105
+ b,
106
+ c,
107
+ d,
108
+ x,
109
+ inequalitySign,
110
+ left,
111
+ right,
112
+ };
113
+ return getQuestionFromIdentifiers(identifiers);
114
+ };
115
+ const getQuestionFromIdentifiers = (identifiers) => {
116
+ return {
117
+ answer: getAnswer(identifiers),
118
+ instruction: getInstruction(identifiers),
119
+ keys: getKeys(identifiers),
120
+ answerFormat: "tex",
121
+ identifiers,
122
+ hint: getHint(identifiers),
123
+ correction: getCorrection(identifiers),
124
+ };
125
+ };
126
+ export const isInequalityTrue = {
127
+ id: "isInequalityTrue",
128
+ label: "Vérifier si une inégalité est vraie",
129
+ isSingleStep: true,
130
+ generator: (nb, opts) => getDistinctQuestions(() => getIsInequalityTrueQuestion(opts), nb),
131
+ qcmTimer: 60,
132
+ freeTimer: 60,
133
+ getPropositions,
134
+ isAnswerValid,
135
+ subject: "Mathématiques",
136
+ getInstruction,
137
+ getHint,
138
+ getCorrection,
139
+ getAnswer,
140
+ getQuestionFromIdentifiers,
141
+ hasHintAndCorrection: true,
142
+ answerType: "QCU",
143
+ };
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
3
+ type Identifiers = {
4
+ a: NodeIdentifiers;
5
+ b: NodeIdentifiers;
6
+ };
7
+ export declare const isMultipleOrDivisor: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=isMultipleOrDivisor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isMultipleOrDivisor.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/isMultipleOrDivisor.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAM7C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,eAAe,CAAC;IACnB,CAAC,EAAE,eAAe,CAAC;CACpB,CAAC;AAuHF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAkBrD,CAAC"}