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.
- package/lib/exercises/math/derivation/variations/readExtremaAbscissFromDerivativeCurve.js +1 -1
- package/lib/exercises/math/functions/trinoms/sign/index.d.ts +1 -0
- package/lib/exercises/math/functions/trinoms/sign/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/sign/index.js +1 -0
- package/lib/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.d.ts +8 -0
- package/lib/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.js +233 -0
- package/lib/exercises/math/geometry/angles/parallelogramFourthAngle.d.ts.map +1 -1
- package/lib/exercises/math/geometry/angles/parallelogramFourthAngle.js +10 -10
- package/lib/exercises/math/geometry/quadrilaterals/parallelogramAngles.js +8 -8
- package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWithAngles.js +6 -6
- package/lib/exercises/math/geometry/triangles/triangleThirdAngleValue.js +8 -8
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.js +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.js +2 -2
- package/lib/exercises/math/geometry/vectors/scalarProduct/angleFromScalarProduct.js +2 -2
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.js +31 -6
- package/lib/exercises/math/probaStat/randomVariable/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/index.js +1 -0
- package/lib/exercises/math/probaStat/trees/index.d.ts +1 -3
- package/lib/exercises/math/probaStat/trees/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/trees/index.js +8 -3
- 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/python/index.d.ts +1 -0
- package/lib/exercises/math/python/index.d.ts.map +1 -1
- package/lib/exercises/math/python/index.js +1 -0
- package/lib/exercises/math/python/sequences/pySequenceThresholdInstructionCompletion.d.ts.map +1 -1
- package/lib/exercises/math/python/sequences/pySequenceThresholdInstructionCompletion.js +11 -8
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFromTwoTerms.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFromTwoTerms.js +4 -3
- package/lib/exercises/math/sequences/arithmetic/index.d.ts +4 -3
- package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/index.js +4 -3
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindExplicitFormulaFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindExplicitFormulaFromSituation.js +3 -2
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRankFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRankFromSituation.js +8 -6
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindThresholdFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindThresholdFromSituation.js +6 -5
- package/lib/exercises/math/sequences/arithmetic/situations/index.d.ts +0 -2
- package/lib/exercises/math/sequences/arithmetic/situations/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/situations/index.js +2 -2
- package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.d.ts +1 -0
- package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.js +65 -14
- package/lib/exercises/math/sequences/arithmetic/sum/index.d.ts +0 -1
- package/lib/exercises/math/sequences/arithmetic/sum/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/sum/index.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.d.ts +14 -0
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.js +291 -0
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoTerms.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoTerms.js +4 -3
- package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.d.ts +15 -0
- package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.js +249 -0
- package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoTerms.js +1 -1
- package/lib/exercises/math/sequences/geometric/index.d.ts +6 -2
- package/lib/exercises/math/sequences/geometric/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/index.js +6 -2
- package/lib/exercises/math/sequences/geometric/situations/geometricFindExplicitFormulaFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/situations/geometricFindExplicitFormulaFromSituation.js +3 -2
- package/lib/exercises/math/sequences/geometric/situations/geometricFindTermFromSituation.js +1 -1
- package/lib/exercises/math/sequences/geometric/sum/geometricComputeSumWithDots.js +2 -2
- package/lib/exercises/math/sequences/graph/placeFirstSequencePoints.js +2 -2
- package/lib/exercises/math/sequences/index.d.ts +1 -0
- package/lib/exercises/math/sequences/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/index.js +1 -0
- package/lib/exercises/math/sequences/seqArithmGeom/seqArithmGeomRecurrenceFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/seqArithmGeom/seqArithmGeomRecurrenceFormulaUsage.js +5 -9
- package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.2d.js +1 -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/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/math/trigonometry/triangle/trigonometryAngleCalcul.js +2 -2
- package/lib/exercises/pc/snellDescartes.js +2 -2
- package/lib/index.d.ts +165 -36
- package/lib/index.d.ts.map +1 -1
- package/lib/latexTester.d.ts.map +1 -1
- package/lib/latexTester.js +8 -5
- package/lib/math/polynomials/affine.d.ts +1 -0
- package/lib/math/polynomials/affine.d.ts.map +1 -1
- package/lib/math/polynomials/affine.js +5 -0
- package/lib/math/utils/arithmetic/primeFactors.js +1 -1
- package/lib/math/utils/functions/functionComposition.d.ts.map +1 -1
- package/lib/math/utils/functions/functionComposition.js +18 -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/math/utils/sequences/situations/seqArithmeticSituations.d.ts +18 -4
- package/lib/math/utils/sequences/situations/seqArithmeticSituations.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqArithmeticSituations.js +437 -336
- package/lib/math/utils/sequences/situations/seqArithmeticUtils.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqArithmeticUtils.js +3 -1
- package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts +5 -0
- package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqGeometricSituations.js +58 -25
- package/lib/prototypesEnhancement.d.ts +1 -0
- package/lib/prototypesEnhancement.d.ts.map +1 -1
- package/lib/prototypesEnhancement.js +3 -0
- package/lib/tests/pdfs/mdCodeToLatex.d.ts.map +1 -1
- package/lib/tests/pdfs/mdCodeToLatex.js +8 -15
- package/lib/tests/questionTest.d.ts.map +1 -1
- package/lib/tests/questionTest.js +6 -3
- package/lib/tree/nodes/algebraicNode.d.ts +1 -0
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- package/lib/tree/nodes/geometry/degree.js +1 -1
- package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/addNode.js +4 -2
- package/lib/tree/parsers/degreeParser.js +2 -2
- package/package.json +1 -1
|
@@ -165,10 +165,10 @@ export const readExtremaAbscissFromDerivativeCurve = {
|
|
|
165
165
|
subject: "Mathématiques",
|
|
166
166
|
getHint,
|
|
167
167
|
getCorrection,
|
|
168
|
+
hasHintAndCorrection: true,
|
|
168
169
|
getInstruction,
|
|
169
170
|
getAnswer,
|
|
170
171
|
getGGBOptions,
|
|
171
172
|
hasGeogebra: true,
|
|
172
173
|
getQuestionFromIdentifiers,
|
|
173
|
-
hasHintAndCorrection: true,
|
|
174
174
|
};
|
|
@@ -2,4 +2,5 @@ export * from "./trinomSignFromRoots.js";
|
|
|
2
2
|
export * from "./trinomSignFromFacto.js";
|
|
3
3
|
export * from "./trinomSignTableFromAlgebraicForm.js";
|
|
4
4
|
export * from "./parabolaSignTable.js";
|
|
5
|
+
export * from "./signOfProductOfAffineAndTrinom.js";
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/sign/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uCAAuC,CAAC;AACtD,cAAc,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/sign/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uCAAuC,CAAC;AACtD,cAAc,wBAAwB,CAAC;AACvC,cAAc,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Exercise } from "../../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
affineCoeffs: number[];
|
|
4
|
+
trinomCoeffs: number[];
|
|
5
|
+
};
|
|
6
|
+
export declare const signOfProductOfAffineAndTrinom: Exercise<Identifiers>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=signOfProductOfAffineAndTrinom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signOfProductOfAffineAndTrinom.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA2PF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAqBhE,CAAC"}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
|
|
2
|
+
import { signTableVEA } from "../../../../../exercises/vea/signTableVEA.js";
|
|
3
|
+
import { Affine, AffineConstructor } from "../../../../../math/polynomials/affine.js";
|
|
4
|
+
import { Trinom, TrinomConstructor } from "../../../../../math/polynomials/trinom.js";
|
|
5
|
+
import { firstDegreeInequationResolutionTex } from "../../../../../tree/nodes/inequations/inequationNode.js";
|
|
6
|
+
import { MinusInfinityNode, PlusInfinityNode, } from "../../../../../tree/nodes/numbers/infiniteNode.js";
|
|
7
|
+
import { multiply } from "../../../../../tree/nodes/operators/multiplyNode.js";
|
|
8
|
+
import { ClosureType } from "../../../../../tree/nodes/sets/closure.js";
|
|
9
|
+
import { IntervalNode } from "../../../../../tree/nodes/sets/intervalNode.js";
|
|
10
|
+
import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
|
|
11
|
+
const getAnswerTable = (identifiers) => {
|
|
12
|
+
const fcts = buildFcts(identifiers);
|
|
13
|
+
const roots = [
|
|
14
|
+
fcts.affine.getRoot().toTree(),
|
|
15
|
+
...fcts.trinom.getRootsNode(),
|
|
16
|
+
].sort((a, b) => a.evaluate() - b.evaluate());
|
|
17
|
+
const affineRootIndex = roots.findIndex((r) => r.evaluate() === fcts.affine.getRoot().toTree().evaluate());
|
|
18
|
+
const startAffSign = fcts.affine.a > 0 ? "-" : "+";
|
|
19
|
+
const endAffSign = startAffSign === "+" ? "-" : "+";
|
|
20
|
+
const trinomSigns = fcts.trinom.a > 0 ? ["+", "-", "+"] : ["-", "+", "-"];
|
|
21
|
+
const partial = [
|
|
22
|
+
[
|
|
23
|
+
"$x$",
|
|
24
|
+
"-\\infty",
|
|
25
|
+
"\\ ",
|
|
26
|
+
roots[0].toTex(),
|
|
27
|
+
"\\ ",
|
|
28
|
+
roots[1].toTex(),
|
|
29
|
+
"\\ ",
|
|
30
|
+
roots[2].toTex(),
|
|
31
|
+
"\\ ",
|
|
32
|
+
"+\\infty",
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
`$${fcts.affine.toTree().toTex()}$`,
|
|
36
|
+
"\\ ",
|
|
37
|
+
startAffSign,
|
|
38
|
+
affineRootIndex === 0 ? "0" : startAffSign,
|
|
39
|
+
affineRootIndex === 0 ? endAffSign : startAffSign,
|
|
40
|
+
affineRootIndex === 1
|
|
41
|
+
? "0"
|
|
42
|
+
: affineRootIndex === 0
|
|
43
|
+
? endAffSign
|
|
44
|
+
: startAffSign,
|
|
45
|
+
affineRootIndex < 2 ? endAffSign : startAffSign,
|
|
46
|
+
affineRootIndex === 2 ? "0" : endAffSign,
|
|
47
|
+
endAffSign,
|
|
48
|
+
"\\ ",
|
|
49
|
+
],
|
|
50
|
+
[
|
|
51
|
+
`$${fcts.trinom.toTree().toTex()}$`,
|
|
52
|
+
"\\ ",
|
|
53
|
+
trinomSigns[0],
|
|
54
|
+
affineRootIndex === 0 ? trinomSigns[0] : "0",
|
|
55
|
+
affineRootIndex === 0 ? trinomSigns[0] : trinomSigns[1],
|
|
56
|
+
affineRootIndex === 1 ? trinomSigns[1] : "0",
|
|
57
|
+
affineRootIndex === 2 ? trinomSigns[2] : trinomSigns[1],
|
|
58
|
+
affineRootIndex === 2 ? trinomSigns[2] : "0",
|
|
59
|
+
trinomSigns[2],
|
|
60
|
+
"\\ ",
|
|
61
|
+
],
|
|
62
|
+
];
|
|
63
|
+
const buildSign = (sign1, sign2) => {
|
|
64
|
+
if (sign1 === sign2)
|
|
65
|
+
return "+";
|
|
66
|
+
return "-";
|
|
67
|
+
};
|
|
68
|
+
const thirdLine = [
|
|
69
|
+
`$${buildF(identifiers).toTex()}$`,
|
|
70
|
+
"\\ ",
|
|
71
|
+
buildSign(partial[1][2], partial[2][2]),
|
|
72
|
+
"0",
|
|
73
|
+
buildSign(partial[1][4], partial[2][4]),
|
|
74
|
+
"0",
|
|
75
|
+
buildSign(partial[1][6], partial[2][6]),
|
|
76
|
+
"0",
|
|
77
|
+
buildSign(partial[1][8], partial[2][8]),
|
|
78
|
+
"\\ ",
|
|
79
|
+
];
|
|
80
|
+
return [...partial, thirdLine];
|
|
81
|
+
};
|
|
82
|
+
const buildF = (identifiers) => {
|
|
83
|
+
const { affineCoeffs, trinomCoeffs } = identifiers;
|
|
84
|
+
const affine = new Affine(affineCoeffs[1], affineCoeffs[0]);
|
|
85
|
+
const trinom = new Trinom(trinomCoeffs[2], trinomCoeffs[1], trinomCoeffs[0]);
|
|
86
|
+
return multiply(affine.toTree(), trinom.toTree());
|
|
87
|
+
};
|
|
88
|
+
const buildFcts = (identifiers) => {
|
|
89
|
+
const { affineCoeffs, trinomCoeffs } = identifiers;
|
|
90
|
+
const affine = new Affine(affineCoeffs[1], affineCoeffs[0]);
|
|
91
|
+
const trinom = new Trinom(trinomCoeffs[2], trinomCoeffs[1], trinomCoeffs[0]);
|
|
92
|
+
return { affine, trinom };
|
|
93
|
+
};
|
|
94
|
+
const getInstruction = (identifiers) => {
|
|
95
|
+
const fcts = buildFcts(identifiers);
|
|
96
|
+
return `Soit $f$ la fonction définie sur $\\mathbb{R}$ par :
|
|
97
|
+
|
|
98
|
+
$$
|
|
99
|
+
f(x) = ${multiply(fcts.affine.toTree(), fcts.trinom.toTree()).toTex()}
|
|
100
|
+
$$
|
|
101
|
+
|
|
102
|
+
Dresser le tableau de signes de $f$.`;
|
|
103
|
+
};
|
|
104
|
+
const getHint = () => {
|
|
105
|
+
return `$f(x)$ est un produit de deux fonctions : une fonction affine $g$ et une fonction polynôme du second degré $h$.
|
|
106
|
+
|
|
107
|
+
Détermine le signe de la fonction affine en résolvant l'inéquation $g(x)\\geq 0$.
|
|
108
|
+
|
|
109
|
+
Puis détermine le signe de la fonction polynôme du second degré $g$ en trouvant ses racines.
|
|
110
|
+
|
|
111
|
+
Enfin, entre tes résultats dans le tableau. Le signe de $f(x)$ s'obtiendra alors en utilisant la règle des signes.`;
|
|
112
|
+
};
|
|
113
|
+
const getCorrection = (identifiers) => {
|
|
114
|
+
const fcts = buildFcts(identifiers);
|
|
115
|
+
const trinomRoots = fcts.trinom.getRootsNode();
|
|
116
|
+
const affRoot = fcts.affine.getRoot().toTree();
|
|
117
|
+
const allRoots = [affRoot, ...trinomRoots].sort((a, b) => a.evaluate() - b.evaluate());
|
|
118
|
+
const firstSign = fcts.affine.a * fcts.trinom.a > 0 ? "négative" : "positive";
|
|
119
|
+
const alternateSign = fcts.affine.a * fcts.trinom.a > 0 ? "positive" : "négative";
|
|
120
|
+
return `On commence par déterminer le signe de $${fcts.affine
|
|
121
|
+
.toTree()
|
|
122
|
+
.toTex()}$ :
|
|
123
|
+
|
|
124
|
+
$$
|
|
125
|
+
${firstDegreeInequationResolutionTex(fcts.affine, "\\ge", (0).toTree())}
|
|
126
|
+
$$
|
|
127
|
+
|
|
128
|
+
Puis, on détermine le signe de $${fcts.trinom
|
|
129
|
+
.toTree()
|
|
130
|
+
.toTex()}$. Pour cela, on calcule ses racines. On trouve $\\Delta = ${fcts.trinom
|
|
131
|
+
.getDeltaNode()
|
|
132
|
+
.toTex()}$, donc cette fonction admet deux racines :
|
|
133
|
+
|
|
134
|
+
$$
|
|
135
|
+
x_1 = ${trinomRoots[0].toTex()}
|
|
136
|
+
$$
|
|
137
|
+
|
|
138
|
+
et
|
|
139
|
+
|
|
140
|
+
$$
|
|
141
|
+
x_2 = ${trinomRoots[1].toTex()}
|
|
142
|
+
$$
|
|
143
|
+
|
|
144
|
+
Cette fonction est donc ${fcts.trinom.a > 0 ? "négative" : "positive"} sur $${new IntervalNode(trinomRoots[0], trinomRoots[1], ClosureType.FF).toTex()}$, et ${fcts.trinom.a > 0 ? "positive" : "négative"} sur le reste de $\\mathbb{R}$.
|
|
145
|
+
|
|
146
|
+
On note toutes ces informations dans un tableau de signes. On applique enfin la règle des signes pour trouver le signe de $f$.
|
|
147
|
+
|
|
148
|
+
On en conclut que $f$ est ${firstSign} sur $${new IntervalNode(MinusInfinityNode, allRoots[0], ClosureType.OF).toTex()}$ et sur $${new IntervalNode(allRoots[1], allRoots[2], ClosureType.FF).toTex()}$, et elle est ${alternateSign} sur $${new IntervalNode(allRoots[0], allRoots[1], ClosureType.FF).toTex()}$ et sur $${new IntervalNode(allRoots[2], PlusInfinityNode, ClosureType.FO).toTex()}$.`;
|
|
149
|
+
};
|
|
150
|
+
const getKeys = () => {
|
|
151
|
+
return ["infty"];
|
|
152
|
+
};
|
|
153
|
+
const isAnswerTableValid = (ans, { answerTable }) => {
|
|
154
|
+
try {
|
|
155
|
+
return signTableVEA(ans, answerTable);
|
|
156
|
+
}
|
|
157
|
+
catch (err) {
|
|
158
|
+
return handleVEAError(err);
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
const getSignOfProductOfAffineAndTrinomQuestion = () => {
|
|
162
|
+
let affine;
|
|
163
|
+
let trinom;
|
|
164
|
+
do {
|
|
165
|
+
affine = AffineConstructor.randomNiceRoot();
|
|
166
|
+
trinom = TrinomConstructor.randomNiceRoots(2);
|
|
167
|
+
} while (trinom
|
|
168
|
+
.getRootsNode()
|
|
169
|
+
.some((root) => root.evaluate() === affine.getRoot().toTree().evaluate()));
|
|
170
|
+
const identifiers = {
|
|
171
|
+
affineCoeffs: affine.coefficients,
|
|
172
|
+
trinomCoeffs: trinom.coefficients,
|
|
173
|
+
};
|
|
174
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
175
|
+
};
|
|
176
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
177
|
+
const fcts = buildFcts(identifiers);
|
|
178
|
+
const f = buildF(identifiers);
|
|
179
|
+
return {
|
|
180
|
+
answerTable: getAnswerTable(identifiers),
|
|
181
|
+
instruction: getInstruction(identifiers),
|
|
182
|
+
keys: getKeys(identifiers),
|
|
183
|
+
answerFormat: "tex",
|
|
184
|
+
identifiers,
|
|
185
|
+
hint: getHint(identifiers),
|
|
186
|
+
correction: getCorrection(identifiers),
|
|
187
|
+
initTable: [
|
|
188
|
+
["$x$", "", "\\ ", "", "\\ ", "", "\\ ", "", "\\ ", "+\\infty"],
|
|
189
|
+
[
|
|
190
|
+
`$${fcts.affine.toTree().toTex()}$`,
|
|
191
|
+
"\\ ",
|
|
192
|
+
"",
|
|
193
|
+
"",
|
|
194
|
+
"",
|
|
195
|
+
"",
|
|
196
|
+
"",
|
|
197
|
+
"",
|
|
198
|
+
"",
|
|
199
|
+
"\\ ",
|
|
200
|
+
],
|
|
201
|
+
[
|
|
202
|
+
`$${fcts.trinom.toTree().toTex()}$`,
|
|
203
|
+
"\\ ",
|
|
204
|
+
"",
|
|
205
|
+
"",
|
|
206
|
+
"",
|
|
207
|
+
"",
|
|
208
|
+
"",
|
|
209
|
+
"",
|
|
210
|
+
"",
|
|
211
|
+
"\\ ",
|
|
212
|
+
],
|
|
213
|
+
[`$${f.toTex()}$`, "\\ ", "", "", "", "", "", "", "", "\\ "],
|
|
214
|
+
],
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
export const signOfProductOfAffineAndTrinom = {
|
|
218
|
+
id: "signOfProductOfAffineAndTrinom",
|
|
219
|
+
label: "Dresser le tableau de signes du produit d'une fonction affine et d'une fonction polynôme du second degré",
|
|
220
|
+
isSingleStep: true,
|
|
221
|
+
generator: (nb, opts) => getDistinctQuestions(() => getSignOfProductOfAffineAndTrinomQuestion(opts), nb),
|
|
222
|
+
qcmTimer: 60,
|
|
223
|
+
freeTimer: 60,
|
|
224
|
+
isAnswerTableValid,
|
|
225
|
+
subject: "Mathématiques",
|
|
226
|
+
getInstruction,
|
|
227
|
+
getHint,
|
|
228
|
+
getCorrection,
|
|
229
|
+
getAnswerTable,
|
|
230
|
+
getQuestionFromIdentifiers,
|
|
231
|
+
hasHintAndCorrection: true,
|
|
232
|
+
answerType: "signTable",
|
|
233
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parallelogramFourthAngle.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/angles/parallelogramFourthAngle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;
|
|
1
|
+
{"version":3,"file":"parallelogramFourthAngle.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/angles/parallelogramFourthAngle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAyFF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAkB1D,CAAC"}
|
|
@@ -6,21 +6,21 @@ import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
|
6
6
|
const getPropositions = (n, { answer, singleAngle, doubleAngle }) => {
|
|
7
7
|
const propositions = [];
|
|
8
8
|
addValidProp(propositions, answer);
|
|
9
|
-
tryToAddWrongProp(propositions, `${singleAngle}
|
|
10
|
-
tryToAddWrongProp(propositions, `${doubleAngle}
|
|
11
|
-
tryToAddWrongProp(propositions, `${360 - singleAngle}
|
|
12
|
-
tryToAddWrongProp(propositions, `${360 - doubleAngle}
|
|
13
|
-
tryToAddWrongProp(propositions, `${360 - singleAngle - doubleAngle}
|
|
14
|
-
tryToAddWrongProp(propositions, `${Math.abs(180 - 2 * singleAngle - doubleAngle)}
|
|
9
|
+
tryToAddWrongProp(propositions, `${singleAngle}^\\circ`);
|
|
10
|
+
tryToAddWrongProp(propositions, `${doubleAngle}^\\circ`);
|
|
11
|
+
tryToAddWrongProp(propositions, `${360 - singleAngle}^\\circ`);
|
|
12
|
+
tryToAddWrongProp(propositions, `${360 - doubleAngle}^\\circ`);
|
|
13
|
+
tryToAddWrongProp(propositions, `${360 - singleAngle - doubleAngle}^\\circ`);
|
|
14
|
+
tryToAddWrongProp(propositions, `${Math.abs(180 - 2 * singleAngle - doubleAngle)}^\\circ`);
|
|
15
15
|
return shuffleProps(propositions, n);
|
|
16
16
|
};
|
|
17
17
|
const getAnswer = (identifiers) => {
|
|
18
18
|
const { singleAngle, doubleAngle } = identifiers;
|
|
19
19
|
const fourthAngle = 360 - singleAngle - 2 * doubleAngle;
|
|
20
|
-
return `${fourthAngle}
|
|
20
|
+
return `${fourthAngle}^\\circ`;
|
|
21
21
|
};
|
|
22
22
|
const getInstruction = (identifiers) => {
|
|
23
|
-
return `Un parallélogramme a deux angles de mesure $${identifiers.doubleAngle}
|
|
23
|
+
return `Un parallélogramme a deux angles de mesure $${identifiers.doubleAngle}^\\circ$ et un angle de mesure $${identifiers.singleAngle}^\\circ$.
|
|
24
24
|
|
|
25
25
|
Quelle est la mesure de son quatrième angle ?`;
|
|
26
26
|
};
|
|
@@ -33,13 +33,13 @@ const getCorrection = (identifiers) => {
|
|
|
33
33
|
return `La somme des angles d'un parallélogramme est égale à $360°$. Ici, la somme des trois angles connus vaut :
|
|
34
34
|
|
|
35
35
|
$$
|
|
36
|
-
${singleAngle}
|
|
36
|
+
${singleAngle}^\\circ + 2\\times ${doubleAngle}^\\circ = ${sum}^\\circ
|
|
37
37
|
$$
|
|
38
38
|
|
|
39
39
|
Le quatrième angle vaut donc :
|
|
40
40
|
|
|
41
41
|
$$
|
|
42
|
-
360
|
|
42
|
+
360^\\circ - ${sum}^\\circ = ${singleAngle} ^\\circ
|
|
43
43
|
$$`;
|
|
44
44
|
};
|
|
45
45
|
const isAnswerValid = (ans, { answer }) => {
|
|
@@ -12,11 +12,11 @@ const getPropositions = (n, { answer, ...identifiers }) => {
|
|
|
12
12
|
const para = ParallelogramConstructor.fromIdentifiers(identifiers.paraIdentifiers);
|
|
13
13
|
const value = round(para.angles[identifiers.givenAngleIndex].evaluate(), 0);
|
|
14
14
|
addValidProp(propositions, answer);
|
|
15
|
-
tryToAddWrongProp(propositions, "180
|
|
16
|
-
tryToAddWrongProp(propositions, (180 - value).frenchify() + "
|
|
17
|
-
tryToAddWrongProp(propositions, value.frenchify() + "
|
|
15
|
+
tryToAddWrongProp(propositions, "180^\\circ");
|
|
16
|
+
tryToAddWrongProp(propositions, (180 - value).frenchify() + "^\\circ");
|
|
17
|
+
tryToAddWrongProp(propositions, value.frenchify() + "^\\circ");
|
|
18
18
|
propWhile(propositions, n, () => {
|
|
19
|
-
tryToAddWrongProp(propositions, randint(20, 160) + "
|
|
19
|
+
tryToAddWrongProp(propositions, randint(20, 160) + "^\\circ");
|
|
20
20
|
});
|
|
21
21
|
return shuffleProps(propositions, n);
|
|
22
22
|
};
|
|
@@ -24,19 +24,19 @@ const getAnswer = (identifiers) => {
|
|
|
24
24
|
const para = ParallelogramConstructor.fromIdentifiers(identifiers.paraIdentifiers);
|
|
25
25
|
const value = round(para.angles[identifiers.givenAngleIndex].evaluate(), 0);
|
|
26
26
|
const isOpposite = identifiers.askedAngleIndex === (identifiers.givenAngleIndex + 2) % 4;
|
|
27
|
-
return (isOpposite ? value : 180 - value).frenchify() + "
|
|
27
|
+
return (isOpposite ? value : 180 - value).frenchify() + "^\\circ";
|
|
28
28
|
};
|
|
29
29
|
const getInstruction = (identifiers) => {
|
|
30
30
|
const para = ParallelogramConstructor.fromIdentifiers(identifiers.paraIdentifiers);
|
|
31
31
|
const value = round(para.angles[identifiers.givenAngleIndex].evaluate(), 0);
|
|
32
32
|
return `On considère le parallélogramme $ABCD$ ci-dessous.
|
|
33
33
|
|
|
34
|
-
L'angle $${para.angles[identifiers.givenAngleIndex].toTex()}$ vaut $${value}
|
|
34
|
+
L'angle $${para.angles[identifiers.givenAngleIndex].toTex()}$ vaut $${value}^\\circ$.
|
|
35
35
|
|
|
36
36
|
Que vaut l'angle $${para.angles[identifiers.askedAngleIndex].toTex()}$ ?`;
|
|
37
37
|
};
|
|
38
38
|
const getHint = () => {
|
|
39
|
-
return "Dans un parallélogramme, la somme totale des angles vaut $360
|
|
39
|
+
return "Dans un parallélogramme, la somme totale des angles vaut $360^\\circ$. Les angles opposés sont égaux, et la somme de deux angles consécutifs est égale à $180^\\circ$.";
|
|
40
40
|
};
|
|
41
41
|
const getCorrection = (identifiers) => {
|
|
42
42
|
const para = ParallelogramConstructor.fromIdentifiers(identifiers.paraIdentifiers);
|
|
@@ -51,7 +51,7 @@ On a donc :
|
|
|
51
51
|
$$
|
|
52
52
|
${askedAngle.toTex()} = ${getAnswer(identifiers)}
|
|
53
53
|
$$`
|
|
54
|
-
: `Dans un parallélogramme, la somme de deux angles consécutifs vaut $180
|
|
54
|
+
: `Dans un parallélogramme, la somme de deux angles consécutifs vaut $180^\\circ$.
|
|
55
55
|
|
|
56
56
|
Ainsi,
|
|
57
57
|
|
|
@@ -24,8 +24,8 @@ const getInstruction = (identifiers) => {
|
|
|
24
24
|
const { firstAngleValue, sameAngleValue, secondAngleValue, triangleNames } = identifiers;
|
|
25
25
|
return `On considère deux triangles :
|
|
26
26
|
|
|
27
|
-
- le triangle $${triangleNames[0]}$, dans lequel l'angle $\\widehat{${triangleNames[0][0]}}$ a une mesure de $${sameAngleValue.frenchify()}
|
|
28
|
-
- le triangle $${triangleNames[1]}$, dans lequel l'angle $\\widehat{${triangleNames[1][0]}}$ a une mesure de $${sameAngleValue.frenchify()}
|
|
27
|
+
- le triangle $${triangleNames[0]}$, dans lequel l'angle $\\widehat{${triangleNames[0][0]}}$ a une mesure de $${sameAngleValue.frenchify()}^\\circ$ et l'angle $\\widehat{${triangleNames[0][1]}}$ a une mesure de $${firstAngleValue.frenchify()}^\\circ$ ;
|
|
28
|
+
- le triangle $${triangleNames[1]}$, dans lequel l'angle $\\widehat{${triangleNames[1][0]}}$ a une mesure de $${sameAngleValue.frenchify()}^\\circ$ et l'angle $\\widehat{${triangleNames[1][1]}}$ a une mesure de $${secondAngleValue.frenchify()}^\\circ$.
|
|
29
29
|
|
|
30
30
|
Les triangles $${triangleNames[0]}$ et $${triangleNames[1]}$ sont-ils semblables ?`;
|
|
31
31
|
};
|
|
@@ -42,25 +42,25 @@ On calcule donc la mesure du troisième angle de chacun des triangles. Pour cela
|
|
|
42
42
|
- pour le triangle $${triangleNames[0]}$, la somme des deux angles connus vaut :
|
|
43
43
|
|
|
44
44
|
$$
|
|
45
|
-
${sameAngleValue.frenchify()}
|
|
45
|
+
${sameAngleValue.frenchify()}^\\circ + ${firstAngleValue.frenchify()}^\\circ = ${round(sameAngleValue + firstAngleValue, 4).frenchify()}^\\circ
|
|
46
46
|
$$
|
|
47
47
|
|
|
48
48
|
donc le troisième angle vaut :
|
|
49
49
|
|
|
50
50
|
$$
|
|
51
|
-
180 - ${round(sameAngleValue + firstAngleValue, 4).frenchify()} = ${round(180 - (sameAngleValue + firstAngleValue), 4).frenchify()}
|
|
51
|
+
180 - ${round(sameAngleValue + firstAngleValue, 4).frenchify()} = ${round(180 - (sameAngleValue + firstAngleValue), 4).frenchify()}^\\circ
|
|
52
52
|
$$
|
|
53
53
|
|
|
54
54
|
- pour le triangle $${triangleNames[1]}$, la somme des deux angles connus vaut :
|
|
55
55
|
|
|
56
56
|
$$
|
|
57
|
-
${sameAngleValue.frenchify()}
|
|
57
|
+
${sameAngleValue.frenchify()}^\\circ + ${secondAngleValue.frenchify()}^\\circ = ${round(sameAngleValue + secondAngleValue, 4).frenchify()}^\\circ
|
|
58
58
|
$$
|
|
59
59
|
|
|
60
60
|
donc le troisième angle vaut :
|
|
61
61
|
|
|
62
62
|
$$
|
|
63
|
-
180 - ${round(sameAngleValue + secondAngleValue, 4).frenchify()} = ${round(180 - (sameAngleValue + secondAngleValue), 4).frenchify()}
|
|
63
|
+
180 - ${round(sameAngleValue + secondAngleValue, 4).frenchify()} = ${round(180 - (sameAngleValue + secondAngleValue), 4).frenchify()}^\\circ
|
|
64
64
|
$$
|
|
65
65
|
|
|
66
66
|
${isSimilar
|
|
@@ -18,10 +18,10 @@ const getPropositions = (n, { answer, angleAsked, triangleIdentifiers }) => {
|
|
|
18
18
|
triangle.angles[(angleAsked + 2) % 3].getValueNode(true),
|
|
19
19
|
];
|
|
20
20
|
const addAnglesEv = add(angles[0], angles[1]).evaluate();
|
|
21
|
-
tryToAddWrongProp(propositions, "180
|
|
22
|
-
tryToAddWrongProp(propositions, addAnglesEv.frenchify() + "
|
|
21
|
+
tryToAddWrongProp(propositions, "180^\\circ");
|
|
22
|
+
tryToAddWrongProp(propositions, addAnglesEv.frenchify() + "^\\circ");
|
|
23
23
|
propWhile(propositions, n, () => {
|
|
24
|
-
tryToAddWrongProp(propositions, randint(20, 160) + "
|
|
24
|
+
tryToAddWrongProp(propositions, randint(20, 160) + "^\\circ");
|
|
25
25
|
});
|
|
26
26
|
return shuffleProps(propositions, n);
|
|
27
27
|
};
|
|
@@ -34,7 +34,7 @@ const getAnswer = (identifiers) => {
|
|
|
34
34
|
];
|
|
35
35
|
const addAngles = add(angles[0], angles[1]);
|
|
36
36
|
const simp = addAngles.simplify();
|
|
37
|
-
return substract(180, simp).simplify().toTex() + "
|
|
37
|
+
return substract(180, simp).simplify().toTex() + "^\\circ";
|
|
38
38
|
};
|
|
39
39
|
const getInstruction = (identifiers) => {
|
|
40
40
|
const { triangleIdentifiers, angleAsked } = identifiers;
|
|
@@ -42,10 +42,10 @@ const getInstruction = (identifiers) => {
|
|
|
42
42
|
const angles = [
|
|
43
43
|
`${triangle.angles[(angleAsked + 1) % 3].toTex()}=${triangle.angles[(angleAsked + 1) % 3]
|
|
44
44
|
.getValueNode(true)
|
|
45
|
-
.toTex()}
|
|
45
|
+
.toTex()}^\\circ`,
|
|
46
46
|
`${triangle.angles[(angleAsked + 2) % 3].toTex()}=${triangle.angles[(angleAsked + 2) % 3]
|
|
47
47
|
.getValueNode(true)
|
|
48
|
-
.toTex()}
|
|
48
|
+
.toTex()}^\\circ`,
|
|
49
49
|
];
|
|
50
50
|
return `Dans le triangle $${triangle.name}$ ci-dessous, on a $${angles[0]}$ et $${angles[1]}$.
|
|
51
51
|
|
|
@@ -68,13 +68,13 @@ const getCorrection = (identifiers) => {
|
|
|
68
68
|
En additionnant les deux angles donnés dans l'énoncé, on obtient :
|
|
69
69
|
|
|
70
70
|
$$
|
|
71
|
-
${angles[0].toTex()}
|
|
71
|
+
${angles[0].toTex()}^\\circ + ${angles[1].toTex()}^\\circ =${simp.toTex()}^\\circ
|
|
72
72
|
$$
|
|
73
73
|
|
|
74
74
|
L'angle recherché a donc une mesure de :
|
|
75
75
|
|
|
76
76
|
$$
|
|
77
|
-
180
|
|
77
|
+
180^\\circ - ${simp.toTex()}^\\circ=${getAnswer(identifiers)}
|
|
78
78
|
$$`;
|
|
79
79
|
};
|
|
80
80
|
const getGGBOptions = (identifiers) => {
|
package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.js
CHANGED
|
@@ -198,7 +198,7 @@ const getKeys = () => {
|
|
|
198
198
|
};
|
|
199
199
|
const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
200
200
|
const strForKeyIdDegreeReceivedFromTests = "^\\circ";
|
|
201
|
-
const strForKeyIdDegreeReceivedFromFront = "
|
|
201
|
+
const strForKeyIdDegreeReceivedFromFront = "^\\circ"; //different from strForKeyIdDegreeSent: "^\\circ"
|
|
202
202
|
const ansRefined = ans
|
|
203
203
|
.replace(strForKeyIdDegreeReceivedFromTests, "")
|
|
204
204
|
.replace(strForKeyIdDegreeReceivedFromFront, "");
|
package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.js
CHANGED
|
@@ -62,7 +62,7 @@ ${triangle.sides
|
|
|
62
62
|
|
|
63
63
|
- $${triangle.angles[indexAngle].toTexMini()} = ${triangle.angles[indexAngle]
|
|
64
64
|
.evaluate()
|
|
65
|
-
.frenchify()} {}
|
|
65
|
+
.frenchify()} {}^\\circ $
|
|
66
66
|
|
|
67
67
|
Calculer la longueur $${triangle.sides[indexSide].toTex()}$ (donner une valeur arrondie à $${precision}$ décimales).`;
|
|
68
68
|
};
|
|
@@ -73,7 +73,7 @@ const getAnswerStuff = (identifiers) => {
|
|
|
73
73
|
const nodeAngleInDegrees = triangle.angles[indexAngle].evaluate().toTree();
|
|
74
74
|
const nodeAngleInRadians = multiply(nodeAngleInDegrees, frac(PiNode, 180));
|
|
75
75
|
//"nodeStr"
|
|
76
|
-
const nodeStrLengthSquared = substract(add(power(sides[1].getLengthNode(), 2), power(sides[2].getLengthNode(), 2)), multiply(2, multiply(multiply(sides[1].getLengthNode(), sides[2].getLengthNode()), cos(multiply(nodeAngleInDegrees, "{}
|
|
76
|
+
const nodeStrLengthSquared = substract(add(power(sides[1].getLengthNode(), 2), power(sides[2].getLengthNode(), 2)), multiply(2, multiply(multiply(sides[1].getLengthNode(), sides[2].getLengthNode()), cos(multiply(nodeAngleInDegrees, "{}^\\circ".toTree())))));
|
|
77
77
|
const nodeStrLength = sqrt(nodeStrLengthSquared.simplify());
|
|
78
78
|
//"true" nodes
|
|
79
79
|
const nodeLengthSquared = substract(add(power(sides[1].getLengthNode(), 2), power(sides[2].getLengthNode(), 2)), multiply(2, multiply(multiply(sides[1].getLengthNode(), sides[2].getLengthNode()), cos(nodeAngleInRadians))));
|
|
@@ -17,7 +17,7 @@ const getPropositions = (n, { answer }) => {
|
|
|
17
17
|
const propositions = [];
|
|
18
18
|
addValidProp(propositions, answer);
|
|
19
19
|
propWhile(propositions, n, () => {
|
|
20
|
-
tryToAddWrongProp(propositions, randint(0, 180) + "
|
|
20
|
+
tryToAddWrongProp(propositions, randint(0, 180) + "^\\circ");
|
|
21
21
|
});
|
|
22
22
|
return shuffleProps(propositions, n);
|
|
23
23
|
};
|
|
@@ -30,7 +30,7 @@ const getAnswer = (identifiers) => {
|
|
|
30
30
|
const normV = v.getNorm();
|
|
31
31
|
const cos = frac(ps, multiply(normU, normV)).simplify();
|
|
32
32
|
const arc = round((180 * Math.acos(cos.evaluate())) / Math.PI, 0);
|
|
33
|
-
return arc.frenchify() + "
|
|
33
|
+
return arc.frenchify() + "^\\circ";
|
|
34
34
|
};
|
|
35
35
|
const getInstruction = (identifiers) => {
|
|
36
36
|
const points = getPoints(identifiers);
|
package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scalarProductOrthoInSquare.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"scalarProductOrthoInSquare.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAiBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAkOF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAmB5D,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { addValidProp, shuffleProps, tryToAddWrongProp, propWhile,
|
|
2
2
|
// GetHint,
|
|
3
|
+
// GetCorrection,
|
|
4
|
+
// GetHint,
|
|
3
5
|
// GetCorrection,
|
|
4
6
|
} from "../../../../../exercises/exercise.js";
|
|
5
7
|
import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
|
|
@@ -155,14 +157,37 @@ const getScalarProductOrthoInSquareQuestion = () => {
|
|
|
155
157
|
// `;
|
|
156
158
|
// };
|
|
157
159
|
// const getCorrection: GetCorrection<Identifiers> = (identifiers) => {
|
|
158
|
-
// const {areSameDirection,vec1Name,vec2Name} = identifiers
|
|
159
|
-
//
|
|
160
|
-
//
|
|
160
|
+
// const { areSameDirection, vec1Name, vec2Name, c } = identifiers;
|
|
161
|
+
// const vecs = [
|
|
162
|
+
// ["AB", "DC"],
|
|
163
|
+
// ["AC"],
|
|
164
|
+
// ["AD", "IK", "BC"],
|
|
165
|
+
// ["AJ", "LC"],
|
|
166
|
+
// ["AO", "LK", "OC", "IJ"],
|
|
167
|
+
// ["AK", "IC"],
|
|
168
|
+
// ["AI", "IB", "LO", "OJ", "DK", "KC"],
|
|
169
|
+
// ["AL", "LD", "IO", "OK", "BJ", "JC"],
|
|
170
|
+
// ];
|
|
171
|
+
// const index1 = vecs.findIndex(
|
|
172
|
+
// (e) =>
|
|
173
|
+
// e.includes(vec1Name) || e.includes(vec1Name.split("").reverse().join("")),
|
|
174
|
+
// );
|
|
175
|
+
// const firstIsReversed = !vecs[index1].includes(vec1Name);
|
|
176
|
+
// const index2 = vecs.findIndex(
|
|
177
|
+
// (e) =>
|
|
178
|
+
// e.includes(vec2Name) || e.includes(vec2Name.split("").reverse().join("")),
|
|
179
|
+
// );
|
|
180
|
+
// const secondIsReversed = !vecs[index2].includes(vec2Name);
|
|
181
|
+
// if (vec1Name[0] === vec2Name[0]) return `immédiat`;
|
|
182
|
+
// for (let i = 0; i < vecs[index1].length; i++) {
|
|
183
|
+
// const rep = vecs[index1][i];
|
|
184
|
+
// const origin1 = rep[0];
|
|
185
|
+
// const sameOrigin = vecs[index2].find((e) => e[0] === origin1);
|
|
186
|
+
// if (sameOrigin)
|
|
187
|
+
// return `on prend $${rep}$ et $${sameOrigin}$. ${sameOrigin[1]} à projeter sur ${rep}`;
|
|
161
188
|
// }
|
|
162
189
|
// return `On a :
|
|
163
|
-
// ${alignTex([
|
|
164
|
-
// []
|
|
165
|
-
// ])}
|
|
190
|
+
// ${alignTex([[]])}
|
|
166
191
|
// `;
|
|
167
192
|
// };
|
|
168
193
|
const getQuestionFromIdentifiers = (identifiers) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/randomVariable/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/randomVariable/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sCAAsC,CAAC;AAGrD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,4CAA4C,CAAC;AAE3D,cAAc,iDAAiD,CAAC"}
|
|
@@ -3,6 +3,7 @@ export * from "./randomVariableVariance.js";
|
|
|
3
3
|
export * from "./isTableProbabilityLaw.js";
|
|
4
4
|
export * from "./randomVariableStandardDeviation.js";
|
|
5
5
|
// export * from "./findValueForFairRandomVariable.js";
|
|
6
|
+
// export * from "./findValueToMatchRandomVariableAverage.js";
|
|
6
7
|
export * from "./findValueToMatchRandomVariableAverage.js";
|
|
7
8
|
export * from "./calculateProbaFromVATableLaw.js";
|
|
8
9
|
export * from "./randomVariableSituationValues.js";
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
export { probabilityTree,
|
|
2
|
-
export * from "./fillProbaTreeWithComplementaryProbabilities.js";
|
|
3
|
-
export * from "./buildTreeFromSituation.js";
|
|
1
|
+
export { probabilityTree, } from "./probabilityTree.js";
|
|
4
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/trees/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/trees/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,GAKhB,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
// export * from "./treeInInstruction.js";
|
|
2
2
|
// export * from "./treeInAnswer.js";
|
|
3
|
-
export { probabilityTree,
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export { probabilityTree,
|
|
4
|
+
// probabilityTreeIntersection,
|
|
5
|
+
// probabilityTreeTotalProbability,
|
|
6
|
+
// probabilityTreeReadProbability,
|
|
7
|
+
// probabilityTreeInversionProbability,
|
|
8
|
+
} from "./probabilityTree.js";
|
|
9
|
+
// export * from "./fillProbaTreeWithComplementaryProbabilities.js";
|
|
10
|
+
// export * from "./buildTreeFromSituation.js";
|
|
@@ -8,18 +8,12 @@ type Identifiers = {
|
|
|
8
8
|
BC: NodeIdentifiers;
|
|
9
9
|
BD: NodeIdentifiers;
|
|
10
10
|
probaName: string;
|
|
11
|
-
useContraryNames?: boolean;
|
|
12
11
|
};
|
|
13
12
|
type Options = {
|
|
14
|
-
allowApproximate
|
|
15
|
-
eventTypes
|
|
16
|
-
probaType
|
|
17
|
-
eventsNames?: string;
|
|
13
|
+
allowApproximate: string;
|
|
14
|
+
eventTypes: string[];
|
|
15
|
+
probaType: string;
|
|
18
16
|
};
|
|
19
17
|
export declare const probabilityTree: Exercise<Identifiers, Options>;
|
|
20
|
-
export declare const probabilityTreeIntersection: Exercise<Identifiers, Options>;
|
|
21
|
-
export declare const probabilityTreeTotalProbability: Exercise<Identifiers, Options>;
|
|
22
|
-
export declare const probabilityTreeReadProbability: Exercise<Identifiers, Options>;
|
|
23
|
-
export declare const probabilityTreeInversionProbability: Exercise<Identifiers, Options>;
|
|
24
18
|
export {};
|
|
25
19
|
//# sourceMappingURL=probabilityTree.d.ts.map
|