math-exercises 3.0.176 → 3.0.178

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 (136) hide show
  1. package/lib/exercises/math/derivation/variations/readExtremaAbscissFromDerivativeCurve.js +1 -1
  2. package/lib/exercises/math/functions/trinoms/sign/index.d.ts +1 -0
  3. package/lib/exercises/math/functions/trinoms/sign/index.d.ts.map +1 -1
  4. package/lib/exercises/math/functions/trinoms/sign/index.js +1 -0
  5. package/lib/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.d.ts +8 -0
  6. package/lib/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.d.ts.map +1 -0
  7. package/lib/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.js +233 -0
  8. package/lib/exercises/math/geometry/angles/parallelogramFourthAngle.d.ts.map +1 -1
  9. package/lib/exercises/math/geometry/angles/parallelogramFourthAngle.js +10 -10
  10. package/lib/exercises/math/geometry/quadrilaterals/parallelogramAngles.js +8 -8
  11. package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWithAngles.js +6 -6
  12. package/lib/exercises/math/geometry/triangles/triangleThirdAngleValue.js +8 -8
  13. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.js +1 -1
  14. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.js +2 -2
  15. package/lib/exercises/math/geometry/vectors/scalarProduct/angleFromScalarProduct.js +2 -2
  16. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.d.ts.map +1 -1
  17. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.js +31 -6
  18. package/lib/exercises/math/probaStat/randomVariable/index.d.ts.map +1 -1
  19. package/lib/exercises/math/probaStat/randomVariable/index.js +1 -0
  20. package/lib/exercises/math/probaStat/trees/index.d.ts +1 -3
  21. package/lib/exercises/math/probaStat/trees/index.d.ts.map +1 -1
  22. package/lib/exercises/math/probaStat/trees/index.js +8 -3
  23. package/lib/exercises/math/probaStat/trees/probabilityTree.d.ts +3 -9
  24. package/lib/exercises/math/probaStat/trees/probabilityTree.d.ts.map +1 -1
  25. package/lib/exercises/math/probaStat/trees/probabilityTree.js +45 -419
  26. package/lib/exercises/math/probaStat/trees/probabilityTreeV2.d.ts +25 -0
  27. package/lib/exercises/math/probaStat/trees/probabilityTreeV2.d.ts.map +1 -0
  28. package/lib/exercises/math/probaStat/trees/probabilityTreeV2.js +625 -0
  29. package/lib/exercises/math/python/index.d.ts +1 -0
  30. package/lib/exercises/math/python/index.d.ts.map +1 -1
  31. package/lib/exercises/math/python/index.js +1 -0
  32. package/lib/exercises/math/python/sequences/pySequenceThresholdInstructionCompletion.d.ts.map +1 -1
  33. package/lib/exercises/math/python/sequences/pySequenceThresholdInstructionCompletion.js +11 -8
  34. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFromTwoTerms.d.ts.map +1 -1
  35. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFromTwoTerms.js +4 -3
  36. package/lib/exercises/math/sequences/arithmetic/index.d.ts +4 -3
  37. package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
  38. package/lib/exercises/math/sequences/arithmetic/index.js +4 -3
  39. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindExplicitFormulaFromSituation.d.ts.map +1 -1
  40. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindExplicitFormulaFromSituation.js +3 -2
  41. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRankFromSituation.d.ts.map +1 -1
  42. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRankFromSituation.js +8 -6
  43. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindThresholdFromSituation.d.ts.map +1 -1
  44. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindThresholdFromSituation.js +6 -5
  45. package/lib/exercises/math/sequences/arithmetic/situations/index.d.ts +0 -2
  46. package/lib/exercises/math/sequences/arithmetic/situations/index.d.ts.map +1 -1
  47. package/lib/exercises/math/sequences/arithmetic/situations/index.js +2 -2
  48. package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.d.ts +1 -0
  49. package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.d.ts.map +1 -1
  50. package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.js +65 -14
  51. package/lib/exercises/math/sequences/arithmetic/sum/index.d.ts +0 -1
  52. package/lib/exercises/math/sequences/arithmetic/sum/index.d.ts.map +1 -1
  53. package/lib/exercises/math/sequences/arithmetic/sum/index.js +1 -1
  54. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.d.ts +14 -0
  55. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.d.ts.map +1 -0
  56. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.js +291 -0
  57. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoTerms.d.ts.map +1 -1
  58. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoTerms.js +4 -3
  59. package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.d.ts +15 -0
  60. package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.d.ts.map +1 -0
  61. package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.js +249 -0
  62. package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoTerms.js +1 -1
  63. package/lib/exercises/math/sequences/geometric/index.d.ts +6 -2
  64. package/lib/exercises/math/sequences/geometric/index.d.ts.map +1 -1
  65. package/lib/exercises/math/sequences/geometric/index.js +6 -2
  66. package/lib/exercises/math/sequences/geometric/situations/geometricFindExplicitFormulaFromSituation.d.ts.map +1 -1
  67. package/lib/exercises/math/sequences/geometric/situations/geometricFindExplicitFormulaFromSituation.js +3 -2
  68. package/lib/exercises/math/sequences/geometric/situations/geometricFindTermFromSituation.js +1 -1
  69. package/lib/exercises/math/sequences/geometric/sum/geometricComputeSumWithDots.js +2 -2
  70. package/lib/exercises/math/sequences/graph/placeFirstSequencePoints.js +2 -2
  71. package/lib/exercises/math/sequences/index.d.ts +1 -0
  72. package/lib/exercises/math/sequences/index.d.ts.map +1 -1
  73. package/lib/exercises/math/sequences/index.js +1 -0
  74. package/lib/exercises/math/sequences/seqArithmGeom/seqArithmGeomRecurrenceFormulaUsage.d.ts.map +1 -1
  75. package/lib/exercises/math/sequences/seqArithmGeom/seqArithmGeomRecurrenceFormulaUsage.js +5 -9
  76. package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.2d.js +1 -1
  77. package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.d.ts.map +1 -1
  78. package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.js +17 -8
  79. package/lib/exercises/math/trigonometry/circle/index.d.ts +2 -0
  80. package/lib/exercises/math/trigonometry/circle/index.d.ts.map +1 -1
  81. package/lib/exercises/math/trigonometry/circle/index.js +2 -1
  82. package/lib/exercises/math/trigonometry/circle/mainRemarkableValues.d.ts.map +1 -1
  83. package/lib/exercises/math/trigonometry/circle/mainRemarkableValues.js +57 -0
  84. package/lib/exercises/math/trigonometry/circle/remarkableValues.d.ts.map +1 -1
  85. package/lib/exercises/math/trigonometry/circle/remarkableValues.js +88 -0
  86. package/lib/exercises/math/trigonometry/circle/selectQuadrantOnTrigoCircle.d.ts +5 -0
  87. package/lib/exercises/math/trigonometry/circle/selectQuadrantOnTrigoCircle.d.ts.map +1 -1
  88. package/lib/exercises/math/trigonometry/circle/selectQuadrantOnTrigoCircle.js +92 -94
  89. package/lib/exercises/math/trigonometry/functions/associateAngleSimplification.d.ts +11 -0
  90. package/lib/exercises/math/trigonometry/functions/associateAngleSimplification.d.ts.map +1 -0
  91. package/lib/exercises/math/trigonometry/functions/associateAngleSimplification.js +166 -0
  92. package/lib/exercises/math/trigonometry/functions/basicEquationCos.d.ts.map +1 -1
  93. package/lib/exercises/math/trigonometry/functions/basicEquationCos.js +54 -9
  94. package/lib/exercises/math/trigonometry/functions/basicEquationSin.d.ts.map +1 -1
  95. package/lib/exercises/math/trigonometry/functions/basicEquationSin.js +54 -8
  96. package/lib/exercises/math/trigonometry/functions/equationSinOnRandomInterval.js +1 -2
  97. package/lib/exercises/math/trigonometry/functions/index.d.ts +1 -0
  98. package/lib/exercises/math/trigonometry/functions/index.d.ts.map +1 -1
  99. package/lib/exercises/math/trigonometry/functions/index.js +1 -0
  100. package/lib/exercises/math/trigonometry/triangle/trigonometryAngleCalcul.js +2 -2
  101. package/lib/exercises/pc/snellDescartes.js +2 -2
  102. package/lib/index.d.ts +165 -36
  103. package/lib/index.d.ts.map +1 -1
  104. package/lib/latexTester.d.ts.map +1 -1
  105. package/lib/latexTester.js +8 -5
  106. package/lib/math/polynomials/affine.d.ts +1 -0
  107. package/lib/math/polynomials/affine.d.ts.map +1 -1
  108. package/lib/math/polynomials/affine.js +5 -0
  109. package/lib/math/utils/arithmetic/primeFactors.js +1 -1
  110. package/lib/math/utils/functions/functionComposition.d.ts.map +1 -1
  111. package/lib/math/utils/functions/functionComposition.js +18 -1
  112. package/lib/math/utils/random/randTupleInt.d.ts +1 -0
  113. package/lib/math/utils/random/randTupleInt.d.ts.map +1 -1
  114. package/lib/math/utils/random/randTupleInt.js +1 -1
  115. package/lib/math/utils/sequences/situations/seqArithmeticSituations.d.ts +18 -4
  116. package/lib/math/utils/sequences/situations/seqArithmeticSituations.d.ts.map +1 -1
  117. package/lib/math/utils/sequences/situations/seqArithmeticSituations.js +437 -336
  118. package/lib/math/utils/sequences/situations/seqArithmeticUtils.d.ts.map +1 -1
  119. package/lib/math/utils/sequences/situations/seqArithmeticUtils.js +3 -1
  120. package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts +5 -0
  121. package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts.map +1 -1
  122. package/lib/math/utils/sequences/situations/seqGeometricSituations.js +58 -25
  123. package/lib/prototypesEnhancement.d.ts +1 -0
  124. package/lib/prototypesEnhancement.d.ts.map +1 -1
  125. package/lib/prototypesEnhancement.js +3 -0
  126. package/lib/tests/pdfs/mdCodeToLatex.d.ts.map +1 -1
  127. package/lib/tests/pdfs/mdCodeToLatex.js +8 -15
  128. package/lib/tests/questionTest.d.ts.map +1 -1
  129. package/lib/tests/questionTest.js +6 -3
  130. package/lib/tree/nodes/algebraicNode.d.ts +1 -0
  131. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
  132. package/lib/tree/nodes/geometry/degree.js +1 -1
  133. package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
  134. package/lib/tree/nodes/operators/addNode.js +4 -2
  135. package/lib/tree/parsers/degreeParser.js +2 -2
  136. package/package.json +1 -1
