math-exercises 3.0.175 → 3.0.177
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.
- package/lib/exercises/exercise.d.ts +9 -0
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.js +58 -1
- package/lib/exercises/math/probaStat/index.d.ts +1 -1
- package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/index.js +1 -2
- package/lib/exercises/math/probaStat/randomVariable/decideWhichGameIsLessRisky.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/decideWhichGameIsLessRisky.js +0 -1
- package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.d.ts +0 -7
- package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.js +154 -125
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationAverage.d.ts +2 -2
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationAverage.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationComputeProbability.d.ts +2 -2
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationComputeProbability.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationIsGameFavorable.d.ts +2 -2
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationIsGameFavorable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.d.ts +2 -2
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.js +1 -1
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationStandardDeviation.d.ts +2 -2
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationStandardDeviation.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationValues.d.ts +2 -2
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationValues.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationVariance.d.ts +2 -2
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationVariance.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.d.ts +3 -3
- package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.js +1 -1
- package/lib/exercises/math/probaStat/trees/buildTreeFromSituation.d.ts +6 -0
- package/lib/exercises/math/probaStat/trees/buildTreeFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/trees/buildTreeFromSituation.js +199 -68
- package/lib/exercises/math/probaStat/trees/fillProbaTreeWithComplementaryProbabilities.js +12 -12
- package/lib/exercises/math/probaStat/trees/index.d.ts +1 -1
- package/lib/exercises/math/probaStat/trees/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/trees/index.js +10 -1
- package/lib/exercises/math/probaStat/trees/probaTreeSituationTotalProbaFormula.d.ts +2 -0
- package/lib/exercises/math/probaStat/trees/probaTreeSituationTotalProbaFormula.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/trees/probaTreeSituationTotalProbaFormula.js +80 -0
- package/lib/exercises/math/probaStat/trees/probaTreeSituations.d.ts +60 -0
- package/lib/exercises/math/probaStat/trees/probaTreeSituations.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/trees/probaTreeSituations.js +344 -108
- package/lib/exercises/math/probaStat/trees/probabilityTree.d.ts +3 -9
- package/lib/exercises/math/probaStat/trees/probabilityTree.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/trees/probabilityTree.js +45 -419
- package/lib/exercises/math/probaStat/trees/probabilityTreeV2.d.ts +25 -0
- package/lib/exercises/math/probaStat/trees/probabilityTreeV2.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/trees/probabilityTreeV2.js +625 -0
- package/lib/exercises/math/probaStat/trees/treeInInstruction.js +10 -10
- package/lib/exercises/math/sequences/limits/index.d.ts +1 -1
- package/lib/exercises/math/sequences/limits/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/limits/index.js +2 -1
- package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.js +17 -8
- package/lib/exercises/math/trigonometry/circle/index.d.ts +2 -0
- package/lib/exercises/math/trigonometry/circle/index.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/circle/index.js +2 -1
- package/lib/exercises/math/trigonometry/circle/mainRemarkableValues.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/circle/mainRemarkableValues.js +57 -0
- package/lib/exercises/math/trigonometry/circle/remarkableValues.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/circle/remarkableValues.js +88 -0
- package/lib/exercises/math/trigonometry/circle/selectQuadrantOnTrigoCircle.d.ts +5 -0
- package/lib/exercises/math/trigonometry/circle/selectQuadrantOnTrigoCircle.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/circle/selectQuadrantOnTrigoCircle.js +92 -94
- package/lib/exercises/math/trigonometry/functions/associateAngleSimplification.d.ts +11 -0
- package/lib/exercises/math/trigonometry/functions/associateAngleSimplification.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/functions/associateAngleSimplification.js +166 -0
- package/lib/exercises/math/trigonometry/functions/basicEquationCos.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/functions/basicEquationCos.js +54 -9
- package/lib/exercises/math/trigonometry/functions/basicEquationSin.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/functions/basicEquationSin.js +54 -8
- package/lib/exercises/math/trigonometry/functions/cosInequationMainInterval.js +2 -2
- package/lib/exercises/math/trigonometry/functions/equationSinOnRandomInterval.js +1 -2
- package/lib/exercises/math/trigonometry/functions/index.d.ts +1 -0
- package/lib/exercises/math/trigonometry/functions/index.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/functions/index.js +1 -0
- package/lib/exercises/vea/percentVEA.d.ts +2 -0
- package/lib/exercises/vea/percentVEA.d.ts.map +1 -0
- package/lib/exercises/vea/percentVEA.js +1 -0
- package/lib/index.d.ts +29 -19
- package/lib/index.d.ts.map +1 -1
- package/lib/math/utils/random/randTupleInt.d.ts +1 -0
- package/lib/math/utils/random/randTupleInt.d.ts.map +1 -1
- package/lib/math/utils/random/randTupleInt.js +1 -1
- package/lib/server.js +22 -0
- package/lib/tests/exoTest.d.ts.map +1 -1
- package/lib/tests/exoTest.js +2 -0
- package/lib/tests/questionTest.d.ts.map +1 -1
- package/lib/tests/questionTest.js +14 -2
- package/lib/tree/nodes/algebraicNode.d.ts +1 -0
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/addNode.js +4 -2
- package/lib/types/keyIds.d.ts +1 -1
- package/lib/types/keyIds.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -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
|
+
`;
|
|
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
|
-
|
|
69
|
+
Puis, on se sers du cercle trigonométrique ci-dessous :
|
|
70
|
+
|
|
71
|
+

|
|
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;
|
|
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
|
-
|
|
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":"
|
|
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
|
+

|
|
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
|
+

|
|
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;
|
|
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
|
+

|
|
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
|
+

|
|
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 +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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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
|
+

|
|
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"}
|