math-exercises 2.2.4 → 2.2.5

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 (224) hide show
  1. package/lib/exercises/exercise.d.ts +1 -1
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/math/calcul/digitDecimalRank.js +4 -4
  4. package/lib/exercises/math/calcul/digitRank.js +4 -4
  5. package/lib/exercises/math/calcul/digitRankNumber.d.ts +8 -0
  6. package/lib/exercises/math/calcul/digitRankNumber.d.ts.map +1 -0
  7. package/lib/exercises/math/calcul/digitRankNumber.js +57 -0
  8. package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
  9. package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +34 -0
  10. package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
  11. package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.js +17 -0
  12. package/lib/exercises/math/calcul/fractions/fractionsDivision.d.ts.map +1 -1
  13. package/lib/exercises/math/calcul/fractions/fractionsDivision.js +23 -0
  14. package/lib/exercises/math/calcul/fractions/fractionsProduct.d.ts.map +1 -1
  15. package/lib/exercises/math/calcul/fractions/fractionsProduct.js +15 -0
  16. package/lib/exercises/math/calcul/index.d.ts +1 -0
  17. package/lib/exercises/math/calcul/index.d.ts.map +1 -1
  18. package/lib/exercises/math/calcul/index.js +1 -0
  19. package/lib/exercises/math/calcul/proportionality/scaleUsage.js +1 -1
  20. package/lib/exercises/math/calcul/rounding/rounding.d.ts.map +1 -1
  21. package/lib/exercises/math/calcul/rounding/rounding.js +18 -0
  22. package/lib/exercises/math/calculLitteral/distributivity/allIdentities.d.ts.map +1 -1
  23. package/lib/exercises/math/calculLitteral/distributivity/allIdentities.js +1 -0
  24. package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.d.ts.map +1 -1
  25. package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.js +1 -0
  26. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.d.ts.map +1 -1
  27. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.js +31 -1
  28. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.d.ts.map +1 -1
  29. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.js +11 -2
  30. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
  31. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.js +21 -2
  32. package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
  33. package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.js +23 -2
  34. package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -1
  35. package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.js +17 -2
  36. package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
  37. package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.js +21 -2
  38. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
  39. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +26 -1
  40. package/lib/exercises/math/calculLitteral/equation/equationType1Exercise.d.ts.map +1 -1
  41. package/lib/exercises/math/calculLitteral/equation/equationType1Exercise.js +18 -2
  42. package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
  43. package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.js +19 -2
  44. package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.d.ts.map +1 -1
  45. package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.js +15 -2
  46. package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -1
  47. package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.js +20 -5
  48. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquation.d.ts.map +1 -1
  49. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquation.js +24 -1
  50. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.d.ts.map +1 -1
  51. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.js +20 -1
  52. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.d.ts.map +1 -1
  53. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.js +19 -3
  54. package/lib/exercises/math/calculLitteral/equation/fractionEquation.d.ts.map +1 -1
  55. package/lib/exercises/math/calculLitteral/equation/fractionEquation.js +24 -8
  56. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -1
  57. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +21 -2
  58. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
  59. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.js +24 -4
  60. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
  61. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +25 -5
  62. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
  63. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.js +19 -0
  64. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
  65. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +1 -0
  66. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.d.ts +8 -0
  67. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.d.ts.map +1 -0
  68. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.js +77 -0
  69. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.d.ts +8 -0
  70. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.d.ts.map +1 -0
  71. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.js +80 -0
  72. package/lib/exercises/math/calculLitteral/factorisation/index.d.ts +2 -0
  73. package/lib/exercises/math/calculLitteral/factorisation/index.d.ts.map +1 -1
  74. package/lib/exercises/math/calculLitteral/factorisation/index.js +2 -0
  75. package/lib/exercises/math/equaDiff/equaDiffGeneralForme.d.ts.map +1 -1
  76. package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +1 -0
  77. package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.d.ts.map +1 -1
  78. package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.js +12 -2
  79. package/lib/exercises/math/functions/trinoms/index.d.ts +2 -0
  80. package/lib/exercises/math/functions/trinoms/index.d.ts.map +1 -1
  81. package/lib/exercises/math/functions/trinoms/index.js +2 -0
  82. package/lib/exercises/math/functions/trinoms/solveEquationByFactorisation.d.ts +5 -0
  83. package/lib/exercises/math/functions/trinoms/solveEquationByFactorisation.d.ts.map +1 -0
  84. package/lib/exercises/math/functions/trinoms/solveEquationByFactorisation.js +44 -0
  85. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.d.ts +9 -0
  86. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.d.ts.map +1 -0
  87. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.js +134 -0
  88. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.d.ts +7 -0
  89. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.d.ts.map +1 -0
  90. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.js +59 -0
  91. package/lib/exercises/math/geometry/vectors/scalarProductViaCoords.d.ts.map +1 -1
  92. package/lib/exercises/math/geometry/vectors/scalarProductViaCoords.js +1 -0
  93. package/lib/exercises/math/index.d.ts +1 -0
  94. package/lib/exercises/math/index.d.ts.map +1 -1
  95. package/lib/exercises/math/index.js +1 -0
  96. package/lib/exercises/math/percent/applyPercent.d.ts.map +1 -1
  97. package/lib/exercises/math/percent/applyPercent.js +20 -2
  98. package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.d.ts +11 -0
  99. package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.d.ts.map +1 -0
  100. package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.js +49 -0
  101. package/lib/exercises/math/sequences/arithmetic/index.d.ts +1 -0
  102. package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
  103. package/lib/exercises/math/sequences/arithmetic/index.js +1 -0
  104. package/lib/exercises/math/spaceGeometry/index.d.ts +2 -0
  105. package/lib/exercises/math/spaceGeometry/index.d.ts.map +1 -0
  106. package/lib/exercises/math/spaceGeometry/index.js +17 -0
  107. package/lib/exercises/math/spaceGeometry/vectors/index.d.ts +4 -0
  108. package/lib/exercises/math/spaceGeometry/vectors/index.d.ts.map +1 -0
  109. package/lib/exercises/math/spaceGeometry/vectors/index.js +19 -0
  110. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts +5 -0
  111. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts.map +1 -0
  112. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.js +52 -0
  113. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.d.ts +5 -0
  114. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.d.ts.map +1 -0
  115. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.js +62 -0
  116. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.d.ts +9 -0
  117. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.d.ts.map +1 -0
  118. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.js +54 -0
  119. package/lib/exercises/math/squareRoots/squareRootIdentities.js +3 -3
  120. package/lib/exercises/math/suites/sequencePlot.d.ts.map +1 -1
  121. package/lib/exercises/math/suites/sequencePlot.js +1 -2
  122. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.d.ts.map +1 -1
  123. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +1 -0
  124. package/lib/exercises/pc/calibrationCurveOfSolution.d.ts.map +1 -1
  125. package/lib/exercises/pc/calibrationCurveOfSolution.js +1 -0
  126. package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.d.ts.map +1 -1
  127. package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.js +1 -0
  128. package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.d.ts.map +1 -1
  129. package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.js +1 -0
  130. package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.d.ts.map +1 -1
  131. package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.js +1 -0
  132. package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.d.ts.map +1 -1
  133. package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.js +1 -0
  134. package/lib/exercises/pc/dosage/beerLambertRandomValue.d.ts.map +1 -1
  135. package/lib/exercises/pc/dosage/beerLambertRandomValue.js +1 -0
  136. package/lib/exercises/pc/dosage/concentrationCalculation.d.ts.map +1 -1
  137. package/lib/exercises/pc/dosage/concentrationCalculation.js +1 -0
  138. package/lib/exercises/pc/dosage/concentrationFromMassCalculation.d.ts.map +1 -1
  139. package/lib/exercises/pc/dosage/concentrationFromMassCalculation.js +1 -0
  140. package/lib/exercises/pc/electricity/calculateIntensity.js +1 -1
  141. package/lib/exercises/pc/electricity/calculateVoltage.d.ts.map +1 -1
  142. package/lib/exercises/pc/electricity/calculateVoltage.js +1 -0
  143. package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.d.ts.map +1 -1
  144. package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.js +1 -0
  145. package/lib/exercises/pc/electricity/ohmLaw.d.ts.map +1 -1
  146. package/lib/exercises/pc/electricity/ohmLaw.js +1 -0
  147. package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.d.ts.map +1 -1
  148. package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +1 -0
  149. package/lib/exercises/pc/energy/calorificValue.d.ts.map +1 -1
  150. package/lib/exercises/pc/energy/calorificValue.js +1 -0
  151. package/lib/exercises/pc/energy/combustionTransferEnergy.d.ts.map +1 -1
  152. package/lib/exercises/pc/energy/combustionTransferEnergy.js +1 -0
  153. package/lib/exercises/pc/energy/combustionTransferEnergy2.d.ts.map +1 -1
  154. package/lib/exercises/pc/energy/combustionTransferEnergy2.js +1 -0
  155. package/lib/exercises/pc/energy/efficencyOfConverter.d.ts.map +1 -1
  156. package/lib/exercises/pc/energy/efficencyOfConverter.js +1 -0
  157. package/lib/exercises/pc/energy/efficiencyCalculation.d.ts.map +1 -1
  158. package/lib/exercises/pc/energy/efficiencyCalculation.js +1 -0
  159. package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.d.ts.map +1 -1
  160. package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.js +1 -0
  161. package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.d.ts.map +1 -1
  162. package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.js +1 -0
  163. package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.d.ts.map +1 -1
  164. package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.js +1 -0
  165. package/lib/exercises/pc/forces/electroStaticForce.d.ts.map +1 -1
  166. package/lib/exercises/pc/forces/electroStaticForce.js +1 -0
  167. package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.d.ts.map +1 -1
  168. package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.js +1 -0
  169. package/lib/exercises/pc/forces/gravitationalForcePlanets.d.ts.map +1 -1
  170. package/lib/exercises/pc/forces/gravitationalForcePlanets.js +1 -0
  171. package/lib/exercises/pc/forces/massWeight.d.ts.map +1 -1
  172. package/lib/exercises/pc/forces/massWeight.js +1 -0
  173. package/lib/exercises/pc/motion/averageSpeed.d.ts.map +1 -1
  174. package/lib/exercises/pc/motion/averageSpeed.js +1 -0
  175. package/lib/exercises/pc/motion/averageSpeedCalculation.d.ts.map +1 -1
  176. package/lib/exercises/pc/motion/averageSpeedCalculation.js +1 -0
  177. package/lib/exercises/pc/motion/motionReference.d.ts.map +1 -1
  178. package/lib/exercises/pc/motion/motionReference.js +1 -0
  179. package/lib/exercises/pc/pH.d.ts.map +1 -1
  180. package/lib/exercises/pc/pH.js +1 -0
  181. package/lib/exercises/pc/power/calculatePowerOfLight.d.ts.map +1 -1
  182. package/lib/exercises/pc/power/calculatePowerOfLight.js +1 -0
  183. package/lib/exercises/pc/spectral/spectralEnergy.d.ts.map +1 -1
  184. package/lib/exercises/pc/spectral/spectralEnergy.js +1 -0
  185. package/lib/exercises/pc/waves/lightDistanceConversion.d.ts.map +1 -1
  186. package/lib/exercises/pc/waves/lightDistanceConversion.js +1 -0
  187. package/lib/exercises/pc/waves/periodicWaveCelerity.d.ts.map +1 -1
  188. package/lib/exercises/pc/waves/periodicWaveCelerity.js +1 -0
  189. package/lib/exercises/pc/weight/calculateWeight.d.ts.map +1 -1
  190. package/lib/exercises/pc/weight/calculateWeight.js +1 -0
  191. package/lib/exercises/pc/weight/weightOnTheMoon.d.ts.map +1 -1
  192. package/lib/exercises/pc/weight/weightOnTheMoon.js +1 -0
  193. package/lib/index.d.ts +28 -64
  194. package/lib/index.d.ts.map +1 -1
  195. package/lib/index.js +4 -0
  196. package/lib/math/geometry/spacePoint.d.ts +27 -0
  197. package/lib/math/geometry/spacePoint.d.ts.map +1 -0
  198. package/lib/math/geometry/spacePoint.js +80 -0
  199. package/lib/math/geometry/spaceVector.d.ts +28 -0
  200. package/lib/math/geometry/spaceVector.d.ts.map +1 -0
  201. package/lib/math/geometry/spaceVector.js +83 -0
  202. package/lib/math/numbers/decimals/decimal.d.ts +1 -0
  203. package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
  204. package/lib/math/numbers/decimals/decimal.js +8 -0
  205. package/lib/math/numbers/rationals/rational.d.ts +1 -0
  206. package/lib/math/numbers/rationals/rational.d.ts.map +1 -1
  207. package/lib/math/numbers/rationals/rational.js +4 -0
  208. package/lib/playground.d.ts +2 -0
  209. package/lib/playground.d.ts.map +1 -0
  210. package/lib/playground.js +19 -0
  211. package/lib/server.d.ts +3 -0
  212. package/lib/server.d.ts.map +1 -1
  213. package/lib/server.js +6 -0
  214. package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -1
  215. package/lib/tree/nodes/equations/equationSolutionNode.js +8 -0
  216. package/lib/tree/nodes/node.d.ts +1 -0
  217. package/lib/tree/nodes/node.d.ts.map +1 -1
  218. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  219. package/lib/tree/nodes/operators/multiplyNode.js +8 -2
  220. package/lib/tree/nodes/operators/powerNode.js +1 -1
  221. package/lib/utils/alignTex.d.ts +2 -0
  222. package/lib/utils/alignTex.d.ts.map +1 -0
  223. package/lib/utils/alignTex.js +18 -0
  224. package/package.json +1 -1
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.solveEquationByFactorisation = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const getSolveEquationByFactorisationQuestion = () => {
7
+ const question = {
8
+ answer,
9
+ instruction: ``,
10
+ keys: [],
11
+ answerFormat: 'tex',
12
+ identifiers: {}
13
+ };
14
+ return question;
15
+ };
16
+ const getPropositions = (n, { answer }) => {
17
+ const propositions = [];
18
+ (0, exercise_1.addValidProp)(propositions, answer);
19
+ while (propositions.length < n) {
20
+ throw Error("QCM not implemented");
21
+ }
22
+ return (0, exercise_1.shuffleProps)(propositions, n);
23
+ };
24
+ const isAnswerValid = (ans, { answer }) => {
25
+ throw Error("VEA not implemented");
26
+ };
27
+ const isGGBAnswerValid = (ans, { ggbAnswer }) => {
28
+ throw Error("GGBVea not implemented");
29
+ };
30
+ exports.solveEquationByFactorisation = {
31
+ id: 'solveEquationByFactorisation',
32
+ connector: "",
33
+ label: "",
34
+ levels: [],
35
+ isSingleStep: true,
36
+ sections: [],
37
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getSolveEquationByFactorisationQuestion, nb),
38
+ qcmTimer: 60,
39
+ freeTimer: 60,
40
+ getPropositions,
41
+ isAnswerValid,
42
+ isGGBAnswerValid,
43
+ subject: "Mathématiques"
44
+ };
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ a: number;
4
+ b: number;
5
+ type: number;
6
+ };
7
+ export declare const solveSecondDegreeEquationByFactorisation: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=solveSecondDegreeEquationByFactorisation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"solveSecondDegreeEquationByFactorisation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAgBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAgIF,eAAO,MAAM,wCAAwC,EAAE,QAAQ,CAAC,WAAW,CAiB1E,CAAC"}
@@ -0,0 +1,134 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.solveSecondDegreeEquationByFactorisation = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const equationKeys_1 = require("../../../../exercises/utils/keys/equationKeys");
7
+ const rational_1 = require("../../../../math/numbers/rationals/rational");
8
+ const trinom_1 = require("../../../../math/polynomials/trinom");
9
+ const randint_1 = require("../../../../math/utils/random/randint");
10
+ const equationSolutionNode_1 = require("../../../../tree/nodes/equations/equationSolutionNode");
11
+ const discreteSetNode_1 = require("../../../../tree/nodes/sets/discreteSetNode");
12
+ const coinFlip_1 = require("../../../../utils/coinFlip");
13
+ /**
14
+ * Equation donnée sous forme ax^2 + bx ou bien forme développée d'une identité remarquable
15
+ * type 1 ax^2 + bx
16
+ * type 2 (ax+b)^2
17
+ * type 3 (ax-b)^2
18
+ * type 4 (ax+b)(ax-b)
19
+ */
20
+ const getSolveSecondDegreeEquationByFactorisationQuestion = () => {
21
+ const type = (0, randint_1.randint)(1, 4);
22
+ let statement = "";
23
+ let roots = [];
24
+ let answer = "";
25
+ let a;
26
+ let b;
27
+ switch (type) {
28
+ case 1:
29
+ {
30
+ //ax^2 + bx
31
+ const trinom = new trinom_1.Trinom((0, randint_1.randint)(-9, 10, [0]), (0, randint_1.randint)(-9, 10), 0);
32
+ a = trinom.a;
33
+ b = trinom.b;
34
+ statement = trinom.toTex();
35
+ roots = trinom.getRootsNode();
36
+ }
37
+ break;
38
+ case 2:
39
+ {
40
+ //(ax+b)^2
41
+ a = (0, randint_1.randint)(-9, 10, [0]);
42
+ b = (0, randint_1.randint)(1, 10);
43
+ statement = new trinom_1.Trinom(a ** 2, 2 * a * b, b ** 2).toTex();
44
+ roots = [new rational_1.Rational(-b, a).simplify().toTree()];
45
+ }
46
+ break;
47
+ case 3:
48
+ {
49
+ //(ax-b)^2
50
+ a = (0, randint_1.randint)(-9, 10, [0]);
51
+ b = (0, randint_1.randint)(-9, 0, [0]);
52
+ statement = new trinom_1.Trinom(a ** 2, -2 * a * b, b ** 2).toTex();
53
+ roots = [new rational_1.Rational(b, a).simplify().toTree()];
54
+ }
55
+ break;
56
+ case 4:
57
+ default:
58
+ {
59
+ //(ax+b)(ax-b)
60
+ a = (0, randint_1.randint)(-9, 10, [0]);
61
+ b = (0, randint_1.randint)(1, 10);
62
+ statement = new trinom_1.Trinom(a ** 2, 0, -(b ** 2)).toTex();
63
+ roots = [b, -b].sort((a, b) => a - b).map((x) => x.toTree());
64
+ }
65
+ break;
66
+ }
67
+ const instruction = `Soit $f(x) = ${statement}$. Résoudre l'équation $f(x) = 0$.`;
68
+ answer = new equationSolutionNode_1.EquationSolutionNode(new discreteSetNode_1.DiscreteSetNode(roots)).toTex();
69
+ const question = {
70
+ answer,
71
+ instruction,
72
+ keys: [...equationKeys_1.equationKeys],
73
+ answerFormat: "tex",
74
+ identifiers: { a, b, type },
75
+ };
76
+ return question;
77
+ };
78
+ const getPropositions = (n, { answer }) => {
79
+ const propositions = [];
80
+ (0, exercise_1.addValidProp)(propositions, answer);
81
+ while (propositions.length < n) {
82
+ const firstRoot = (0, randint_1.randint)(-10, 10);
83
+ (0, exercise_1.tryToAddWrongProp)(propositions, new equationSolutionNode_1.EquationSolutionNode(new discreteSetNode_1.DiscreteSetNode((0, coinFlip_1.coinFlip)()
84
+ ? [firstRoot.toTree()]
85
+ : [firstRoot, (0, randint_1.randint)(-10, 10, [firstRoot])]
86
+ .sort((a, b) => a - b)
87
+ .map((x) => x.toTree()))).toTex());
88
+ }
89
+ return (0, exercise_1.shuffleProps)(propositions, n);
90
+ };
91
+ const isAnswerValid = (ans, { answer, type, a, b }) => {
92
+ let roots = [];
93
+ switch (type) {
94
+ case 1:
95
+ {
96
+ const trinom = new trinom_1.Trinom(a, b, 0);
97
+ roots = trinom.getRootsNode();
98
+ }
99
+ break;
100
+ case 2:
101
+ {
102
+ roots = [new rational_1.Rational(-b, a).simplify().toTree()];
103
+ }
104
+ break;
105
+ case 3:
106
+ {
107
+ roots = [new rational_1.Rational(b, a).simplify().toTree()];
108
+ }
109
+ break;
110
+ case 4:
111
+ {
112
+ roots = [b, -b].sort((a, b) => a - b).map((x) => x.toTree());
113
+ }
114
+ break;
115
+ }
116
+ const answerTree = new equationSolutionNode_1.EquationSolutionNode(new discreteSetNode_1.DiscreteSetNode(roots), {
117
+ opts: { allowFractionToDecimal: true, allowRawRightChildAsSolution: true },
118
+ });
119
+ return answerTree.toAllValidTexs().includes(ans);
120
+ };
121
+ exports.solveSecondDegreeEquationByFactorisation = {
122
+ id: "solveSecondDegreeEquationByFactorisation",
123
+ connector: "\\iff",
124
+ label: "Résoudre une équation du second degré par factorisation",
125
+ levels: [],
126
+ isSingleStep: true,
127
+ sections: [],
128
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getSolveSecondDegreeEquationByFactorisationQuestion, nb),
129
+ qcmTimer: 60,
130
+ freeTimer: 60,
131
+ getPropositions,
132
+ isAnswerValid,
133
+ subject: "Mathématiques",
134
+ };
@@ -0,0 +1,7 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ coeffs: number[];
4
+ };
5
+ export declare const solveSecondDegreeEquationFromCano: Exercise<Identifiers>;
6
+ export {};
7
+ //# sourceMappingURL=solveSecondDegreeEquationFromCano.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"solveSecondDegreeEquationFromCano.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAkDF,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,WAAW,CAenE,CAAC"}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.solveSecondDegreeEquationFromCano = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const equationKeys_1 = require("../../../../exercises/utils/keys/equationKeys");
7
+ const trinom_1 = require("../../../../math/polynomials/trinom");
8
+ const randint_1 = require("../../../../math/utils/random/randint");
9
+ const equationSolutionNode_1 = require("../../../../tree/nodes/equations/equationSolutionNode");
10
+ const discreteSetNode_1 = require("../../../../tree/nodes/sets/discreteSetNode");
11
+ const getSolveSecondDegreeEquationFromCanoQuestion = () => {
12
+ const trinom = trinom_1.TrinomConstructor.randomCanonical();
13
+ const statement = trinom.getCanonicalForm().toTex();
14
+ const roots = trinom.getRootsNode();
15
+ const answer = new equationSolutionNode_1.EquationSolutionNode(new discreteSetNode_1.DiscreteSetNode(roots)).toTex();
16
+ const question = {
17
+ answer,
18
+ instruction: `Soit $f(x) = ${statement}$. Résoudre l'équation $f(x) = 0$.`,
19
+ keys: [...equationKeys_1.equationKeys],
20
+ answerFormat: "tex",
21
+ identifiers: { coeffs: trinom.coefficients },
22
+ };
23
+ return question;
24
+ };
25
+ const getPropositions = (n, { answer }) => {
26
+ const propositions = [];
27
+ (0, exercise_1.addValidProp)(propositions, answer);
28
+ while (propositions.length < n) {
29
+ (0, exercise_1.tryToAddWrongProp)(propositions, new equationSolutionNode_1.EquationSolutionNode(new discreteSetNode_1.DiscreteSetNode([(0, randint_1.randint)(-9, 0), (0, randint_1.randint)(1, 10)].map((e) => e.toTree()))).toTex());
30
+ }
31
+ return (0, exercise_1.shuffleProps)(propositions, n);
32
+ };
33
+ const isAnswerValid = (ans, { answer, coeffs }) => {
34
+ const trinom = trinom_1.TrinomConstructor.fromCoeffs(coeffs);
35
+ const roots = trinom.getRootsNode();
36
+ const answerTree = new equationSolutionNode_1.EquationSolutionNode(new discreteSetNode_1.DiscreteSetNode(roots), {
37
+ opts: { allowFractionToDecimal: true, allowRawRightChildAsSolution: true },
38
+ });
39
+ const texs = answerTree.toAllValidTexs();
40
+ return texs.includes(ans);
41
+ };
42
+ const isGGBAnswerValid = (ans, { ggbAnswer }) => {
43
+ throw Error("GGBVea not implemented");
44
+ };
45
+ exports.solveSecondDegreeEquationFromCano = {
46
+ id: "solveSecondDegreeEquationFromCano",
47
+ connector: "\\iff",
48
+ label: "Résoudre une équation du type $a(x-b)^2 + c = 0$",
49
+ levels: [],
50
+ isSingleStep: true,
51
+ sections: [],
52
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getSolveSecondDegreeEquationFromCanoQuestion, nb),
53
+ qcmTimer: 60,
54
+ freeTimer: 60,
55
+ getPropositions,
56
+ isAnswerValid,
57
+ isGGBAnswerValid,
58
+ subject: "Mathématiques",
59
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"scalarProductViaCoords.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/scalarProductViaCoords.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAgDF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
1
+ {"version":3,"file":"scalarProductViaCoords.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/scalarProductViaCoords.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAgDF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAexD,CAAC"}
@@ -52,4 +52,5 @@ exports.scalarProductViaCoords = {
52
52
  getPropositions,
53
53
  isAnswerValid,
54
54
  subject: "Mathématiques",
55
+ hasHintAndCorrection: true,
55
56
  };