@@ -24,7 +24,7 @@ const getInstruction = (identifiers, optsIn) => {
24
24
  const situation = situations[situationIndex];
25
25
  return `${situation.getStrSituation(initial, reason, firstRank, superfluousData)}
26
26
 
27
- Que vaut $u_{${rankAsked}}$ ?`;
27
+ Quel calcul permet de trouver $u_{${rankAsked}}$ ?`;
28
28
  };
29
29
  const getAnswerNode = (identifiers, opts) => {
30
30
  const firstRank = opts?.firstTermRankOne ? 1 : 0;
@@ -185,7 +185,7 @@ const createRandomIdentifiers = (opts) => {
185
185
  const initial = randint(-9, 10, [0]);
186
186
  const signReason = coinFlip() ? 1 : -1;
187
187
  const reason = signReason * randint(2, 6);
188
- const nbTerms = randint(7, 15);
188
+ const nbTerms = randint(5, 9);
189
189
  const minRankDots = firstRank + 2;
190
190
  const lastRank = firstRank + nbTerms - 1;
191
191
  const lowRankDots = randint(minRankDots, Math.min(minRankDots + randint(1, 3), lastRank));
@@ -225,7 +225,7 @@ const options = [
225
225
  generatorOptionFirstTermRankOne,
226
226
  {
227
227
  id: "isGiveCount",
228
- label: "Donner $n$",
228
+ label: "Donner le nombre de termes de la somme dans la consigne",
229
229
  target: GeneratorOptionTarget.generation,
230
230
  type: GeneratorOptionType.checkbox,
231
231
  defaultValue: optsDefault.isGiveCount,
@@ -102,12 +102,12 @@ export const placeFirstSequencePoints = {
102
102
  isGGBAnswerValid,
103
103
  subject: "Mathématiques",
104
104
  getHint,
105
- getInstruction,
106
105
  getCorrection,
106
+ hasHintAndCorrection: true,
107
+ getInstruction,
107
108
  getGGBAnswer,
108
109
  getStudentGGBOptions,
109
110
  answerType: "GGB",
110
111
  getQuestionFromIdentifiers,
111
112
  options,
112
- hasHintAndCorrection: true,
113
113
  };
@@ -7,5 +7,6 @@ export * from "./sequenceEvaluation.js";
7
7
  export * from "./sequencePlot.js";
8
8
  export * from "./graph/index.js";
9
9
  export * from "./notation/index.js";
10
+ export * from "./seqArithmGeom/index.js";
10
11
  export * from "./variations/index.js";
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sequences/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sequences/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AAEzC,cAAc,uBAAuB,CAAC"}
@@ -7,5 +7,6 @@ export * from "./sequenceEvaluation.js";
7
7
  export * from "./sequencePlot.js";
8
8
  export * from "./graph/index.js";
9
9
  export * from "./notation/index.js";
10
+ export * from "./seqArithmGeom/index.js";
10
11
  // export * from "./limits/index.js";
11
12
  export * from "./variations/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"seqArithmGeomRecurrenceFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/seqArithmGeom/seqArithmGeomRecurrenceFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,sBAAsB,EACvB,MAAM,mDAAmD,CAAC;AA8C3D,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAoMF,KAAK,OAAO,GAAG,sBAAsB,GAAG;IAAE,mBAAmB,EAAE,MAAM,CAAA;CAAE,CAAC;AAkBxE,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CACxD,WAAW,EACX,OAAO,CAoBR,CAAC"}
1
+ {"version":3,"file":"seqArithmGeomRecurrenceFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/seqArithmGeom/seqArithmGeomRecurrenceFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,sBAAsB,EACvB,MAAM,mDAAmD,CAAC;AA8C3D,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA+LF,KAAK,OAAO,GAAG,sBAAsB,GAAG;IAAE,mBAAmB,EAAE,MAAM,CAAA;CAAE,CAAC;AAkBxE,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CACxD,WAAW,EACX,OAAO,CAoBR,CAAC"}
@@ -26,9 +26,11 @@ const getDictSequenceSlice = (coeffs, rank1, value1, rankAsked) => {
26
26
  return acc;
27
27
  }, { [rank1]: value1.toTree() });
28
28
  };
29
- const getInstruction = (identifiers) => {
29
+ const getInstruction = (identifiers, optsIn) => {
30
+ const opts = optsIn ?? optsDefault;
31
+ const firstRank = opts.firstTermRankOne ? 1 : 0;
30
32
  const { rank1, value1, coeffs, rankAsked } = identifiers;
31
- return `$(u_n)$ est une suite définie par, pour $n\\geq 1$ :
33
+ return `$(u_n)$ est une suite définie par, pour $n\\geq ${firstRank}$ :
32
34
 
33
35
  $$
34
36
  u_{n+1} = ${getNodeUNext(coeffs).toTex()}
@@ -38,11 +40,6 @@ et $u_{${rank1}} = ${value1}$.
38
40
 
39
41
  Calculer le terme $u_{${rankAsked}}$.`;
40
42
  };
