math-exercises 3.0.99 → 3.0.100
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/geometry/areas/calculateAreaFromCodedShape.d.ts +9 -0
- package/lib/exercises/math/geometry/areas/calculateAreaFromCodedShape.d.ts.map +1 -0
- package/lib/exercises/math/geometry/areas/calculateAreaFromCodedShape.js +156 -0
- package/lib/exercises/math/geometry/areas/index.d.ts +1 -0
- package/lib/exercises/math/geometry/areas/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/index.js +1 -0
- package/lib/exercises/math/geometry/euclidian/index.d.ts +1 -0
- package/lib/exercises/math/geometry/euclidian/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidian/index.js +1 -0
- package/lib/exercises/math/geometry/euclidian/orthogonalProjectFromPicture.d.ts +8 -0
- package/lib/exercises/math/geometry/euclidian/orthogonalProjectFromPicture.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidian/orthogonalProjectFromPicture.js +197 -0
- package/lib/exercises/math/geometry/euclidianConstructions/pointImageFromTranslation.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidianConstructions/pointImageFromTranslation.js +9 -4
- package/lib/exercises/math/geometry/pythagore/calculateDiagonalFromSides.d.ts +9 -0
- package/lib/exercises/math/geometry/pythagore/calculateDiagonalFromSides.d.ts.map +1 -0
- package/lib/exercises/math/geometry/pythagore/calculateDiagonalFromSides.js +155 -0
- package/lib/exercises/math/geometry/pythagore/index.d.ts +1 -0
- package/lib/exercises/math/geometry/pythagore/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/pythagore/index.js +2 -0
- package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +1 -1
- package/lib/exercises/math/geometry/pythagore/triangleHeight.d.ts +9 -0
- package/lib/exercises/math/geometry/pythagore/triangleHeight.d.ts.map +1 -0
- package/lib/exercises/math/geometry/pythagore/triangleHeight.js +105 -0
- package/lib/exercises/math/geometry/quadrilaterals/index.d.ts +2 -0
- package/lib/exercises/math/geometry/quadrilaterals/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/quadrilaterals/index.js +2 -0
- package/lib/exercises/math/geometry/quadrilaterals/parallelogramRectangle.d.ts +11 -0
- package/lib/exercises/math/geometry/quadrilaterals/parallelogramRectangle.d.ts.map +1 -0
- package/lib/exercises/math/geometry/quadrilaterals/parallelogramRectangle.js +140 -0
- package/lib/exercises/math/geometry/quadrilaterals/parallelogramRhombus.d.ts +11 -0
- package/lib/exercises/math/geometry/quadrilaterals/parallelogramRhombus.d.ts.map +1 -0
- package/lib/exercises/math/geometry/quadrilaterals/parallelogramRhombus.js +144 -0
- package/lib/exercises/math/geometry/vectors/colinearity/colinearityFromPicture.d.ts +9 -0
- package/lib/exercises/math/geometry/vectors/colinearity/colinearityFromPicture.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/colinearity/colinearityFromPicture.js +201 -0
- package/lib/exercises/math/geometry/vectors/colinearity/determinant.d.ts +8 -0
- package/lib/exercises/math/geometry/vectors/colinearity/determinant.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/colinearity/determinant.js +101 -0
- package/lib/exercises/math/geometry/vectors/colinearity/index.d.ts +2 -0
- package/lib/exercises/math/geometry/vectors/colinearity/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/colinearity/index.js +2 -0
- package/lib/exercises/math/geometry/vectors/constructions/drawAVectorInGGB.d.ts +8 -0
- package/lib/exercises/math/geometry/vectors/constructions/drawAVectorInGGB.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/constructions/drawAVectorInGGB.js +78 -0
- package/lib/exercises/math/geometry/vectors/constructions/index.d.ts +8 -0
- package/lib/exercises/math/geometry/vectors/constructions/index.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/constructions/index.js +7 -0
- package/lib/exercises/math/geometry/vectors/constructions/linearVectorCombinationFromGraph.d.ts +9 -0
- package/lib/exercises/math/geometry/vectors/constructions/linearVectorCombinationFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/constructions/linearVectorCombinationFromGraph.js +179 -0
- package/lib/exercises/math/geometry/vectors/constructions/placePointFromPointAndVector.d.ts +12 -0
- package/lib/exercises/math/geometry/vectors/constructions/placePointFromPointAndVector.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/constructions/placePointFromPointAndVector.js +171 -0
- package/lib/exercises/math/geometry/vectors/constructions/traceOppositeVector.d.ts +10 -0
- package/lib/exercises/math/geometry/vectors/constructions/traceOppositeVector.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/constructions/traceOppositeVector.js +110 -0
- package/lib/exercises/math/geometry/vectors/constructions/traceVectorDifference.d.ts +11 -0
- package/lib/exercises/math/geometry/vectors/constructions/traceVectorDifference.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/constructions/traceVectorDifference.js +123 -0
- package/lib/exercises/math/geometry/vectors/constructions/traceVectorMultiple.d.ts +11 -0
- package/lib/exercises/math/geometry/vectors/constructions/traceVectorMultiple.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/constructions/traceVectorMultiple.js +115 -0
- package/lib/exercises/math/geometry/vectors/constructions/traceVectorSum.d.ts +11 -0
- package/lib/exercises/math/geometry/vectors/constructions/traceVectorSum.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/constructions/traceVectorSum.js +123 -0
- package/lib/exercises/math/geometry/vectors/coordinatesReading.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/coordinatesReading.js +63 -14
- package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.d.ts +3 -0
- package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.js +63 -2
- package/lib/exercises/math/geometry/vectors/index.d.ts +4 -8
- package/lib/exercises/math/geometry/vectors/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/index.js +4 -8
- package/lib/exercises/math/geometry/vectors/parallelogram/fourthParallelogramPoint.d.ts +14 -0
- package/lib/exercises/math/geometry/vectors/parallelogram/fourthParallelogramPoint.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/parallelogram/fourthParallelogramPoint.js +78 -0
- package/lib/exercises/math/geometry/vectors/parallelogram/index.d.ts +4 -0
- package/lib/exercises/math/geometry/vectors/parallelogram/index.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/parallelogram/index.js +3 -0
- package/lib/exercises/math/geometry/vectors/parallelogram/parallelogramCriterion.d.ts +8 -0
- package/lib/exercises/math/geometry/vectors/parallelogram/parallelogramCriterion.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/parallelogram/parallelogramCriterion.js +193 -0
- package/lib/exercises/math/geometry/vectors/parallelogram/parallelogramViaEqualVectors.d.ts +14 -0
- package/lib/exercises/math/geometry/vectors/parallelogram/parallelogramViaEqualVectors.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/parallelogram/parallelogramViaEqualVectors.js +116 -0
- package/lib/exercises/math/geometry/vectors/translationFromPicture.d.ts +8 -0
- package/lib/exercises/math/geometry/vectors/translationFromPicture.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/translationFromPicture.js +104 -0
- package/lib/exercises/math/geometry/vectors/vectorRepresentative.d.ts +8 -0
- package/lib/exercises/math/geometry/vectors/vectorRepresentative.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/vectorRepresentative.js +161 -0
- package/lib/exercises/math/geometry/volumes/index.d.ts +1 -0
- package/lib/exercises/math/geometry/volumes/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/volumes/index.js +1 -0
- package/lib/exercises/math/geometry/volumes/variableVolume.d.ts +9 -0
- package/lib/exercises/math/geometry/volumes/variableVolume.d.ts.map +1 -0
- package/lib/exercises/math/geometry/volumes/variableVolume.js +203 -0
- package/lib/index.d.ts +89 -40
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/point.d.ts +1 -0
- package/lib/math/geometry/point.d.ts.map +1 -1
- package/lib/math/geometry/point.js +3 -0
- package/lib/math/geometry/vector.d.ts +1 -0
- package/lib/math/geometry/vector.d.ts.map +1 -1
- package/lib/math/geometry/vector.js +3 -0
- package/lib/playground.d.ts.map +1 -1
- package/lib/tests/pdfs/quizPdfPreambule.js +1 -1
- package/lib/tests/questionTest.d.ts.map +1 -1
- package/lib/tests/questionTest.js +4 -4
- package/lib/tree/nodes/functions/sqrtNode.d.ts +1 -1
- package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sqrtNode.js +8 -2
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
shape: number;
|
|
4
|
+
height: number;
|
|
5
|
+
width: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const calculateAreaFromCodedShape: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=calculateAreaFromCodedShape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculateAreaFromCodedShape.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/calculateAreaFromCodedShape.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA8KF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAsB7D,CAAC"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { numberVEA } from "../../../../exercises/vea/numberVEA.js";
|
|
4
|
+
import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
|
|
5
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
6
|
+
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
7
|
+
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
8
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
9
|
+
const getPropositions = (n, { answer, height, shape, width }) => {
|
|
10
|
+
const propositions = [];
|
|
11
|
+
addValidProp(propositions, answer);
|
|
12
|
+
tryToAddWrongProp(propositions, (height * width).frenchify());
|
|
13
|
+
tryToAddWrongProp(propositions, ((height * width) / 2).frenchify());
|
|
14
|
+
while (propositions.length < n) {
|
|
15
|
+
tryToAddWrongProp(propositions, ((3 / 4) * height * width + randint(-3, 3, [0])).frenchify());
|
|
16
|
+
}
|
|
17
|
+
return shuffleProps(propositions, n);
|
|
18
|
+
};
|
|
19
|
+
const getAnswer = (identifiers) => {
|
|
20
|
+
return multiply(0.75, identifiers.height * identifiers.width)
|
|
21
|
+
.simplify()
|
|
22
|
+
.toTex();
|
|
23
|
+
};
|
|
24
|
+
const getInstruction = (identifiers) => {
|
|
25
|
+
return `On considère la figure ci-dessous.
|
|
26
|
+
|
|
27
|
+
Quelle est l'aire de la surface colorée ?`;
|
|
28
|
+
};
|
|
29
|
+
const getHint = (identifiers) => {
|
|
30
|
+
return `L'aire de la surface colorée est égale à l'aire du rectangle $ABCD$ moins l'aire du triangle $CED$.`;
|
|
31
|
+
};
|
|
32
|
+
const getCorrection = (identifiers) => {
|
|
33
|
+
//rectangle - triangle
|
|
34
|
+
//moitié rectangle + triangle
|
|
35
|
+
//moitié reactangle + moitié moitié reactalge
|
|
36
|
+
const { height, shape, width } = identifiers;
|
|
37
|
+
return `Pour calculer l'aire de la surface colorée, on remarque qu'elle est égale à l'aire du rectangle $ABCD$ moins l'aire du triangle $CED$.
|
|
38
|
+
|
|
39
|
+
L'aire du rectangle $ABCD$ est égale à :
|
|
40
|
+
|
|
41
|
+
$$
|
|
42
|
+
${multiply(height, width).toTex({ forceNoSimplification: true })}=${(height * width).frenchify()}
|
|
43
|
+
$$
|
|
44
|
+
|
|
45
|
+
On calcule ensuite l'aire du triangle $CED$. Puisqu'il est rectangle en $D$, son aire vaut :
|
|
46
|
+
|
|
47
|
+
$$
|
|
48
|
+
${frac(multiply("CD", "DE"), 2).toTex({ forceTimesSign: true })}
|
|
49
|
+
$$
|
|
50
|
+
|
|
51
|
+
Or $CD = ${height.frenchify()}$ et $DE = ${(width / 2).frenchify()}$. L'aire de $CED$ vaut donc :
|
|
52
|
+
|
|
53
|
+
$$
|
|
54
|
+
${frac(multiply(height, width / 2), 2).toTex()}=${((height * width) /
|
|
55
|
+
4).frenchify()}
|
|
56
|
+
$$
|
|
57
|
+
|
|
58
|
+
L'aire de la surface colorée vaut donc :
|
|
59
|
+
|
|
60
|
+
$$
|
|
61
|
+
${substract(height * width, (height * width) / 4).toTex()} = ${getAnswer(identifiers)}
|
|
62
|
+
$$
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
`;
|
|
67
|
+
};
|
|
68
|
+
const getGGBOptions = (identifiers) => {
|
|
69
|
+
const { height, shape, width } = identifiers;
|
|
70
|
+
const ggb = new GeogebraConstructor({
|
|
71
|
+
commands: [
|
|
72
|
+
`B = (0,0)`,
|
|
73
|
+
`C = (${width},0)`,
|
|
74
|
+
`D = (${width},${height})`,
|
|
75
|
+
`A = (0,${height})`,
|
|
76
|
+
`E = (${width / 2},${height})`,
|
|
77
|
+
...["A", "B", "C", "D", "E"].flatMap((e) => [
|
|
78
|
+
`SetVisibleInView(${e},1, false)`,
|
|
79
|
+
`SetFixed(${e}, true)`,
|
|
80
|
+
]),
|
|
81
|
+
`Segment(E, C)`,
|
|
82
|
+
`Segment(D, C)`,
|
|
83
|
+
`se1 = Segment(A, E)`,
|
|
84
|
+
`se2 = Segment(E,D)`,
|
|
85
|
+
`SetDecoration(se1, 2)`,
|
|
86
|
+
`SetDecoration(se2, 2)`,
|
|
87
|
+
`a = Angle(C,B,A)`,
|
|
88
|
+
`ShowLabel(a, false)`,
|
|
89
|
+
`b = Angle(B,A,D)`,
|
|
90
|
+
`ShowLabel(b, false)`,
|
|
91
|
+
`c = Angle(A,D,C)`,
|
|
92
|
+
`ShowLabel(c, false)`,
|
|
93
|
+
`P = Polygon(B,A,E,C)`,
|
|
94
|
+
`SetFixed(P, true)`,
|
|
95
|
+
`Text("$\\scriptsize B$", (0, -0.1*${height}), true, true, 0, 0)`,
|
|
96
|
+
`Text("$\\scriptsize C$", (${width}, -0.1*${height}), true, true, 0, 0)`,
|
|
97
|
+
`Text("$\\scriptsize D$", (${width}, ${height}+0.3+${Math.min(1, 0.1 * height)}), true, true, 0, 0)`,
|
|
98
|
+
`Text("$\\scriptsize E$", (${width / 2}, ${height}+0.3+${Math.min(1, 0.1 * height)}), true, true, 0, 0)`,
|
|
99
|
+
`Text("$\\scriptsize A$", (0, ${height}+0.3+${Math.min(1, 0.1 * height)}), true, true, 0, 0)`,
|
|
100
|
+
`Text("$\\scriptsize ${height}$", (-0.4, ${height / 2}), true, true, 0, 0)`,
|
|
101
|
+
`Text("$\\scriptsize ${width}$", (${width / 2}, -0.1*${height}), true, true, 0, 0)`,
|
|
102
|
+
],
|
|
103
|
+
hideAxes: true,
|
|
104
|
+
hideGrid: true,
|
|
105
|
+
});
|
|
106
|
+
return ggb.getOptions({
|
|
107
|
+
coords: [-1, width + 1, -1.5, height + 1.5],
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
const getKeys = (identifiers) => {
|
|
111
|
+
return [];
|
|
112
|
+
};
|
|
113
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
114
|
+
return numberVEA(ans, answer);
|
|
115
|
+
};
|
|
116
|
+
const getCalculateAreaFromCodedShapeQuestion = (opts) => {
|
|
117
|
+
const width = randint(3, 11);
|
|
118
|
+
const height = randint(1, width);
|
|
119
|
+
const identifiers = {
|
|
120
|
+
shape: 1,
|
|
121
|
+
height,
|
|
122
|
+
width,
|
|
123
|
+
};
|
|
124
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
125
|
+
};
|
|
126
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
127
|
+
return {
|
|
128
|
+
answer: getAnswer(identifiers),
|
|
129
|
+
instruction: getInstruction(identifiers),
|
|
130
|
+
keys: getKeys(identifiers),
|
|
131
|
+
answerFormat: "tex",
|
|
132
|
+
identifiers,
|
|
133
|
+
hint: getHint(identifiers),
|
|
134
|
+
correction: getCorrection(identifiers),
|
|
135
|
+
ggbOptions: getGGBOptions(identifiers),
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
export const calculateAreaFromCodedShape = {
|
|
139
|
+
id: "calculateAreaFromCodedShape",
|
|
140
|
+
label: "Calculer l'aire d'une figure codée",
|
|
141
|
+
isSingleStep: true,
|
|
142
|
+
generator: (nb, opts) => getDistinctQuestions(() => getCalculateAreaFromCodedShapeQuestion(opts), nb),
|
|
143
|
+
qcmTimer: 60,
|
|
144
|
+
freeTimer: 60,
|
|
145
|
+
getPropositions,
|
|
146
|
+
isAnswerValid,
|
|
147
|
+
subject: "Mathématiques",
|
|
148
|
+
getHint,
|
|
149
|
+
getCorrection,
|
|
150
|
+
getInstruction,
|
|
151
|
+
getAnswer,
|
|
152
|
+
getGGBOptions,
|
|
153
|
+
hasGeogebra: true,
|
|
154
|
+
getQuestionFromIdentifiers,
|
|
155
|
+
hasHintAndCorrection: true,
|
|
156
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kCAAkC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/euclidian/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/euclidian/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
point: string;
|
|
4
|
+
line: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const orthogonalProjectFromPicture: Exercise<Identifiers>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=orthogonalProjectFromPicture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orthogonalProjectFromPicture.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/euclidian/orthogonalProjectFromPicture.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAkMF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAoB9D,CAAC"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { Point } from "../../../../math/geometry/point.js";
|
|
4
|
+
import { random } from "../../../../utils/alea/random.js";
|
|
5
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
6
|
+
const getPoints = () => {
|
|
7
|
+
const points = [
|
|
8
|
+
new Point("A", 0, 0),
|
|
9
|
+
new Point("B", 4, 0),
|
|
10
|
+
new Point("C", 4, 4),
|
|
11
|
+
new Point("D", 0, 4),
|
|
12
|
+
new Point("E", 0, 2),
|
|
13
|
+
new Point("F", 4, 2),
|
|
14
|
+
new Point("G", 2, 4),
|
|
15
|
+
new Point("H", 2, 0),
|
|
16
|
+
new Point("I", 1, 3),
|
|
17
|
+
new Point("J", 3, 1),
|
|
18
|
+
new Point("K", 1, 1),
|
|
19
|
+
new Point("L", 3, 3),
|
|
20
|
+
new Point("P", 2, 2),
|
|
21
|
+
];
|
|
22
|
+
return points;
|
|
23
|
+
};
|
|
24
|
+
const getNames = () => {
|
|
25
|
+
const names = [
|
|
26
|
+
"A",
|
|
27
|
+
"B",
|
|
28
|
+
"C",
|
|
29
|
+
"D",
|
|
30
|
+
"E",
|
|
31
|
+
"F",
|
|
32
|
+
"G",
|
|
33
|
+
"H",
|
|
34
|
+
"I",
|
|
35
|
+
"J",
|
|
36
|
+
"K",
|
|
37
|
+
"L",
|
|
38
|
+
"P",
|
|
39
|
+
];
|
|
40
|
+
return names;
|
|
41
|
+
};
|
|
42
|
+
const getPropositions = (n, { answer }) => {
|
|
43
|
+
const propositions = [];
|
|
44
|
+
addValidProp(propositions, answer);
|
|
45
|
+
const names = getNames();
|
|
46
|
+
while (propositions.length < n) {
|
|
47
|
+
tryToAddWrongProp(propositions, random(names));
|
|
48
|
+
}
|
|
49
|
+
return shuffleProps(propositions, n);
|
|
50
|
+
};
|
|
51
|
+
const getAnswer = (identifiers) => {
|
|
52
|
+
const projs = [
|
|
53
|
+
{ line: "AB", A: ["A", "E", "D"], H: ["G", "P", "H"], B: ["C", "F", "B"] },
|
|
54
|
+
{ line: "EF", E: ["A", "E", "D"], P: ["G", "P", "H"], F: ["C", "F", "B"] },
|
|
55
|
+
{ line: "DC", D: ["A", "E", "D"], G: ["G", "P", "H"], C: ["C", "F", "B"] },
|
|
56
|
+
{ line: "DA", A: ["A", "H", "B"], E: ["E", "P", "F"], D: ["D", "G", "C"] },
|
|
57
|
+
{ line: "GH", H: ["A", "H", "B"], P: ["E", "P", "F"], G: ["D", "G", "C"] },
|
|
58
|
+
{ line: "CB", B: ["A", "H", "B"], F: ["E", "P", "F"], C: ["D", "G", "C"] },
|
|
59
|
+
{
|
|
60
|
+
line: "DB",
|
|
61
|
+
D: ["D"],
|
|
62
|
+
I: ["E", "I", "G"],
|
|
63
|
+
P: ["A", "K", "P", "L", "C"],
|
|
64
|
+
J: ["H", "J", "F"],
|
|
65
|
+
B: ["B"],
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
line: "AC",
|
|
69
|
+
C: ["C"],
|
|
70
|
+
K: ["E", "K", "H"],
|
|
71
|
+
P: ["D", "I", "P", "J", "B"],
|
|
72
|
+
L: ["G", "L", "F"],
|
|
73
|
+
A: ["A"],
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
line: "EH",
|
|
77
|
+
E: ["E", "I", "G"],
|
|
78
|
+
H: ["H", "J", "F"],
|
|
79
|
+
K: ["A", "K", "P", "L", "C"],
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
line: "GF",
|
|
83
|
+
G: ["E", "I", "G"],
|
|
84
|
+
F: ["H", "J", "F"],
|
|
85
|
+
L: ["A", "K", "P", "L", "C"],
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
line: "EG",
|
|
89
|
+
E: ["E", "K", "H"],
|
|
90
|
+
G: ["G", "L", "F"],
|
|
91
|
+
I: ["D", "I", "P", "J", "B"],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
line: "HF",
|
|
95
|
+
H: ["E", "K", "H"],
|
|
96
|
+
F: ["G", "L", "F"],
|
|
97
|
+
J: ["D", "I", "P", "J", "B"],
|
|
98
|
+
},
|
|
99
|
+
];
|
|
100
|
+
const dataSet = projs.find((e) => e.line === identifiers.line);
|
|
101
|
+
for (const [key, value] of Object.entries(dataSet)) {
|
|
102
|
+
if (key === "line")
|
|
103
|
+
continue;
|
|
104
|
+
if (value.includes(identifiers.point)) {
|
|
105
|
+
return key;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return "";
|
|
109
|
+
};
|
|
110
|
+
const getInstruction = (identifiers) => {
|
|
111
|
+
const { line, point } = identifiers;
|
|
112
|
+
return `On considère le carré $ABCD$ ci-dessous :
|
|
113
|
+
|
|
114
|
+

|
|
115
|
+
|
|
116
|
+
Quel est le projeté orthogonal de $${point}$ sur la droite $\\left(${line}\\right)$ ?
|
|
117
|
+
`;
|
|
118
|
+
};
|
|
119
|
+
const getHint = (identifiers) => {
|
|
120
|
+
return `- Si $A$ est un point sur une droite $d$, alors le projeté orthogonal de $A$ sur $d$ est $A$.
|
|
121
|
+
|
|
122
|
+
- Si $A$ n'appartient pas à la droite $d$, alors le projeté orthogonal de $A$ sur $d$ est le point $H$ sur $d$ tel que la droite $(AH)$ est perpendiculaire à $d$.`;
|
|
123
|
+
};
|
|
124
|
+
const getCorrection = (identifiers) => {
|
|
125
|
+
const { line, point } = identifiers;
|
|
126
|
+
//si point sur droite
|
|
127
|
+
//sinon
|
|
128
|
+
const points = getPoints();
|
|
129
|
+
const pointAnswer = getAnswer(identifiers);
|
|
130
|
+
const pointObj = points.find((e) => e.name === point);
|
|
131
|
+
const linePoints = points.filter((e) => line.includes(e.name));
|
|
132
|
+
const isOnLine = pointObj.isAligned(linePoints[0], linePoints[1]);
|
|
133
|
+
if (isOnLine) {
|
|
134
|
+
return `Puisque $${point}$ appartient à la droite $\\left(${line}\\right)$, le projeté orthogonal de $${point}$ sur $\\left(${line}\\right)$ est $${point}$.`;
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
return `Les droites $\\left(${line}\\right)$ et $\\left(${point}${pointAnswer}\\right)$ sont perpendiculaires. De plus, le point $${pointAnswer}$ appartient à la droite $${line}$. Le projeté orthogonal de $${point}$ sur $\\left(${line}\\right)$ est donc $${pointAnswer}$.`;
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
const getKeys = (identifiers) => {
|
|
141
|
+
const names = getNames();
|
|
142
|
+
return names;
|
|
143
|
+
};
|
|
144
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
145
|
+
try {
|
|
146
|
+
return ans === answer;
|
|
147
|
+
}
|
|
148
|
+
catch (err) {
|
|
149
|
+
return handleVEAError(err);
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
const getOrthogonalProjectFromPictureQuestion = (ops) => {
|
|
153
|
+
const data = [
|
|
154
|
+
{ lines: ["AB", "EF", "DC"], excludes: ["I", "J", "K", "L"] },
|
|
155
|
+
{ lines: ["DA", "GH", "CB"], excludes: ["I", "J", "K", "L"] },
|
|
156
|
+
{ lines: ["DB", "AC"], excludes: [] },
|
|
157
|
+
{ lines: ["EH", "GF"], excludes: ["B", "D"] },
|
|
158
|
+
{ lines: ["EG", "HF"], excludes: ["A", "C"] },
|
|
159
|
+
];
|
|
160
|
+
const names = getNames();
|
|
161
|
+
const dataSet = random(data);
|
|
162
|
+
const line = random(dataSet.lines);
|
|
163
|
+
const point = random(names, dataSet.excludes);
|
|
164
|
+
const identifiers = {
|
|
165
|
+
line,
|
|
166
|
+
point,
|
|
167
|
+
};
|
|
168
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
169
|
+
};
|
|
170
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
171
|
+
return {
|
|
172
|
+
answer: getAnswer(identifiers),
|
|
173
|
+
instruction: getInstruction(identifiers),
|
|
174
|
+
keys: getKeys(identifiers),
|
|
175
|
+
answerFormat: "tex",
|
|
176
|
+
identifiers,
|
|
177
|
+
hint: getHint(identifiers),
|
|
178
|
+
correction: getCorrection(identifiers),
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
export const orthogonalProjectFromPicture = {
|
|
182
|
+
id: "orthogonalProjectFromPicture",
|
|
183
|
+
label: "Identifier le projeté orthogonal d'un point sur une figure codée",
|
|
184
|
+
isSingleStep: true,
|
|
185
|
+
generator: (nb, opts) => getDistinctQuestions(() => getOrthogonalProjectFromPictureQuestion(opts), nb),
|
|
186
|
+
qcmTimer: 60,
|
|
187
|
+
freeTimer: 60,
|
|
188
|
+
getPropositions,
|
|
189
|
+
isAnswerValid,
|
|
190
|
+
subject: "Mathématiques",
|
|
191
|
+
getInstruction,
|
|
192
|
+
getHint,
|
|
193
|
+
getCorrection,
|
|
194
|
+
getAnswer,
|
|
195
|
+
getQuestionFromIdentifiers,
|
|
196
|
+
hasHintAndCorrection: true,
|
|
197
|
+
};
|
package/lib/exercises/math/geometry/euclidianConstructions/pointImageFromTranslation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pointImageFromTranslation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/euclidianConstructions/pointImageFromTranslation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAMtC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;
|
|
1
|
+
{"version":3,"file":"pointImageFromTranslation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/euclidianConstructions/pointImageFromTranslation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAMtC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AA8IF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAiBpE,CAAC"}
|
|
@@ -23,8 +23,12 @@ const getEndPoint = (identifiers) => {
|
|
|
23
23
|
const end = vector.getEndPoint(startPoint, identifiers.startPoint + "'");
|
|
24
24
|
return end;
|
|
25
25
|
};
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
const getHint = (identifiers) => {
|
|
27
|
+
return ``;
|
|
28
|
+
};
|
|
29
|
+
const getCorrection = (identifiers) => {
|
|
30
|
+
return ``;
|
|
31
|
+
};
|
|
28
32
|
const getGGBAnswer = (identifiers) => {
|
|
29
33
|
return getEndPoint(identifiers).toGGBCommand();
|
|
30
34
|
};
|
|
@@ -108,11 +112,12 @@ export const pointImageFromTranslation = {
|
|
|
108
112
|
ggbTimer: 60,
|
|
109
113
|
isGGBAnswerValid,
|
|
110
114
|
subject: "Mathématiques",
|
|
111
|
-
|
|
112
|
-
|
|
115
|
+
getHint,
|
|
116
|
+
getCorrection,
|
|
113
117
|
getGGBAnswer,
|
|
114
118
|
getStudentGGBOptions,
|
|
115
119
|
answerType: "GGB",
|
|
116
120
|
options,
|
|
117
121
|
getQuestionFromIdentifiers,
|
|
122
|
+
// hasHintAndCorrection: true,
|
|
118
123
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
shape: "square" | "rectangle";
|
|
4
|
+
side: number;
|
|
5
|
+
side2?: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const calculateDiagonalFromSides: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=calculateDiagonalFromSides.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculateDiagonalFromSides.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/pythagore/calculateDiagonalFromSides.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,QAAQ,GAAG,WAAW,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAqJF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAkB5D,CAAC"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
4
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
5
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
6
|
+
import { round } from "../../../../math/utils/round.js";
|
|
7
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
8
|
+
import { tryToAddWrongProp } from "../../../../exercises/exercise.js";
|
|
9
|
+
import { sqrt } from "../../../../tree/nodes/functions/sqrtNode.js";
|
|
10
|
+
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
11
|
+
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
12
|
+
import { numberVEA } from "../../../../exercises/vea/numberVEA.js";
|
|
13
|
+
import { numberParser } from "../../../../tree/parsers/numberParser.js";
|
|
14
|
+
const getPropositions = (n, { answer, side, side2, shape }) => {
|
|
15
|
+
const propositions = [];
|
|
16
|
+
addValidProp(propositions, answer);
|
|
17
|
+
if (shape === "square") {
|
|
18
|
+
tryToAddWrongProp(propositions, frac(side, 2).simplify().toTex());
|
|
19
|
+
tryToAddWrongProp(propositions, multiply(side, 2).simplify().toTex());
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
tryToAddWrongProp(propositions, frac(multiply(side, side2), 2).simplify().toTex());
|
|
23
|
+
tryToAddWrongProp(propositions, multiply(side, side2).simplify().toTex());
|
|
24
|
+
}
|
|
25
|
+
while (propositions.length < n) {
|
|
26
|
+
tryToAddWrongProp(propositions, sqrt(2 * randint(2, 15) ** 2)
|
|
27
|
+
.simplify()
|
|
28
|
+
.toTex());
|
|
29
|
+
}
|
|
30
|
+
return shuffleProps(propositions, n);
|
|
31
|
+
};
|
|
32
|
+
const getAnswerNode = (identifiers) => {
|
|
33
|
+
const { shape, side, side2 } = identifiers;
|
|
34
|
+
if (shape === "square") {
|
|
35
|
+
return sqrt(2 * side ** 2).simplify();
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
return sqrt(side ** 2 + side2 ** 2).simplify();
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const getAnswer = (identifiers) => {
|
|
42
|
+
return getAnswerNode(identifiers).toTex();
|
|
43
|
+
};
|
|
44
|
+
const getInstruction = ({ shape, side, side2, }) => {
|
|
45
|
+
if (shape === "square") {
|
|
46
|
+
return `On considère un carré de côté $${side}$.
|
|
47
|
+
|
|
48
|
+
Calculer la longueur de la diagonale de ce carré.`;
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
return `On considère un rectangle de largeur $${side}$ et de longueur $${side2}$.
|
|
52
|
+
|
|
53
|
+
Calculer la longueur de la diagonale de ce rectangle.`;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
const getHint = ({ shape }) => {
|
|
57
|
+
return `Utilise le théorème de Pythagore : dans un triangle $ABC$ rectangle en $A$,
|
|
58
|
+
|
|
59
|
+
$$
|
|
60
|
+
BC^2 = AB^2 + AC^2
|
|
61
|
+
$$
|
|
62
|
+
`;
|
|
63
|
+
};
|
|
64
|
+
const getCorrection = ({ shape, side, side2 }) => {
|
|
65
|
+
const answer = getAnswer({ shape, side, side2 });
|
|
66
|
+
if (shape === "square") {
|
|
67
|
+
return `Dans un carré, tous les côtés sont égaux, et deux côtés consécutifs forment un angle droit.
|
|
68
|
+
|
|
69
|
+
Le triangle formé par une diagonale du carré et deux côtés consécutifs est donc un triangle rectangle, dont la diagonale est l'hypoténuse. Les deux autres côtés mesurent $${side}$.
|
|
70
|
+
|
|
71
|
+
D'après le théorème de Pythagore, le carré de l'hypoténuse est donc égal à :
|
|
72
|
+
|
|
73
|
+
$$
|
|
74
|
+
${side}^2 + ${side}^2 = ${2 * side ** 2}
|
|
75
|
+
$$
|
|
76
|
+
|
|
77
|
+
La diagonale du carré a donc une longueur de :
|
|
78
|
+
|
|
79
|
+
$$
|
|
80
|
+
${sqrt(2 * side ** 2).toSimplificationTex()}
|
|
81
|
+
$$`;
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
return `Dans un rectangle, tous les angles sont des angles droits.
|
|
85
|
+
|
|
86
|
+
Le triangle formé par une diagonale du rectangle et deux côtés consécutifs est donc un triangle rectangle, dont la diagonale est l'hypoténuse. Les deux autres côtés mesurent $${side}$ et $${side2}$.
|
|
87
|
+
|
|
88
|
+
D'après le théorème de Pythagore, le carré de l'hypoténuse est donc égal à :
|
|
89
|
+
|
|
90
|
+
$$
|
|
91
|
+
${side}^2 + ${side2}^2 = ${side ** 2 + side2 ** 2}
|
|
92
|
+
$$
|
|
93
|
+
|
|
94
|
+
La diagonale du rectangle a donc une longueur de :
|
|
95
|
+
|
|
96
|
+
$$
|
|
97
|
+
${sqrt(side ** 2 + side2 ** 2).toSimplificationTex()}
|
|
98
|
+
$$`;
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
const getKeys = () => [];
|
|
102
|
+
const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
103
|
+
try {
|
|
104
|
+
const nbParse = numberParser(ans, 2);
|
|
105
|
+
if (nbParse !== false) {
|
|
106
|
+
const ev = round(getAnswerNode(identifiers).evaluate(), 2).frenchify();
|
|
107
|
+
return numberVEA(ans, ev, 2);
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
const ansNode = parseAlgebraic(ans);
|
|
111
|
+
const answerNode = parseAlgebraic(answer);
|
|
112
|
+
return ansNode.simplify().equals(answerNode.simplify());
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
catch (err) {
|
|
116
|
+
return handleVEAError(err);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
const getCalculateDiagonalFromSidesQuestion = () => {
|
|
120
|
+
const caseType = coinFlip() ? "square" : "rectangle";
|
|
121
|
+
let side = randint(2, 15);
|
|
122
|
+
let side2 = undefined;
|
|
123
|
+
if (caseType === "rectangle") {
|
|
124
|
+
side2 = randint(2, 15);
|
|
125
|
+
}
|
|
126
|
+
return getQuestionFromIdentifiers({ shape: caseType, side, side2 });
|
|
127
|
+
};
|
|
128
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
129
|
+
return {
|
|
130
|
+
answer: getAnswer(identifiers),
|
|
131
|
+
instruction: getInstruction(identifiers),
|
|
132
|
+
keys: getKeys(identifiers),
|
|
133
|
+
answerFormat: "tex",
|
|
134
|
+
identifiers,
|
|
135
|
+
hint: getHint(identifiers),
|
|
136
|
+
correction: getCorrection(identifiers),
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
export const calculateDiagonalFromSides = {
|
|
140
|
+
id: "calculateDiagonalFromSides",
|
|
141
|
+
label: "Calculer la longueur de la diagonale d'un carré ou d'un rectangle à partir de la longueur de ses côtés",
|
|
142
|
+
isSingleStep: true,
|
|
143
|
+
generator: (nb, opts) => getDistinctQuestions(() => getCalculateDiagonalFromSidesQuestion(opts), nb),
|
|
144
|
+
qcmTimer: 60,
|
|
145
|
+
freeTimer: 60,
|
|
146
|
+
getPropositions,
|
|
147
|
+
isAnswerValid,
|
|
148
|
+
subject: "Mathématiques",
|
|
149
|
+
getInstruction,
|
|
150
|
+
getHint,
|
|
151
|
+
getCorrection,
|
|
152
|
+
getAnswer,
|
|
153
|
+
getQuestionFromIdentifiers,
|
|
154
|
+
hasHintAndCorrection: true,
|
|
155
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/pythagore/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/pythagore/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC"}
|
|
@@ -93,7 +93,7 @@ $$
|
|
|
93
93
|
const getGGBOptions = (identifiers) => {
|
|
94
94
|
const { sideAsked, triangleIdentifiers } = identifiers;
|
|
95
95
|
const triangle = RightTriangleConstructor.fromIdentifiers(triangleIdentifiers);
|
|
96
|
-
triangle.showSidesLength([sideAsked]);
|
|
96
|
+
// triangle.showSidesLength([sideAsked]);
|
|
97
97
|
const commands = [...triangle.commands];
|
|
98
98
|
const ggb = new GeogebraConstructor({
|
|
99
99
|
commands,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triangleHeight.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/pythagore/triangleHeight.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAyFF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAkBhD,CAAC"}
|