@@ -15,6 +15,7 @@ export * from "./primitive";
15
15
  export * from "./probaStat";
16
16
  export * from "./sequences";
17
17
  export * from "./sets";
18
+ export * from "./spaceGeometry";
18
19
  export * from "./squareRoots";
19
20
  export * from "./trigonometry";
20
21
  export * from "./python";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exercises/math/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exercises/math/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
@@ -31,6 +31,7 @@ __exportStar(require("./primitive"), exports);
31
31
  __exportStar(require("./probaStat"), exports);
32
32
  __exportStar(require("./sequences"), exports);
33
33
  __exportStar(require("./sets"), exports);
34
+ __exportStar(require("./spaceGeometry"), exports);
34
35
  __exportStar(require("./squareRoots"), exports);
35
36
  __exportStar(require("./trigonometry"), exports);
36
37
  __exportStar(require("./python"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"applyPercent.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/applyPercent.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAsDF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAuB9C,CAAC"}
1
+ {"version":3,"file":"applyPercent.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/applyPercent.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AA6EF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAwB9C,CAAC"}
@@ -14,14 +14,17 @@ const getApplyPercentQuestion = () => {
14
14
  let instruction = "";
15
15
  let ans = "";
16
16
  let ansNb = 0;
17
+ let cm = 0;
17
18
  const isUp = (0, coinFlip_1.coinFlip)();
18
19
  if (isUp) {
19
- ansNb = (0, round_1.round)(randNbr * (1 + randPercent / 100), 2);
20
+ cm = 1 + randPercent / 100;
21
+ ansNb = (0, round_1.round)(randNbr * cm, 2);
20
22
  ans = (ansNb + "").replace(".", ",");
21
23
  instruction = `Appliquer une hausse de $${randPercent}\\%$ à $${randNbr}$.`;
22
24
  }
23
25
  else {
24
- ansNb = (0, round_1.round)(randNbr * (1 - randPercent / 100), 2);
26
+ cm = 1 - randPercent / 100;
27
+ ansNb = (0, round_1.round)(randNbr * cm, 2);
25
28
  ans = (ansNb + "").replace(".", ",");
26
29
  instruction = `Appliquer une baisse de $${randPercent}\\%$ à $${randNbr}$.`;
27
30
  }
@@ -31,6 +34,20 @@ const getApplyPercentQuestion = () => {
31
34
  answer,
32
35
  keys: ["percent"],
33
36
  answerFormat: "tex",
37
+ hint: isUp
38
+ ? `Augmenter un nombre de $x\\%$ revient à le multiplier par $1 + \\frac{x}{100}$.`
39
+ : `Baisser un nombre de $x\\%$ revient à le multiplier par $1 - \\frac{x}{100}$.`,
40
+ correction: isUp
41
+ ? `Augmenter un nombre de $${randPercent}\\%$ revient à le multiplier par $1 + \\frac{${randPercent}}{100}$, c'est à dire par $${(0, round_1.round)(cm, 2).frenchify()}$.
42
+
43
+ On a donc $${randNbr}\\times ${(0, round_1.round)(cm, 2).frenchify()} = ${answer}$.
44
+
45
+ `
46
+ : `Baisser un nombre de $${randPercent}\\%$ revient à le multiplier par $1 - \\frac{${randPercent}}{100}$, c'est à dire par $${(0, round_1.round)(cm, 2).frenchify()}$.
47
+
48
+ On a donc $${randNbr}\\times ${(0, round_1.round)(cm, 2).frenchify()} = ${answer}$.
49
+
50
+ `,
34
51
  identifiers: { isUp, randNbr, randPercent },
35
52
  };
36
53
  return question;
@@ -76,4 +93,5 @@ exports.applyPercent = {
76
93
  getPropositions,
77
94
  isAnswerValid,
78
95
  subject: "Mathématiques",
96
+ hasHintAndCorrection: true,
79
97
  };
@@ -0,0 +1,11 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ rank1: number;
4
+ value1: number;
5
+ rank2: number;
6
+ value2: number;
7
+ rankAsked: number;
8
+ };
9
+ export declare const arithmeticFindRandomTermFromTwoTerms: Exercise<Identifiers>;
10
+ export {};
11
+ //# sourceMappingURL=arithmeticFindRandomTermFromTwoTerms.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arithmeticFindRandomTermFromTwoTerms.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAIlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAqCF,eAAO,MAAM,oCAAoC,EAAE,QAAQ,CAAC,WAAW,CAetE,CAAC"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.arithmeticFindRandomTermFromTwoTerms = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const randint_1 = require("../../../../math/utils/random/randint");
7
+ const getArithmeticFindRandomTermFromTwoTermsQuestion = () => {
8
+ const rank1 = (0, randint_1.randint)(0, 10);
9
+ const rank2 = rank1 + (0, randint_1.randint)(2, 6);
10
+ const reason = (0, randint_1.randint)(-10, 10, [0]);
11
+ const value1 = (0, randint_1.randint)(-10, 10);
12
+ const value2 = reason * (rank2 - rank1) + value1;
13
+ const rankAsked = (0, randint_1.randint)(0, 15, [rank1, rank2]);
14
+ const value3 = reason * (rankAsked - rank1) + value1;
15
+ const answer = value3 + "";
16
+ const question = {
17
+ answer,
18
+ instruction: `Soit $u$ une suite arithmétique telle que $u_{${rank1}} = ${value1}$ et $u_{${rank2}} = ${value2}$. Quelle est la valeur de $u_{${rankAsked}}$ ?`,
19
+ keys: [],
20
+ answerFormat: "tex",
21
+ identifiers: { rank1, value1, rank2, value2, rankAsked },
22
+ };
23
+ return question;
24
+ };
25
+ const getPropositions = (n, { answer }) => {
26
+ const propositions = [];
27
+ (0, exercise_1.addValidProp)(propositions, answer);
28
+ while (propositions.length < n) {
29
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, randint_1.randint)(-20, 20) + "");
30
+ }
31
+ return (0, exercise_1.shuffleProps)(propositions, n);
32
+ };
33
+ const isAnswerValid = (ans, { answer }) => {
34
+ return ans === answer;
35
+ };
36
+ exports.arithmeticFindRandomTermFromTwoTerms = {
37
+ id: "arithmeticFindRandomTermFromTwoTerms",
38
+ connector: "=",
39
+ label: "Déterminer un terme d'une suite arithmétique en en connaissant deux autres",
40
+ levels: [],
41
+ isSingleStep: true,
42
+ sections: [],
43
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getArithmeticFindRandomTermFromTwoTermsQuestion, nb),
44
+ qcmTimer: 60,
45
+ freeTimer: 60,
46
+ getPropositions,
47
+ isAnswerValid,
48
+ subject: "Mathématiques",
49
+ };
@@ -12,4 +12,5 @@ export * from "./recognizeArithmeticFromGraph";
12
12
  export * from "./arithmeticFirstTermsSum";
