math-exercises 2.1.3 → 2.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/exercise.d.ts +1 -1
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.js +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.d.ts +9 -0
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.js +73 -0
- package/lib/exercises/pc/chemicalElements/index.d.ts +1 -0
- package/lib/exercises/pc/chemicalElements/index.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/index.js +1 -0
- package/lib/exercises/pc/chemicalReactions/calculateCombustionEnergy.d.ts +8 -0
- package/lib/exercises/pc/chemicalReactions/calculateCombustionEnergy.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalReactions/calculateCombustionEnergy.js +64 -0
- package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.d.ts +8 -0
- package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.js +52 -0
- package/lib/exercises/pc/chemicalReactions/identifyLimitingReagent.d.ts +8 -0
- package/lib/exercises/pc/chemicalReactions/identifyLimitingReagent.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalReactions/identifyLimitingReagent.js +61 -0
- package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.d.ts +8 -0
- package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.js +68 -0
- package/lib/exercises/pc/chemicalReactions/index.d.ts +5 -0
- package/lib/exercises/pc/chemicalReactions/index.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalReactions/index.js +20 -0
- package/lib/exercises/pc/electricity/electricChargeFromIntensity.d.ts +8 -0
- package/lib/exercises/pc/electricity/electricChargeFromIntensity.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/electricChargeFromIntensity.js +48 -0
- package/lib/exercises/pc/electricity/electricEnergyFromPower.d.ts +8 -0
- package/lib/exercises/pc/electricity/electricEnergyFromPower.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/electricEnergyFromPower.js +70 -0
- package/lib/exercises/pc/electricity/index.d.ts +3 -0
- package/lib/exercises/pc/electricity/index.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/index.js +18 -0
- package/lib/exercises/pc/fluids/index.d.ts +2 -0
- package/lib/exercises/pc/fluids/index.d.ts.map +1 -0
- package/lib/exercises/pc/fluids/index.js +17 -0
- package/lib/exercises/pc/fluids/mariotte.d.ts +11 -0
- package/lib/exercises/pc/fluids/mariotte.d.ts.map +1 -0
- package/lib/exercises/pc/fluids/mariotte.js +73 -0
- package/lib/exercises/pc/forces/forceWork.d.ts +9 -0
- package/lib/exercises/pc/forces/forceWork.d.ts.map +1 -0
- package/lib/exercises/pc/forces/forceWork.js +51 -0
- package/lib/exercises/pc/forces/gravitationalAttractionValue.js +1 -1
- package/lib/exercises/pc/forces/index.d.ts +2 -0
- package/lib/exercises/pc/forces/index.d.ts.map +1 -1
- package/lib/exercises/pc/forces/index.js +2 -0
- package/lib/exercises/pc/forces/pressingForce.d.ts +19 -0
- package/lib/exercises/pc/forces/pressingForce.d.ts.map +1 -0
- package/lib/exercises/pc/forces/pressingForce.js +97 -0
- package/lib/exercises/pc/index.d.ts +8 -3
- package/lib/exercises/pc/index.d.ts.map +1 -1
- package/lib/exercises/pc/index.js +12 -4
- package/lib/exercises/pc/kineticEnergy.js +1 -1
- package/lib/exercises/pc/mecanicalWaves/elongationReading.d.ts +8 -0
- package/lib/exercises/pc/mecanicalWaves/elongationReading.d.ts.map +1 -0
- package/lib/exercises/pc/mecanicalWaves/elongationReading.js +71 -0
- package/lib/exercises/pc/mecanicalWaves/index.d.ts +2 -0
- package/lib/exercises/pc/mecanicalWaves/index.d.ts.map +1 -0
- package/lib/exercises/pc/mecanicalWaves/index.js +17 -0
- package/lib/exercises/pc/mole/concentrationReading.d.ts +5 -0
- package/lib/exercises/pc/mole/concentrationReading.d.ts.map +1 -0
- package/lib/exercises/pc/mole/concentrationReading.js +57 -0
- package/lib/exercises/pc/mole/index.d.ts +4 -0
- package/lib/exercises/pc/mole/index.d.ts.map +1 -0
- package/lib/exercises/pc/mole/index.js +20 -0
- package/lib/exercises/pc/mole/molFromMass.d.ts +8 -0
- package/lib/exercises/pc/mole/molFromMass.d.ts.map +1 -0
- package/lib/exercises/pc/mole/molFromMass.js +45 -0
- package/lib/exercises/pc/mole/molFromMolarMass.d.ts +8 -0
- package/lib/exercises/pc/mole/molFromMolarMass.d.ts.map +1 -0
- package/lib/exercises/pc/mole/molFromMolarMass.js +45 -0
- package/lib/exercises/pc/mole/molarMass.d.ts +5 -0
- package/lib/exercises/pc/mole/molarMass.d.ts.map +1 -0
- package/lib/exercises/pc/mole/molarMass.js +48 -0
- package/lib/exercises/pc/waves/index.d.ts +1 -0
- package/lib/exercises/pc/waves/index.d.ts.map +1 -1
- package/lib/exercises/pc/waves/index.js +1 -0
- package/lib/exercises/pc/waves/periodicWaveCelerity.d.ts +9 -0
- package/lib/exercises/pc/waves/periodicWaveCelerity.d.ts.map +1 -0
- package/lib/exercises/pc/waves/periodicWaveCelerity.js +74 -0
- package/lib/index.d.ts +58 -21
- package/lib/index.d.ts.map +1 -1
- package/lib/math/trigonometry/remarkableValue.d.ts.map +1 -1
- package/lib/math/trigonometry/remarkableValue.js +1 -0
- package/lib/math/trigonometry/remarkableValues.d.ts +1 -0
- package/lib/math/trigonometry/remarkableValues.d.ts.map +1 -1
- package/lib/math/trigonometry/remarkableValues.js +22 -1
- package/lib/math/utils/latex/unfrenchify.d.ts +2 -0
- package/lib/math/utils/latex/unfrenchify.d.ts.map +1 -0
- package/lib/math/utils/latex/unfrenchify.js +7 -0
- package/lib/math/utils/random/randfloat.d.ts +1 -1
- package/lib/math/utils/random/randfloat.d.ts.map +1 -1
- package/lib/math/utils/random/randfloat.js +8 -1
- package/lib/pc/measure/measure.d.ts +8 -0
- package/lib/pc/measure/measure.d.ts.map +1 -1
- package/lib/pc/measure/measure.js +15 -6
- package/lib/pc/molecularChemistry/molecule.js +4 -4
- package/lib/server.d.ts.map +1 -1
- package/lib/server.js +10 -1
- package/lib/tree/nodes/equations/equalNode.js +1 -1
- package/lib/tree/nodes/functions/cosNode.d.ts +1 -1
- package/lib/tree/nodes/functions/cosNode.js +3 -3
- package/lib/tree/nodes/functions/sinNode.js +1 -1
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +6 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/electricity/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./electricChargeFromIntensity"), exports);
|
|
18
|
+
__exportStar(require("./electricEnergyFromPower"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/fluids/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./mariotte"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
p1: number;
|
|
4
|
+
v1: number;
|
|
5
|
+
p2: number | undefined;
|
|
6
|
+
v2: number | undefined;
|
|
7
|
+
isAskingPressure: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const mariotte: Exercise<Identifiers>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=mariotte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mariotte.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/fluids/mariotte.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IACvB,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAsEF,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,WAAW,CAa1C,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mariotte = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
7
|
+
const round_1 = require("../../../math/utils/round");
|
|
8
|
+
const measure_1 = require("../../../pc/measure/measure");
|
|
9
|
+
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
10
|
+
const doWhile_1 = require("../../../utils/doWhile");
|
|
11
|
+
const getMariotteQuestion = () => {
|
|
12
|
+
const isAskingPressure = (0, coinFlip_1.coinFlip)();
|
|
13
|
+
const v1 = (0, randfloat_1.randfloat)(2, 10, 1);
|
|
14
|
+
const p1 = new measure_1.Measure((0, randfloat_1.randfloat)(1, 10, 1), 5);
|
|
15
|
+
const v2 = isAskingPressure ? (0, randfloat_1.randfloat)(2, 10, 1, [v1]) : undefined;
|
|
16
|
+
const p2 = isAskingPressure
|
|
17
|
+
? undefined
|
|
18
|
+
: (0, doWhile_1.doWhile)(() => new measure_1.Measure((0, randfloat_1.randfloat)(1, 10, 1), 5), (m) => m.equals(p1));
|
|
19
|
+
const answer = isAskingPressure
|
|
20
|
+
? p1
|
|
21
|
+
.times(v1 / v2)
|
|
22
|
+
.toSignificant(1)
|
|
23
|
+
.toTex({ scientific: 1 })
|
|
24
|
+
: (0, round_1.roundSignificant)(p1.divide(p2).times(v1).evaluate(), 1);
|
|
25
|
+
const question = {
|
|
26
|
+
answer,
|
|
27
|
+
instruction: `Un volume d'air $V_1 = ${(0, round_1.roundSignificant)(v1, 1)}\\ \\text{L}$ contenu dans une bouteille hermétique est à la pression $P_1 = ${p1.toTex()}\\ \\text{Pa}$. En considérant que la température reste constante, calculer ${isAskingPressure ? "la pression $P_2$" : "le volume $V_2$"} de cet air lorsque ${isAskingPressure
|
|
28
|
+
? `le volume est $V_2 = ${(0, round_1.roundSignificant)(v2, 1)}\\ \\text{L}$`
|
|
29
|
+
: `la pression est $P_2 = ${p2?.toTex()}\\ \\text{Pa}$`}.`,
|
|
30
|
+
keys: ["timesTenPower"],
|
|
31
|
+
answerFormat: "tex",
|
|
32
|
+
identifiers: {
|
|
33
|
+
v1,
|
|
34
|
+
p1: p1.significantPart,
|
|
35
|
+
v2,
|
|
36
|
+
p2: p2?.significantPart,
|
|
37
|
+
isAskingPressure,
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
return question;
|
|
41
|
+
};
|
|
42
|
+
const getPropositions = (n, { answer, isAskingPressure }) => {
|
|
43
|
+
const propositions = [];
|
|
44
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
45
|
+
while (propositions.length < n) {
|
|
46
|
+
if (isAskingPressure) {
|
|
47
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, new measure_1.Measure((0, randfloat_1.randfloat)(1, 10, 1), 5)
|
|
48
|
+
.toSignificant(1)
|
|
49
|
+
.toTex({ scientific: 1 }));
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.roundSignificant)((0, randfloat_1.randfloat)(0, 10, 1), 1));
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
56
|
+
};
|
|
57
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
58
|
+
return ans === answer;
|
|
59
|
+
};
|
|
60
|
+
exports.mariotte = {
|
|
61
|
+
id: "mariotte",
|
|
62
|
+
connector: "=",
|
|
63
|
+
label: "Utiliser la loi de Mariotte",
|
|
64
|
+
levels: ["1reSpé"],
|
|
65
|
+
isSingleStep: true,
|
|
66
|
+
sections: ["Fluides"],
|
|
67
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getMariotteQuestion, nb),
|
|
68
|
+
qcmTimer: 60,
|
|
69
|
+
freeTimer: 60,
|
|
70
|
+
getPropositions,
|
|
71
|
+
isAnswerValid,
|
|
72
|
+
subject: "Physique",
|
|
73
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forceWork.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/forces/forceWork.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAoDF,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,WAAW,CAa3C,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.forceWork = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const remarkableValues_1 = require("../../../math/trigonometry/remarkableValues");
|
|
7
|
+
const randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
8
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
9
|
+
const round_1 = require("../../../math/utils/round");
|
|
10
|
+
const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
|
|
11
|
+
const random_1 = require("../../../utils/random");
|
|
12
|
+
const getForceWorkQuestion = () => {
|
|
13
|
+
const length = (0, randint_1.randint)(1, 10);
|
|
14
|
+
const forceValue = (0, randint_1.randint)(1, 10);
|
|
15
|
+
const angle = (0, random_1.random)(remarkableValues_1.remarkableTrigoValues.filter((v) => v.degree > 0 && v.degree < 180));
|
|
16
|
+
const answer = new multiplyNode_1.MultiplyNode(length.toTree(), new multiplyNode_1.MultiplyNode(angle.cos, forceValue.toTree())).evaluate({});
|
|
17
|
+
const rounded = (0, round_1.roundSignificant)(answer, 1);
|
|
18
|
+
const question = {
|
|
19
|
+
answer: rounded + "J",
|
|
20
|
+
instruction: `Soit une force $\\overrightarrow F$ constante dont le point d'application se déplace d'une position $A$ à une position $B$ telle que $F = ${(0, round_1.roundSignificant)(forceValue, 1)} \\text{N}$, $AB = ${(0, round_1.roundSignificant)(length, 1)} \\text{m}$ et $\\widehat{\\left(\\overrightarrow F ; \\overrightarrow{AB}\\right)} = ${angle.degree}^°$. Calculer le travail de la force $\\overrightarrow F$ lors du déplacement de $A$ vers $B$.`,
|
|
21
|
+
keys: ["J", "timesTenPower"],
|
|
22
|
+
answerFormat: "tex",
|
|
23
|
+
identifiers: { length, forceValue, angleDegree: angle.degree },
|
|
24
|
+
};
|
|
25
|
+
return question;
|
|
26
|
+
};
|
|
27
|
+
const getPropositions = (n, { answer, angleDegree, forceValue, length }) => {
|
|
28
|
+
const propositions = [];
|
|
29
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
30
|
+
while (propositions.length < n) {
|
|
31
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.roundSignificant)((0, randfloat_1.randfloat)(-30, 30, 1), 1) + "J");
|
|
32
|
+
}
|
|
33
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
34
|
+
};
|
|
35
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
36
|
+
return [answer, answer.replace("J", "")].includes(ans);
|
|
37
|
+
};
|
|
38
|
+
exports.forceWork = {
|
|
39
|
+
id: "forceWork",
|
|
40
|
+
connector: "=",
|
|
41
|
+
label: "Calculer le travail d'une force",
|
|
42
|
+
levels: ["1reSpé"],
|
|
43
|
+
isSingleStep: true,
|
|
44
|
+
sections: ["Forces"],
|
|
45
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getForceWorkQuestion, nb),
|
|
46
|
+
qcmTimer: 60,
|
|
47
|
+
freeTimer: 60,
|
|
48
|
+
getPropositions,
|
|
49
|
+
isAnswerValid,
|
|
50
|
+
subject: "Physique",
|
|
51
|
+
};
|
|
@@ -31,7 +31,7 @@ Données :
|
|
|
31
31
|
+ Masse de la Terre : $m_T = ${earth_1.earthMass.measure.toTex({ scientific: 2 })}\\ ${earth_1.earthMass.unit}$
|
|
32
32
|
|
|
33
33
|
+ $G = ${gravity_1.earthG.measure.toTex({ scientific: 2 })}\\ ${gravity_1.earthG.unit}$`,
|
|
34
|
-
keys: ["N"],
|
|
34
|
+
keys: ["N", "timesTenPower"],
|
|
35
35
|
answerFormat: "tex",
|
|
36
36
|
identifiers: { mass },
|
|
37
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/forces/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/forces/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
|
|
@@ -15,3 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./gravitationalAttractionValue"), exports);
|
|
18
|
+
__exportStar(require("./forceWork"), exports);
|
|
19
|
+
__exportStar(require("./pressingForce"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
varAsked: string;
|
|
4
|
+
F: {
|
|
5
|
+
significantPart: number;
|
|
6
|
+
exponent: number;
|
|
7
|
+
};
|
|
8
|
+
P: {
|
|
9
|
+
significantPart: number;
|
|
10
|
+
exponent: number;
|
|
11
|
+
};
|
|
12
|
+
S: {
|
|
13
|
+
significantPart: number;
|
|
14
|
+
exponent: number;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare const pressingForce: Exercise<Identifiers>;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=pressingForce.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pressingForce.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/forces/pressingForce.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,CAAC,EAAE;QAAE,eAAe,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IACjD,CAAC,EAAE;QAAE,eAAe,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IACjD,CAAC,EAAE;QAAE,eAAe,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;CAClD,CAAC;AAuGF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAa/C,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pressingForce = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
7
|
+
const measure_1 = require("../../../pc/measure/measure");
|
|
8
|
+
const random_1 = require("../../../utils/random");
|
|
9
|
+
const getPressingForceQuestion = () => {
|
|
10
|
+
let F;
|
|
11
|
+
let S;
|
|
12
|
+
let P;
|
|
13
|
+
const varAsked = (0, random_1.random)(["F", "S", "P"]);
|
|
14
|
+
let FInstruction = "F";
|
|
15
|
+
let PInstruction = "P";
|
|
16
|
+
let SInstruction = "S";
|
|
17
|
+
let answer = "";
|
|
18
|
+
let unit = "";
|
|
19
|
+
switch (varAsked) {
|
|
20
|
+
case "F":
|
|
21
|
+
P = new measure_1.Measure((0, randfloat_1.randfloat)(1, 8, 1), 5);
|
|
22
|
+
PInstruction = `P=${P.toTex({ scientific: 1 })}\\ \\text{Pa}`;
|
|
23
|
+
S = new measure_1.Measure((0, randfloat_1.randfloat)(1, 8, 1), 2);
|
|
24
|
+
SInstruction = `S=${S.toTex({ scientific: 1 })}\\ \\text{m}^2`;
|
|
25
|
+
F = P.times(S);
|
|
26
|
+
answer = F.toSignificant(1).toTex({ scientific: 1 });
|
|
27
|
+
unit = "$\\text{N}$";
|
|
28
|
+
break;
|
|
29
|
+
case "S":
|
|
30
|
+
P = new measure_1.Measure((0, randfloat_1.randfloat)(1, 8, 1), 5);
|
|
31
|
+
PInstruction = `P=${P.toTex({ scientific: 1 })}\\ \\text{Pa}`;
|
|
32
|
+
F = new measure_1.Measure((0, randfloat_1.randfloat)(1, 8, 1), 7);
|
|
33
|
+
FInstruction = `F=${F.toTex({ scientific: 1 })}\\ \\text{N}`;
|
|
34
|
+
S = F.divide(P);
|
|
35
|
+
answer = S.toSignificant(1).toTex({ scientific: 1 });
|
|
36
|
+
unit = "$\\text{m}^2$";
|
|
37
|
+
break;
|
|
38
|
+
case "P":
|
|
39
|
+
default:
|
|
40
|
+
S = new measure_1.Measure((0, randfloat_1.randfloat)(1, 8, 1), 2);
|
|
41
|
+
SInstruction = `S=${S.toTex({ scientific: 1 })}\\ \\text{m}^2`;
|
|
42
|
+
F = new measure_1.Measure((0, randfloat_1.randfloat)(1, 8, 1), 7);
|
|
43
|
+
FInstruction = `F=${F.toTex({ scientific: 1 })}\\ \\text{N}`;
|
|
44
|
+
P = F.divide(S);
|
|
45
|
+
answer = P.toSignificant(1).toTex({ scientific: 1 });
|
|
46
|
+
unit = "$\\text{Pa}$";
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
const question = {
|
|
50
|
+
answer,
|
|
51
|
+
instruction: `Un fluide de pression $${PInstruction}$ exerce une force de valeur $${FInstruction}$ sur une paroi de surface $${SInstruction}$. Calculer $${varAsked}$ (en ${unit}).`,
|
|
52
|
+
keys: ["timesTenPower"],
|
|
53
|
+
answerFormat: "tex",
|
|
54
|
+
identifiers: {
|
|
55
|
+
F: F.toIdentifiers(),
|
|
56
|
+
P: P.toIdentifiers(),
|
|
57
|
+
S: S.toIdentifiers(),
|
|
58
|
+
varAsked,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
return question;
|
|
62
|
+
};
|
|
63
|
+
const getPropositions = (n, { answer, varAsked }) => {
|
|
64
|
+
const propositions = [];
|
|
65
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
66
|
+
while (propositions.length < n) {
|
|
67
|
+
switch (varAsked) {
|
|
68
|
+
case "F":
|
|
69
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, new measure_1.Measure((0, randfloat_1.randfloat)(1, 10, 1), 7).toTex({ scientific: 1 }));
|
|
70
|
+
break;
|
|
71
|
+
case "S":
|
|
72
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, new measure_1.Measure((0, randfloat_1.randfloat)(1, 10, 1), 2).toTex({ scientific: 1 }));
|
|
73
|
+
break;
|
|
74
|
+
case "P":
|
|
75
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, new measure_1.Measure((0, randfloat_1.randfloat)(1, 10, 1), 5).toTex({ scientific: 1 }));
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
80
|
+
};
|
|
81
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
82
|
+
return ans === answer;
|
|
83
|
+
};
|
|
84
|
+
exports.pressingForce = {
|
|
85
|
+
id: "pressingForce",
|
|
86
|
+
connector: "=",
|
|
87
|
+
label: "Calculer la force pressante",
|
|
88
|
+
levels: ["1reSpé"],
|
|
89
|
+
isSingleStep: true,
|
|
90
|
+
sections: ["Forces"],
|
|
91
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getPressingForceQuestion, nb),
|
|
92
|
+
qcmTimer: 60,
|
|
93
|
+
freeTimer: 60,
|
|
94
|
+
getPropositions,
|
|
95
|
+
isAnswerValid,
|
|
96
|
+
subject: "Physique",
|
|
97
|
+
};
|
|
@@ -16,6 +16,11 @@ export * from "./weight";
|
|
|
16
16
|
export * from "./forces";
|
|
17
17
|
export * from "./waves";
|
|
18
18
|
export * from "./chemicalElements";
|
|
19
|
+
export * from "./chemicalReactions";
|
|
20
|
+
export * from "./mole";
|
|
21
|
+
export * from "./mecanicalWaves";
|
|
22
|
+
export * from "./fluids";
|
|
23
|
+
export * from "./electricity";
|
|
19
24
|
/**exos pris des maths */
|
|
20
25
|
export * from "../math/percent/findProportion";
|
|
21
26
|
export * from "../math/calcul/proportionality/proportionalityTable";
|
|
@@ -40,9 +45,9 @@ export * from "../math/equaDiff/equaDiffGeneralForme";
|
|
|
40
45
|
export * from "../math/equaDiff/equaDiffGeneralFormeWithIC";
|
|
41
46
|
export * from "../math/derivation/derivativeNumberReading";
|
|
42
47
|
export * from "../math/derivation/derivative/usualderivative";
|
|
43
|
-
export
|
|
44
|
-
export
|
|
45
|
-
export
|
|
48
|
+
export { thirdDegreeDerivative } from "../math/derivation/derivative/thirdDegreeDerivative";
|
|
49
|
+
export { firstDegreeDerivative } from "../math/derivation/derivative/firstDegreeDerivative";
|
|
50
|
+
export { secondDegreeDerivative } from "../math/derivation/derivative/secondDegreeDerivative";
|
|
46
51
|
export * from "../math/trigonometry/trigonometrySideCalcul";
|
|
47
52
|
export * from "../math/trigonometry/trigonometryAngleCalcul";
|
|
48
53
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,MAAM,CAAC;AACrB,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,MAAM,CAAC;AACrB,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAE9B,yBAAyB;AACzB,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qDAAqD,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,cAAc,oCAAoC,CAAC;AACnD,cAAc,6CAA6C,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAC;AAC1F,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,cAAc,uDAAuD,CAAC;AACtE,cAAc,uDAAuD,CAAC;AACtE,cAAc,uDAAuD,CAAC;AACtE,cAAc,uDAAuD,CAAC;AACtE,cAAc,iDAAiD,CAAC;AAChE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,mDAAmD,CAAC;AAClE,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sCAAsC,CAAC;AACrD,cAAc,kDAAkD,CAAC;AACjE,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,+CAA+C,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAC5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAC9F,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8CAA8C,CAAC"}
|
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.log10PowerEquation = exports.log10SumSimplifying = exports.log10PowerSimplifying = exports.powersOfTenDivision = void 0;
|
|
17
|
+
exports.secondDegreeDerivative = exports.firstDegreeDerivative = exports.thirdDegreeDerivative = exports.log10PowerEquation = exports.log10SumSimplifying = exports.log10PowerSimplifying = exports.powersOfTenDivision = void 0;
|
|
18
18
|
__exportStar(require("./chemicalEquations"), exports);
|
|
19
19
|
__exportStar(require("./chemicalReactionsProduct"), exports);
|
|
20
20
|
__exportStar(require("./delution"), exports);
|
|
@@ -33,6 +33,11 @@ __exportStar(require("./weight"), exports);
|
|
|
33
33
|
__exportStar(require("./forces"), exports);
|
|
34
34
|
__exportStar(require("./waves"), exports);
|
|
35
35
|
__exportStar(require("./chemicalElements"), exports);
|
|
36
|
+
__exportStar(require("./chemicalReactions"), exports);
|
|
37
|
+
__exportStar(require("./mole"), exports);
|
|
38
|
+
__exportStar(require("./mecanicalWaves"), exports);
|
|
39
|
+
__exportStar(require("./fluids"), exports);
|
|
40
|
+
__exportStar(require("./electricity"), exports);
|
|
36
41
|
/**exos pris des maths */
|
|
37
42
|
__exportStar(require("../math/percent/findProportion"), exports);
|
|
38
43
|
__exportStar(require("../math/calcul/proportionality/proportionalityTable"), exports);
|
|
@@ -61,8 +66,11 @@ __exportStar(require("../math/equaDiff/equaDiffGeneralForme"), exports);
|
|
|
61
66
|
__exportStar(require("../math/equaDiff/equaDiffGeneralFormeWithIC"), exports);
|
|
62
67
|
__exportStar(require("../math/derivation/derivativeNumberReading"), exports);
|
|
63
68
|
__exportStar(require("../math/derivation/derivative/usualderivative"), exports);
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
69
|
+
var thirdDegreeDerivative_1 = require("../math/derivation/derivative/thirdDegreeDerivative");
|
|
70
|
+
Object.defineProperty(exports, "thirdDegreeDerivative", { enumerable: true, get: function () { return thirdDegreeDerivative_1.thirdDegreeDerivative; } });
|
|
71
|
+
var firstDegreeDerivative_1 = require("../math/derivation/derivative/firstDegreeDerivative");
|
|
72
|
+
Object.defineProperty(exports, "firstDegreeDerivative", { enumerable: true, get: function () { return firstDegreeDerivative_1.firstDegreeDerivative; } });
|
|
73
|
+
var secondDegreeDerivative_1 = require("../math/derivation/derivative/secondDegreeDerivative");
|
|
74
|
+
Object.defineProperty(exports, "secondDegreeDerivative", { enumerable: true, get: function () { return secondDegreeDerivative_1.secondDegreeDerivative; } });
|
|
67
75
|
__exportStar(require("../math/trigonometry/trigonometrySideCalcul"), exports);
|
|
68
76
|
__exportStar(require("../math/trigonometry/trigonometryAngleCalcul"), exports);
|
|
@@ -39,7 +39,7 @@ exports.kineticEnergy = {
|
|
|
39
39
|
id: "kineticEnergy",
|
|
40
40
|
connector: "=",
|
|
41
41
|
label: "Calculer l'énergie cinétique",
|
|
42
|
-
levels: ["4ème", "3ème", "2nde"],
|
|
42
|
+
levels: ["4ème", "3ème", "2nde", "1reSpé"],
|
|
43
43
|
sections: ["Mécanique"],
|
|
44
44
|
subject: "Physique",
|
|
45
45
|
isSingleStep: true,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elongationReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mecanicalWaves/elongationReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA4FF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAanD,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.elongationReading = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const colors_1 = require("../../../geogebra/colors");
|
|
7
|
+
const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
|
|
8
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
9
|
+
const equalNode_1 = require("../../../tree/nodes/equations/equalNode");
|
|
10
|
+
const cosNode_1 = require("../../../tree/nodes/functions/cosNode");
|
|
11
|
+
const piNode_1 = require("../../../tree/nodes/numbers/piNode");
|
|
12
|
+
const fractionNode_1 = require("../../../tree/nodes/operators/fractionNode");
|
|
13
|
+
const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
|
|
14
|
+
const variableNode_1 = require("../../../tree/nodes/variables/variableNode");
|
|
15
|
+
const getElongationReadingQuestion = () => {
|
|
16
|
+
const amplitude = (0, randint_1.randint)(2, 7);
|
|
17
|
+
const period = (0, randint_1.randint)(1, 8);
|
|
18
|
+
const commands = [
|
|
19
|
+
`f(x) = If(x>=0, ${amplitude}*cos(x* (2*PI)/${period}))`,
|
|
20
|
+
`SetColor(f, "${(0, colors_1.randomColor)()}")`,
|
|
21
|
+
];
|
|
22
|
+
const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
|
|
23
|
+
isGridSimple: true,
|
|
24
|
+
axisLabels: ["$\\tiny \\text{Temps (s)}$", "$\\tiny \\text{y (cm)}$"],
|
|
25
|
+
});
|
|
26
|
+
const frac = new fractionNode_1.FractionNode(new multiplyNode_1.MultiplyNode((2).toTree(), piNode_1.PiNode), period.toTree()).simplify();
|
|
27
|
+
const node = new multiplyNode_1.MultiplyNode(amplitude.toTree(), new cosNode_1.CosNode(new multiplyNode_1.MultiplyNode(frac, new variableNode_1.VariableNode("t"))));
|
|
28
|
+
const question = {
|
|
29
|
+
answer: `y\\left(t\\right)=${node.toTex()}`,
|
|
30
|
+
instruction: `L'élongation d'un point affecté par le passage d'une onde est représentée ci-dessous. L'équation de la fonction correspondante est de la forme $y(t) = A\\cos\\left(\\frac{2\\pi}{T}t\\right)$. Quelle est l'expression numérique de la fonction $y(t)$ ?`,
|
|
31
|
+
keys: ["y", "t", "pi", "cos", "equal"],
|
|
32
|
+
answerFormat: "tex",
|
|
33
|
+
identifiers: { amplitude, period },
|
|
34
|
+
commands: ggb.commands,
|
|
35
|
+
options: ggb.getOptions(),
|
|
36
|
+
coords: [-1, 20, -10, 10],
|
|
37
|
+
};
|
|
38
|
+
return question;
|
|
39
|
+
};
|
|
40
|
+
const getPropositions = (n, { answer, amplitude, period }) => {
|
|
41
|
+
const propositions = [];
|
|
42
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
43
|
+
const frac = new fractionNode_1.FractionNode(new multiplyNode_1.MultiplyNode((2).toTree(), piNode_1.PiNode), amplitude.toTree()).simplify();
|
|
44
|
+
const node = new multiplyNode_1.MultiplyNode(period.toTree(), new cosNode_1.CosNode(new multiplyNode_1.MultiplyNode(frac, new variableNode_1.VariableNode("t"))));
|
|
45
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, node.toTex());
|
|
46
|
+
while (propositions.length < n) {
|
|
47
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, new multiplyNode_1.MultiplyNode((0, randint_1.randint)(1, 10).toTree(), new cosNode_1.CosNode(new multiplyNode_1.MultiplyNode(new fractionNode_1.FractionNode(new multiplyNode_1.MultiplyNode((2).toTree(), piNode_1.PiNode), (0, randint_1.randint)(1, 10).toTree()), new variableNode_1.VariableNode("t")))).toTex());
|
|
48
|
+
}
|
|
49
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
50
|
+
};
|
|
51
|
+
const isAnswerValid = (ans, { answer, amplitude, period }) => {
|
|
52
|
+
const frac = new fractionNode_1.FractionNode(new multiplyNode_1.MultiplyNode((2).toTree(), piNode_1.PiNode), period.toTree()).simplify();
|
|
53
|
+
const node = new multiplyNode_1.MultiplyNode(amplitude.toTree(), new cosNode_1.CosNode(new multiplyNode_1.MultiplyNode(frac, new variableNode_1.VariableNode("t"))));
|
|
54
|
+
const equal = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y\\left(t\\right)"), node);
|
|
55
|
+
const texs = equal.toAllValidTexs({ allowRawRightChildAsSolution: true });
|
|
56
|
+
console.log(texs);
|
|
57
|
+
return texs.includes(ans);
|
|
58
|
+
};
|
|
59
|
+
exports.elongationReading = {
|
|
60
|
+
id: "elongationReading",
|
|
61
|
+
label: "Déterminer l'expression d'une élongation",
|
|
62
|
+
levels: ["1reSpé"],
|
|
63
|
+
isSingleStep: true,
|
|
64
|
+
sections: ["Ondes"],
|
|
65
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getElongationReadingQuestion, nb),
|
|
66
|
+
qcmTimer: 60,
|
|
67
|
+
freeTimer: 60,
|
|
68
|
+
getPropositions,
|
|
69
|
+
isAnswerValid,
|
|
70
|
+
subject: "Physique",
|
|
71
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mecanicalWaves/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./elongationReading"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"concentrationReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mole/concentrationReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG,EAAE,CAAC;AA0CtB,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAatD,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.concentrationReading = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const colors_1 = require("../../../geogebra/colors");
|
|
7
|
+
const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
|
|
8
|
+
const randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
9
|
+
const getConcentrationReadingQuestion = () => {
|
|
10
|
+
const absorbtion = (0, randfloat_1.randfloat)(0.5, 5);
|
|
11
|
+
const concentration = (0, randfloat_1.randfloat)(0.1, 2);
|
|
12
|
+
const commands = [
|
|
13
|
+
`L = Line((0,0), (${concentration}, ${absorbtion}))`,
|
|
14
|
+
`SetFixed(L, true)`,
|
|
15
|
+
`SetColor(L, "${(0, colors_1.randomColor)()}")`,
|
|
16
|
+
];
|
|
17
|
+
const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
|
|
18
|
+
isGridSimple: false,
|
|
19
|
+
isAxesRatioFixed: false,
|
|
20
|
+
axisLabels: ["$\\tiny C (\\text{mol}\\cdot \\text{L}^{-1})$", "$\\tiny A$"],
|
|
21
|
+
});
|
|
22
|
+
const question = {
|
|
23
|
+
answer: concentration + "",
|
|
24
|
+
instruction: `On trace la courbe d'étalonnage ci-dessous. L'absorbance d'ue solution est $A = ${absorbtion}$. Quelle est la concentration en espèce colorée de cette solution ?`,
|
|
25
|
+
keys: [],
|
|
26
|
+
answerFormat: "tex",
|
|
27
|
+
identifiers: {},
|
|
28
|
+
commands: ggb.commands,
|
|
29
|
+
options: ggb.getOptions(),
|
|
30
|
+
coords: [-1, concentration + 2, -1, absorbtion + 2],
|
|
31
|
+
};
|
|
32
|
+
return question;
|
|
33
|
+
};
|
|
34
|
+
const getPropositions = (n, { answer }) => {
|
|
35
|
+
const propositions = [];
|
|
36
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
37
|
+
while (propositions.length < n) {
|
|
38
|
+
throw Error("QCM not implemented");
|
|
39
|
+
}
|
|
40
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
41
|
+
};
|
|
42
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
43
|
+
throw Error("VEA not implemented");
|
|
44
|
+
};
|
|
45
|
+
exports.concentrationReading = {
|
|
46
|
+
id: "concentrationReading",
|
|
47
|
+
label: "",
|
|
48
|
+
levels: ["1reSpé"],
|
|
49
|
+
isSingleStep: true,
|
|
50
|
+
sections: [],
|
|
51
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getConcentrationReadingQuestion, nb),
|
|
52
|
+
qcmTimer: 60,
|
|
53
|
+
freeTimer: 60,
|
|
54
|
+
getPropositions,
|
|
55
|
+
isAnswerValid,
|
|
56
|
+
subject: "Mathématiques",
|
|
57
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mole/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
|