41
- const getStartStatement = (identifiers) => {
42
- const { rank1 } = identifiers;
43
- const askedRank = rank1 + 1;
44
- return `u_{${askedRank}}`;
45
- };
46
43
  const getAnswerStuff = (identifiers) => {
47
44
  const { rank1, value1, coeffs, rankAsked } = identifiers;
48
45
  const dictSequenceSlice = getDictSequenceSlice(coeffs, rank1, value1, rankAsked);
@@ -149,7 +146,7 @@ const getSeqArithmGeomRecurrenceFormulaUsageQuestion = (optsIn) => {
149
146
  const distanceOfRankAsked = Number(opts.distanceOfRankAsked);
150
147
  const rank1 = randint(firstRank, 20);
151
148
  const value1 = randint(-10, 10);
152
- const a = randint(-10, 10, [0]);
149
+ const a = randint(-10, 10, [0, 1]);
153
150
  const b = randint(-10, 10, [0]);
154
151
  const coeffs = [a, b];
155
152
  const rankAsked = rank1 + distanceOfRankAsked;
@@ -159,7 +156,6 @@ const getSeqArithmGeomRecurrenceFormulaUsageQuestion = (optsIn) => {
159
156
  const getQuestionFromIdentifiers = (identifiers, opts) => {
160
157
  const question = {
161
158
  instruction: getInstruction(identifiers, opts),
162
- startStatement: getStartStatement(identifiers, opts),
163
159
  answer: getAnswer(identifiers, opts),
164
160
  keys: [],
165
161
  answerFormat: "tex",
@@ -152,7 +152,7 @@ const getKeys = () => {
152
152
  return ["degree", "N", "O", "S", "E"];
153
153
  };
154
154
  const isAnswerValid = (ans, { answer }) => {
155
- const ansRefined = ans.replace("^{\\circ}", "°");
155
+ const ansRefined = ans.replace("^{\\circ}", "°").replace("^\\circ", "°");
156
156
  return ansRefined === answer;
157
157
  };
158
158
  const getSphereLatLonReading2dQuestion = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"findAngleFromCosAndSin.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/circle/findAngleFromCosAndSin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAoHF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAkBxD,CAAC"}
1
+ {"version":3,"file":"findAngleFromCosAndSin.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/circle/findAngleFromCosAndSin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA4HF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAmBxD,CAAC"}
@@ -30,14 +30,13 @@ const getHint = (identifiers) => {
30
30
  const isSinPos = value.sin.evaluate() > 0;
31
31
  return `Puisque $\\cos(a)$ est ${isCosPos ? "positif" : "négatif"}, le point image de $a$ sur le cercle trigonométrique se trouve ${isCosPos ? "à droite" : "à gauche"} de l'axe des ordonnées.
32
32
 
33
- De plus, puisque $\\sin(a)$ est ${isSinPos ? "positif" : "négatif"}, le point image de $a$ sur le cercle trigonométrique se trouve ${isSinPos ? "au-dessus" : "en-dessous"} de l'axe des abscisses.`;
33
+ De plus, puisque $\\sin(a)$ est ${isSinPos ? "positif" : "négatif"}, le point image de $a$ sur le cercle trigonométrique se trouve ${isSinPos ? "au-dessus" : "en-dessous"} de l'axe des abscisses.
34
+
35
+ Sers-toi ensuite du cercle trigonométrique ci-dessous pour trouver la valeur de $a$ :
36
+
37
+ ![](https://heureuxhasarddocsbucket.s3.eu-west-3.amazonaws.com/mathliveV2/activities/quizzes/generator/piCercle_nombres.jpg)`;
34
38
  };
35
39
  const getCorrection = (identifiers) => {
36
- const { point } = identifiers;
37
- const value = mainTrigoValues.find((e) => e.point === point);
38
- const isCosPos = value.cos.evaluate() > 0;
39
- const isSinPos = value.sin.evaluate() > 0;
40
- const answer = getAnswer(identifiers);
41
40
  return `On rappelle les valeurs remarquables des fonctions cosinus et sinus :
42
41
 
43
42
  ${mdTable([
@@ -67,7 +66,16 @@ ${mdTable([
67
66
  ],
68
67
  ])}
69
68
 
70
- ${isCosPos && isSinPos ? `L'angle recherché est donc $${answer}$.` : ``}`;
69
+ Puis, on se sers du cercle trigonométrique ci-dessous :
70
+
71
+ ![](https://heureuxhasarddocsbucket.s3.eu-west-3.amazonaws.com/mathliveV2/activities/quizzes/generator/piCercle_nombres.jpg)
72
+
73
+ On en déduit donc que :
74
+
75
+ $$
76
+ a = ${getAnswer(identifiers)}
77
+ $$
78
+ `;
71
79
  };
72
80
  const getKeys = () => {
73
81
  return ["pi"];
@@ -105,7 +113,7 @@ export const findAngleFromCosAndSin = {
105
113
  connector: "=",
106
114
  label: "Déterminer $a$ en connaissant $\\cos(a)$ et $\\sin(a)$",
107
115
  isSingleStep: true,
108
- generator: (nb, opts) => getDistinctQuestions(() => getFindAngleFromCosAndSinQuestion(opts), nb),
116
+ generator: (nb, opts) => getDistinctQuestions(() => getFindAngleFromCosAndSinQuestion(opts), nb, 15),
109
117
  qcmTimer: 60,
110
118
  freeTimer: 60,
111
119
  getPropositions,
@@ -117,4 +125,5 @@ export const findAngleFromCosAndSin = {
117
125
  getAnswer,
118
126
  getQuestionFromIdentifiers,
119
127
  hasHintAndCorrection: true,
128
+ maxAllowedQuestions: 15,
120
129
  };
@@ -4,7 +4,9 @@ export * from "./mainRemarkableValues.js";
4
4
  export * from "./remarkableValues.js";
5
5
  export * from "./areReelsOnTheSameTrigoCirclePoint.js";
6
6
  export * from "./associateReelToTrigoCirclePoint.js";
7
+ export * from "./findAngleFromCosAndSin.js";
7
8
  export * from "./placeAssociateAngleOnCircle.js";
8
9
  export * from "./findAssociateAnglePointOnTrigoCircle.js";
9
10
  export * from "./trigoFunctionsFundamentalEquation.js";
11
+ export * from "./selectQuadrantOnTrigoCircle.js";
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/circle/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AAErD,cAAc,kCAAkC,CAAC;AACjD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wCAAwC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/circle/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wCAAwC,CAAC;AACvD,cAAc,kCAAkC,CAAC"}
@@ -4,7 +4,8 @@ export * from "./mainRemarkableValues.js";
4
4
  export * from "./remarkableValues.js";
5
5
  export * from "./areReelsOnTheSameTrigoCirclePoint.js";
6
6
  export * from "./associateReelToTrigoCirclePoint.js";
7
- // export * from "./findAngleFromCosAndSin.js";
7
+ export * from "./findAngleFromCosAndSin.js";
8
8
  export * from "./placeAssociateAngleOnCircle.js";
9
9
  export * from "./findAssociateAnglePointOnTrigoCircle.js";
10
10
  export * from "./trigoFunctionsFundamentalEquation.js";
11
+ export * from "./selectQuadrantOnTrigoCircle.js";
@@ -1 +1 @@
1
- {"version":3,"file":"mainRemarkableValues.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/circle/mainRemarkableValues.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,QAAQ,EAaT,MAAM,sBAAsB,CAAC;AAE9B,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAuFF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAc9D,CAAC"}
1
+ {"version":3,"file":"mainRemarkableValues.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/circle/mainRemarkableValues.ts"],"names":[],"mappings":"AASA,OAAO,EACL,QAAQ,EAeT,MAAM,sBAAsB,CAAC;AAE9B,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAiJF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAe9D,CAAC"}
@@ -6,6 +6,7 @@ import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
6
6
  import { coinFlip } from "../../../../utils/alea/coinFlip.js";
7
7
  import { shuffle } from "../../../../utils/alea/shuffle.js";
8
8
  import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
9
+ import { mdTable } from "../../../../utils/markdown/mdTable.js";
9
10
  import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../exercise.js";
10
11
  import { getDistinctQuestions } from "../../../utils/getDistinctQuestions.js";
11
12
  const getStatementNode = (identifiers) => {
@@ -31,6 +32,59 @@ const getAnswer = (identifiers) => {
31
32
  const remarkableValue = mainTrigoValues[valueIndex];
32
33
  return isCos ? remarkableValue.cos.toTex() : remarkableValue.sin.toTex();
33
34
  };
35
+ const getHint = (identifiers) => {
36
+ const { valueIndex } = identifiers;
37
+ const remarkableValue = mainTrigoValues[valueIndex];
38
+ const angle = remarkableValue.angle;
39
+ return `Repère le point-image de $${angle.toTex()}$ sur le cercle trigonométrique ci-dessous :
40
+
41
+ ![](https://heureuxhasarddocsbucket.s3.eu-west-3.amazonaws.com/mathliveV2/activities/quizzes/generator/piCercle_nombres.jpg)
42
+
43
+ Le cosinus de $${angle.toTex()}$ est l'abscisse de ce point, et son sinus est son ordonnée.`;
44
+ };
45
+ const getCorrection = (identifiers) => {
46
+ const { valueIndex } = identifiers;
47
+ const remarkableValue = mainTrigoValues[valueIndex];
48
+ const angle = remarkableValue.angle;
49
+ return `On repère le point-image de $${angle.toTex()}$ sur le cercle trigonométrique ci-dessous :
50
+
51
+ ![](https://heureuxhasarddocsbucket.s3.eu-west-3.amazonaws.com/mathliveV2/activities/quizzes/generator/piCercle_nombres.jpg)
52
+
53
+ Puis, on utilise les valeurs remarquables ci-dessous :
54
+
55
+ ${mdTable([
56
+ [
57
+ "$x$",
58
+ "$0$",
59
+ "$\\frac{\\pi}{6}$",
60
+ "$\\frac{\\pi}{4}$",
61
+ "$\\frac{\\pi}{3}$",
62
+ "$\\frac{\\pi}{2}$",
63
+ ],
64
+ [
65
+ "$\\cos(x)$",
66
+ "$1$",
67
+ "$\\frac{\\sqrt{3}}{2}$",
68
+ "$\\frac{\\sqrt{2}}{2}$",
69
+ "$\\frac{1}{2}$",
70
+ "$0$",
71
+ ],
72
+ [
73
+ "$\\sin(x)$",
74
+ "$0$",
75
+ "$\\frac{1}{2}$",
76
+ "$\\frac{\\sqrt{2}}{2}$",
77
+ "$\\frac{\\sqrt{3}}{2}$",
78
+ "$1$",
79
+ ],
80
+ ])}
81
+
82
+ On a donc :
83
+
84
+ $$
85
+ ${getStartStatement(identifiers)} = ${getAnswer(identifiers)}
86
+ $$`;
87
+ };
34
88
  const getMainRemarkableValues = () => {
35
89
  const isCos = coinFlip();
36
90
  const valueIndex = randint(0, mainTrigoValues.length);
@@ -45,6 +99,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
45
99
  keys: ["pi", "cos", "sin"],
46
100
  answerFormat: "tex",
47
101
  identifiers,
102
+ hint: getHint(identifiers),
103
+ correction: getCorrection(identifiers),
48
104
  };
49
105
  return question;
50
106
  };
@@ -94,4 +150,5 @@ export const mainRemarkableValuesExercise = {
94
150
  isAnswerValid,
95
151
  subject: "Mathématiques",
96
152
  getQuestionFromIdentifiers,
153
+ hasHintAndCorrection: true,
97
154
  };
@@ -1 +1 @@
1
- {"version":3,"file":"remarkableValues.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/circle/remarkableValues.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAM7C,OAAO,EACL,QAAQ,EAaT,MAAM,sBAAsB,CAAC;AAmD9B,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IAEf,gBAAgB,EAAE,eAAe,CAAC;CACnC,CAAC;AAkDF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAc1D,CAAC"}
1
+ {"version":3,"file":"remarkableValues.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/circle/remarkableValues.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAU7C,OAAO,EACL,QAAQ,EAeT,MAAM,sBAAsB,CAAC;AAmD9B,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IAEf,gBAAgB,EAAE,eAAe,CAAC;CACnC,CAAC;AAsIF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAe1D,CAAC"}
@@ -2,11 +2,15 @@ import { RemarkableValueConstructor } from "../../../../math/trigonometry/remark
2
2
  import { cos, CosNode } from "../../../../tree/nodes/functions/cosNode.js";
3
3
  import { sin, SinNode } from "../../../../tree/nodes/functions/sinNode.js";
4
4
  import { reifyAlgebraic, } from "../../../../tree/nodes/nodeConstructor.js";
5
+ import { PiNode } from "../../../../tree/nodes/numbers/piNode.js";
6
+ import { add } from "../../../../tree/nodes/operators/addNode.js";
7
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
5
8
  import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
6
9
  import { coinFlip } from "../../../../utils/alea/coinFlip.js";
7
10
  import { random } from "../../../../utils/alea/random.js";
8
11
  import { shuffle } from "../../../../utils/alea/shuffle.js";
9
12
  import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
13
+ import { mdTable } from "../../../../utils/markdown/mdTable.js";
10
14
  import { addValidProp, propWhile, tryToAddWrongProp, } from "../../../exercise.js";
11
15
  import { getDistinctQuestions } from "../../../utils/getDistinctQuestions.js";
12
16
  const values = [
@@ -70,9 +74,92 @@ const getQuestionFromIdentifiers = (identifiers) => {
70
74
  keys: ["pi", "cos", "sin"],
71
75
  answerFormat: "tex",
72
76
  identifiers,
77
+ hint: getHint(identifiers),
78
+ correction: getCorrection(identifiers),
73
79
  };
74
80
  return question;
75
81
  };
82
+ const getHint = (identifiers) => {
83
+ const { angleIdentifiers } = identifiers;
84
+ const angle = reifyAlgebraic(angleIdentifiers);
85
+ return `Commence par te ramener à l'intervalle $]-\\pi; \\pi]$, en ajoutant ou en retirant un multiple de $2\\pi$ à $${angle.toTex()}$.
86
+
87
+ Puis, repère le point-image de l'angle ainsi obtenu sur le cercle trigonométrique ci-dessous :
88
+
89
+ ![](https://heureuxhasarddocsbucket.s3.eu-west-3.amazonaws.com/mathliveV2/activities/quizzes/generator/piCercle_nombres.jpg)
90
+
91
+ Le cosinus de $${angle.toTex()}$ est l'abscisse de ce point, et son sinus est son ordonnée.`;
92
+ };
93
+ const getCorrection = (identifiers) => {
94
+ const { isCos, angleIdentifiers } = identifiers;
95
+ const angle = reifyAlgebraic(angleIdentifiers);
96
+ let toAdd = 0;
97
+ let newAngle = angle;
98
+ let counter = 0;
99
+ while (newAngle.evaluate() > Math.PI || newAngle.evaluate() <= -Math.PI) {
100
+ counter++;
101
+ if (counter > 1000)
102
+ throw new Error("too many iterations in remarkable values");
103
+ if (newAngle.evaluate() > 0)
104
+ toAdd--;
105
+ else
106
+ toAdd++;
107
+ console.log(newAngle.evaluate(), toAdd);
108
+ newAngle = add(newAngle, multiply(toAdd > 0 ? 2 : -2, PiNode)).simplify();
109
+ }
110
+ // const raw = frac(angle, PiNode).simplify();
111
+ return `On se ramène à l'intervalle $]-\\pi; \\pi]$ :
112
+
113
+ $$
114
+ ${add(angle, multiply(2 * toAdd, PiNode)).toTex()} = ${newAngle.toTex()}
115
+ $$
116
+
117
+ On a donc :
118
+
119
+ $$
120
+ ${(isCos ? cos : sin)(angle).toTex()} = ${(isCos ? cos : sin)(newAngle).toTex()}
121
+ $$
122
+
123
+
124
+ On repère le point-image de $${newAngle.toTex()}$ sur le cercle trigonométrique ci-dessous :
125
+
126
+ ![](https://heureuxhasarddocsbucket.s3.eu-west-3.amazonaws.com/mathliveV2/activities/quizzes/generator/piCercle_nombres.jpg)
127
+
128
+ Puis, on utilise les valeurs remarquables ci-dessous :
129
+
130
+ ${mdTable([
131
+ [
132
+ "$x$",
133
+ "$0$",
134
+ "$\\frac{\\pi}{6}$",
135
+ "$\\frac{\\pi}{4}$",
136
+ "$\\frac{\\pi}{3}$",
137
+ "$\\frac{\\pi}{2}$",
138
+ ],
139
+ [
140
+ "$\\cos(x)$",
141
+ "$1$",
142
+ "$\\frac{\\sqrt{3}}{2}$",
143
+ "$\\frac{\\sqrt{2}}{2}$",
144
+ "$\\frac{1}{2}$",
145
+ "$0$",
146
+ ],
147
+ [
148
+ "$\\sin(x)$",
149
+ "$0$",
150
+ "$\\frac{1}{2}$",
151
+ "$\\frac{\\sqrt{2}}{2}$",
152
+ "$\\frac{\\sqrt{3}}{2}$",
153
+ "$1$",
154
+ ],
155
+ ])}
156
+
157
+ On a donc :
158
+
159
+ $$
160
+ ${getStartStatement(identifiers)} = ${getAnswer(identifiers)}
161
+ $$`;
162
+ };
76
163
  const getPropositions = (n, { answer }) => {
77
164
  const propositions = [];
78
165
  addValidProp(propositions, answer);
@@ -109,4 +196,5 @@ export const remarkableValuesExercise = {
109
196
  getInstruction,
110
197
  getAnswer,
111
198
  getQuestionFromIdentifiers,
199
+ hasHintAndCorrection: true,
112
200
  };
@@ -1,2 +1,7 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ quartant: number;
4
+ };
5
+ export declare const selectQuadrantOnTrigoCircle: Exercise<Identifiers>;
1
6
  export {};
2
7
  //# sourceMappingURL=selectQuadrantOnTrigoCircle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"selectQuadrantOnTrigoCircle.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/circle/selectQuadrantOnTrigoCircle.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"selectQuadrantOnTrigoCircle.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/circle/selectQuadrantOnTrigoCircle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAIrC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AA2FF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAuB7D,CAAC"}
@@ -1,94 +1,92 @@
1
- // import {
2
- // Exercise,
3
- // Proposition,
4
- // QCMGenerator,
5
- // Question,
6
- // QuestionGenerator,
7
- // VEA,
8
- // addValidProp,
9
- // shuffleProps,
10
- // GetAnswer,
11
- // GetHint,
12
- // GetCorrection,
13
- // GetInstruction,
14
- // GetKeys,
15
- // GetQuestionFromIdentifiers,
16
- // propWhile,
17
- // } from "../../../../exercises/exercise.js";
18
- // import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
19
- // import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
20
- // import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
21
- export {};
22
- // //angle donné genre Pi/6, donner la couleur
23
- // //donner couleur pour signe cos et sin
24
- // //une couleur est donnée, donner signe sin&cos
25
- // type Identifiers = {
26
- // angle?: NodeIdentifiers;
27
- // };
28
- // const getPropositions: QCMGenerator<Identifiers> = (n, { answer }) => {
29
- // const propositions: Proposition[] = [];
30
- // addValidProp(propositions, answer);
31
- // propWhile(propositions, n, () => {
32
- // throw Error("QCM not implemented");
33
- // });
34
- // return shuffleProps(propositions, n);
35
- // };
36
- // const getAnswer: GetAnswer<Identifiers> = (identifiers) => {};
37
- // const getInstruction: GetInstruction<Identifiers> = (identifiers) => {
38
- // return `On considère le cercle trigonométrique ci-dessous.
39
- // https://heureuxhasarddocsbucket.s3.eu-west-3.amazonaws.com/mathliveV2/activities/quizzes/generator/piCercle_couleur.jpg`;
40
- // };
41
- // const getHint: GetHint<Identifiers> = (identifiers) => {};
42
- // const getCorrection: GetCorrection<Identifiers> = (identifiers) => {};
43
- // const getKeys: GetKeys<Identifiers> = (identifiers) => {
44
- // return [];
45
- // };
46
- // const isAnswerValid: VEA<Identifiers> = (ans, { answer }) => {
47
- // try {
48
- // throw Error("VEA not implemented");
49
- // } catch (err) {
50
- // return handleVEAError(err);
51
- // }
52
- // };
53
- // const getSelectQuadrantOnTrigoCircleQuestion: QuestionGenerator<Identifiers> = (
54
- // ops,
55
- // ) => {
56
- // const identifiers: Identifiers = {};
57
- // return getQuestionFromIdentifiers(identifiers);
58
- // };
59
- // const getQuestionFromIdentifiers: GetQuestionFromIdentifiers<Identifiers> = (
60
- // identifiers,
61
- // ) => {
62
- // return {
63
- // answer: getAnswer(identifiers),
64
- // instruction: getInstruction(identifiers),
65
- // keys: getKeys(identifiers),
66
- // answerFormat: "tex",
67
- // identifiers,
68
- // hint: getHint(identifiers),
69
- // correction: getCorrection(identifiers),
70
- // };
71
- // };
72
- // export const selectQuadrantOnTrigoCircle: Exercise<Identifiers> = {
73
- // id: "selectQuadrantOnTrigoCircle",
74
- // label:
75
- // "Donner le quadrant du cercle trigonométrique auquel un angle appartient",
76
- // isSingleStep: true,
77
- // generator: (nb, opts) =>
78
- // getDistinctQuestions(
79
- // () => getSelectQuadrantOnTrigoCircleQuestion(opts),
80
- // nb,
81
- // ),
82
- // qcmTimer: 60,
83
- // freeTimer: 60,
84
- // getPropositions,
85
- // isAnswerValid,
86
- // subject: "Mathématiques",
87
- // getInstruction,
88
- // getHint,
89
- // getCorrection,
90
- // getAnswer,
91
- // getQuestionFromIdentifiers,
92
- // hasHintAndCorrection: true,
93
- // answerType: "QCU",
94
- // };
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
+ const getPropositions = (n, { answer }) => {
5
+ const propositions = [];
6
+ addValidProp(propositions, answer, "raw");
7
+ ["Bleu", "Rouge", "Vert", "Jaune"].forEach((color) => {
8
+ tryToAddWrongProp(propositions, color, "raw");
9
+ });
10
+ return shuffleProps(propositions, n);
11
+ };
12
+ const getAnswer = (identifiers) => {
13
+ return ["Bleu", "Rouge", "Vert", "Jaune"][identifiers.quartant];
14
+ };
15
+ const getInstruction = (identifiers) => {
16
+ const { quartant } = identifiers;
17
+ const isSinPos = quartant === 0 || quartant === 1;
18
+ const isCosPos = quartant === 0 || quartant === 3;
19
+ return `On considère le cercle trigonométrique ci-dessous.
20
+
21
+ ![](https://heureuxhasarddocsbucket.s3.eu-west-3.amazonaws.com/mathliveV2/activities/quizzes/generator/piCercle_couleur.jpg)
22
+
23
+ Soit un réel $a$ tel que :
24
+
25
+ $$
26
+ \\sin(a)${isSinPos ? ">0" : "<0"}
27
+ $$
28
+
29
+ et
30
+
31
+ $$
32
+ \\cos(a)${isCosPos ? ">0" : "<0"}
33
+ $$
34
+
35
+ De quelle couleur est le point-image de $a$ sur le cercle trigonométrique?
36
+ `;
37
+ };
38
+ const getHint = () => {
39
+ return `Le cosinus d'un nombre $a$ est l'abscisse de son point-image sur le cercle trigonométrique, et le sinus son ordonnée.`;
40
+ };
41
+ const getCorrection = (identifiers) => {
42
+ const { quartant } = identifiers;
43
+ const isSinPos = quartant === 0 || quartant === 1;
44
+ const isCosPos = quartant === 0 || quartant === 3;
45
+ return `Le cosinus d'un nombre $a$ est l'abscisse de son point-image sur le cercle trigonométrique, et le sinus son ordonnée.
46
+
47
+ Puisque $\\cos(a)${isCosPos ? ">0" : "<0"}$, le point-image de $a$ sur le cercle trigonométrique se trouve ${isCosPos ? "à droite" : "à gauche"} de l'axe des ordonnées.
48
+
49
+ Puisque $\\sin(a)${isSinPos ? ">0" : "<0"}$, le point-image de $a$ sur le cercle trigonométrique se trouve ${isSinPos ? "au-dessus" : "en-dessous"} de l'axe des abscisses.
50
+
51
+ Le point-image de $a$ sur le cercle trigonométrique se trouve donc sur le quartant de couleur ${[
52
+ "Bleu",
53
+ "Rouge",
54
+ "Vert",
55
+ "Jaune",
56
+ ][quartant].toLocaleLowerCase()}.`;
57
+ };
58
+ const getSelectQuadrantOnTrigoCircleQuestion = () => {
59
+ const identifiers = {
60
+ quartant: randint(0, 4),
61
+ };
62
+ return getQuestionFromIdentifiers(identifiers);
63
+ };
64
+ const getQuestionFromIdentifiers = (identifiers) => {
65
+ return {
66
+ answer: getAnswer(identifiers),
67
+ instruction: getInstruction(identifiers),
68
+ keys: [],
69
+ answerFormat: "tex",
70
+ identifiers,
71
+ hint: getHint(identifiers),
72
+ correction: getCorrection(identifiers),
73
+ };
74
+ };
75
+ export const selectQuadrantOnTrigoCircle = {
76
+ id: "selectQuadrantOnTrigoCircle",
77
+ label: "Donner le quadrant du cercle trigonométrique auquel un angle appartient en fonction du signe de son cosinus et son sinus",
78
+ isSingleStep: true,
79
+ generator: (nb, opts) => getDistinctQuestions(() => getSelectQuadrantOnTrigoCircleQuestion(opts), nb, 4),
80
+ qcmTimer: 60,
81
+ freeTimer: 60,
82
+ getPropositions,
83
+ subject: "Mathématiques",
84
+ getInstruction,
85
+ getHint,
86
+ getCorrection,
87
+ getAnswer,
88
+ getQuestionFromIdentifiers,
89
+ hasHintAndCorrection: true,
90
+ answerType: "QCU",
91
+ maxAllowedQuestions: 4,
92
+ };
@@ -0,0 +1,11 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ isCos: boolean;
4
+ a: number;
5
+ b: number;
6
+ c: number;
7
+ d: number;
8
+ };
9
+ export declare const associateAngleSimplification: Exercise<Identifiers>;
10
+ export {};
11
+ //# sourceMappingURL=associateAngleSimplification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"associateAngleSimplification.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/functions/associateAngleSimplification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAgBrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAgKF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAsB9D,CAAC"}