13
13
  export * from "./arithmeticFindExplictFormulaFirstTermRandom";
14
14
  export * from "./arithmeticFindReasonRandomRange";
15
+ export * from "./arithmeticFindRandomTermFromTwoTerms";
15
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mCAAmC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC"}
@@ -28,3 +28,4 @@ __exportStar(require("./recognizeArithmeticFromGraph"), exports);
28
28
  __exportStar(require("./arithmeticFirstTermsSum"), exports);
29
29
  __exportStar(require("./arithmeticFindExplictFormulaFirstTermRandom"), exports);
30
30
  __exportStar(require("./arithmeticFindReasonRandomRange"), exports);
31
+ __exportStar(require("./arithmeticFindRandomTermFromTwoTerms"), exports);
@@ -0,0 +1,2 @@
1
+ export * from "./vectors";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/spaceGeometry/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
@@ -0,0 +1,17 @@
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("./vectors"), exports);
@@ -0,0 +1,4 @@
1
+ export * from "./spaceVectorNormCalculation";
2
+ export * from "./spaceVectorCoordinatesFromPoints";
3
+ export * from "./spaceVectorLinearCombinationCoords";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/vectors/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC"}
@@ -0,0 +1,19 @@
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("./spaceVectorNormCalculation"), exports);
18
+ __exportStar(require("./spaceVectorCoordinatesFromPoints"), exports);
19
+ __exportStar(require("./spaceVectorLinearCombinationCoords"), exports);
@@ -0,0 +1,5 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {};
3
+ export declare const spaceVectorCoordinatesFromPoints: Exercise<Identifiers>;
4
+ export {};
5
+ //# sourceMappingURL=spaceVectorCoordinatesFromPoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spaceVectorCoordinatesFromPoints.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG,EAAE,CAAC;AA6CtB,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAelE,CAAC"}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.spaceVectorCoordinatesFromPoints = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const spacePoint_1 = require("../../../../math/geometry/spacePoint");
7
+ const spaceVector_1 = require("../../../../math/geometry/spaceVector");
8
+ const getSpaceVectorCoordinatesFromPointsQuestion = () => {
9
+ const points = spacePoint_1.SpacePointConstructor.randomDifferent(["A", "B"]);
10
+ const vector = spaceVector_1.SpaceVectorConstructor.fromPoints(points[0], points[1]);
11
+ const answer = vector.toInlineCoordsTex();
12
+ const question = {
13
+ answer,
14
+ instruction: `Soit deux points $${points[0].toTexWithCoords()}$ et $${points[1].toTexWithCoords()}$. Quelles sont les coordonnées du vecteur $\\overrightarrow{AB}$ ?`,
15
+ keys: ["semicolon"],
16
+ answerFormat: "tex",
17
+ identifiers: {
18
+ ax: points[0].x.evaluate({}),
19
+ ay: points[0].y.evaluate({}),
20
+ az: points[0].z.evaluate({}),
21
+ bx: points[1].x.evaluate({}),
22
+ by: points[1].y.evaluate({}),
23
+ bz: points[1].z.evaluate({}),
24
+ },
25
+ };
26
+ return question;
27
+ };
28
+ const getPropositions = (n, { answer }) => {
29
+ const propositions = [];
30
+ (0, exercise_1.addValidProp)(propositions, answer);
31
+ while (propositions.length < n) {
32
+ (0, exercise_1.tryToAddWrongProp)(propositions, spacePoint_1.SpacePointConstructor.random("C").toCoords());
33
+ }
34
+ return (0, exercise_1.shuffleProps)(propositions, n);
35
+ };
36
+ const isAnswerValid = (ans, { answer }) => {
37
+ return [ans, ans.replace(",", ";"), "\\left(" + ans + "\\right)"].includes(answer);
38
+ };
39
+ exports.spaceVectorCoordinatesFromPoints = {
40
+ id: "spaceVectorCoordinatesFromPoints",
41
+ connector: "=",
42
+ label: "Déterminer les coordonnées d'un vecteur à partir de deux points (dans l'espace)",
43
+ levels: [],
44
+ isSingleStep: true,
45
+ sections: [],
46
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getSpaceVectorCoordinatesFromPointsQuestion, nb),
47
+ qcmTimer: 60,
48
+ freeTimer: 60,
49
+ getPropositions,
50
+ isAnswerValid,
51
+ subject: "Mathématiques",
52
+ };
@@ -0,0 +1,5 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {};
3
+ export declare const spaceVectorLinearCombinationCoords: Exercise<Identifiers>;
4
+ export {};
5
+ //# sourceMappingURL=spaceVectorLinearCombinationCoords.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spaceVectorLinearCombinationCoords.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG,EAAE,CAAC;AA2DtB,eAAO,MAAM,kCAAkC,EAAE,QAAQ,CAAC,WAAW,CAepE,CAAC"}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.spaceVectorLinearCombinationCoords = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const spacePoint_1 = require("../../../../math/geometry/spacePoint");
7
+ const spaceVector_1 = require("../../../../math/geometry/spaceVector");
8
+ const randint_1 = require("../../../../math/utils/random/randint");
9
+ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
10
+ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
11
+ // coords de au + bv en 3D
12
+ const getSpaceVectorLinearCombinationCoordsQuestion = () => {
13
+ const a = (0, randint_1.randint)(-10, 11, [0]);
14
+ const b = (0, randint_1.randint)(-10, 11, [0]);
15
+ const [u, v] = spaceVector_1.SpaceVectorConstructor.randomDifferents(["u", "v"], false);
16
+ const answer = u
17
+ .times(a.toTree())
18
+ .add(v.times(b.toTree()))
19
+ .toInlineCoordsTex();
20
+ const question = {
21
+ answer,
22
+ instruction: `Soit deux vecteurs $${u.toTexWithCoords()}$ et $${v.toTexWithCoords()}$. Calculer les coordonnées du vecteur $${new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(a.toTree(), u.toTex().toTree()), new multiplyNode_1.MultiplyNode(b.toTree(), v.toTex().toTree())).toTex()}$`,
23
+ keys: ["semicolon"],
24
+ answerFormat: "tex",
25
+ identifiers: {
26
+ a,
27
+ b,
28
+ ux: u.x.evaluate({}),
29
+ uy: u.y.evaluate({}),
30
+ uz: u.z.evaluate({}),
31
+ vx: v.x.evaluate({}),
32
+ vy: v.y.evaluate({}),
33
+ vz: v.z.evaluate({}),
34
+ },
35
+ };
36
+ return question;
37
+ };
38
+ const getPropositions = (n, { answer }) => {
39
+ const propositions = [];
40
+ (0, exercise_1.addValidProp)(propositions, answer);
41
+ while (propositions.length < n) {
42
+ (0, exercise_1.tryToAddWrongProp)(propositions, spacePoint_1.SpacePointConstructor.random("A", { min: -100, max: 100 }, { min: -100, max: 100 }, { min: -100, max: 100 }).toCoords());
43
+ }
44
+ return (0, exercise_1.shuffleProps)(propositions, n);
45
+ };
46
+ const isAnswerValid = (ans, { answer }) => {
47
+ return [ans, ans.replace(",", ";"), "\\left(" + ans + "\\right)"].includes(answer);
48
+ };
49
+ exports.spaceVectorLinearCombinationCoords = {
50
+ id: "spaceVectorLinearCombinationCoords",
51
+ connector: "=",
52
+ label: "Calcul des coordonnées du vecteur $a\\overrightarrow{u} + b\\overrightarrow{v}$ (dans l'espace)",
53
+ levels: [],
54
+ isSingleStep: true,
55
+ sections: [],
56
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getSpaceVectorLinearCombinationCoordsQuestion, nb),
57
+ qcmTimer: 60,
58
+ freeTimer: 60,
59
+ getPropositions,
60
+ isAnswerValid,
61
+ subject: "Mathématiques",
62
+ };