math-exercises 2.1.4 → 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 +5 -0
- package/lib/exercises/pc/index.d.ts.map +1 -1
- package/lib/exercises/pc/index.js +5 -0
- 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 -0
- 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
|
@@ -58,5 +58,5 @@ export interface Exercise<TIdentifiers = {}> {
|
|
|
58
58
|
}
|
|
59
59
|
export type MathLevel = "6ème" | "5ème" | "4ème" | "3ème" | "2nde" | "1reTech" | "1reESM" | "1reSpé" | "TermSpé" | "TermTech" | "MathExp" | "MathComp" | "CAP" | "2ndPro" | "1rePro" | "TermPro";
|
|
60
60
|
export type MathSection = "Aires" | "Arithmétique" | "Calcul littéral" | "Calculs" | "Combinatoire et dénombrement" | "Conversions" | "Dérivation" | "Droites" | "Ensembles et intervalles" | "Équations" | "Équations différentielles" | "Exponentielle" | "Fonction cube" | "Fonction inverse" | "Fonctions" | "Fonctions affines" | "Fonctions de référence" | "Fractions" | "Géométrie cartésienne" | "Géométrie euclidienne" | "Inéquations" | "Intégration" | "Limites" | "Logarithme népérien" | "Logarithme décimal" | "Matrices" | "Nombres complexes" | "Périmètres" | "Pourcentages" | "Primitives" | "Probabilités" | "Produit scalaire" | "Proportionnalité" | "Puissances" | "Racines carrées" | "Second degré" | "Statistiques" | "Suites" | "Systèmes" | "Théorème de Pythagore" | "Théorème de Thalès" | "Trigonométrie" | "Valeur absolue" | "Vecteurs";
|
|
61
|
-
export type PCSection = "Réaction chimique" | "Chimie des solutions" | "Forces" | "Chimie organique" | "Mécanique" | "Lumière" | "Acide / Base" | "Constitution et transformations de la matière" | "Ondes" | "Son" | "Corps purs et mélanges";
|
|
61
|
+
export type PCSection = "Réaction chimique" | "Chimie des solutions" | "Forces" | "Chimie organique" | "Mécanique" | "Lumière" | "Acide / Base" | "Constitution et transformations de la matière" | "Ondes" | "Son" | "Corps purs et mélanges" | "Fluides" | "Mol" | "Électricité";
|
|
62
62
|
//# sourceMappingURL=exercise.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAI3C,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,iBAAiB,UACrB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAUtB,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,WAAW,EAAE,KAAK,MAAM,kBAE3D,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAElC,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC;CACvB,CAAC;AACF,MAAM,WAAW,QAAQ,CAAC,YAAY,GAAG,EAAE;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,KAAK,G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B,eAAe,GACf,gBAAgB,GAChB,UAAU,CAAC;AAEf,MAAM,MAAM,SAAS,GACjB,mBAAmB,GACnB,sBAAsB,GACtB,QAAQ,GACR,kBAAkB,GAClB,WAAW,GACX,SAAS,GACT,cAAc,GACd,+CAA+C,GAC/C,OAAO,GACP,KAAK,GACL,wBAAwB,GACxB,SAAS,GACT,KAAK,GACL,aAAa,CAAC"}
|
|
@@ -15,7 +15,7 @@ const getCalculateProtonsNumberFromMassQuestion = () => {
|
|
|
15
15
|
const atomNucleusMass = atoms_1.nucleonMass.value.times(atom.masseAtomique);
|
|
16
16
|
const instruction = `Le noyau d'un atome ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(atom.name) ? "d'" : "de "}${atom.name} a pour masse $m = ${atomNucleusMass.toTex({
|
|
17
17
|
scientific: 2,
|
|
18
|
-
})}$ et possède $${(0, round_1.round)(atom.masseAtomique, 0) - atom.numeroAtomique}$ neutrons. Déterminer le nombre de protons de cet atome.`;
|
|
18
|
+
})} kg$ et possède $${(0, round_1.round)(atom.masseAtomique, 0) - atom.numeroAtomique}$ neutrons. Déterminer le nombre de protons de cet atome.`;
|
|
19
19
|
// const help = ` $m_{\\text{nucléon}} = ${nucleonMass.value.toTex({
|
|
20
20
|
// scientific: 2,
|
|
21
21
|
// })}\\ ${nucleonMass.unit}$`;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
import { AtomSymbols } from "../../../pc/molecularChemistry/atomSymbols";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
atomSymbol: AtomSymbols;
|
|
5
|
+
sampleMass: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const findAtomEntitiesNumberFromMass: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=findAtomEntitiesNumberFromMass.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findAtomEntitiesNumberFromMass.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAKtE,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,WAAW,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAyEF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAahE,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findAtomEntitiesNumberFromMass = void 0;
|
|
4
|
+
const frenchify_1 = require("../../../math/utils/latex/frenchify");
|
|
5
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
6
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
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 atoms_1 = require("../../../pc/constants/atoms");
|
|
11
|
+
const measure_1 = require("../../../pc/measure/measure");
|
|
12
|
+
const atome_1 = require("../../../pc/molecularChemistry/atome");
|
|
13
|
+
const random_1 = require("../../../utils/random");
|
|
14
|
+
const requiresApostropheBefore_1 = require("../../../utils/requiresApostropheBefore");
|
|
15
|
+
const getFindAtomEntitiesNumberFromMassQuestion = () => {
|
|
16
|
+
const atom = (0, random_1.random)(atome_1.atomes.slice(5, 30));
|
|
17
|
+
const sampleMass = (0, round_1.round)((0, randfloat_1.randfloat)(0.1, 2), 2);
|
|
18
|
+
const sampleMassMeasure = new measure_1.Measure(sampleMass, 0);
|
|
19
|
+
const atomMass = atoms_1.nucleonMass.value.times(atom.masseAtomique).toSignificant(2);
|
|
20
|
+
const entitiesNumber = sampleMassMeasure.divide(atomMass).toSignificant(2);
|
|
21
|
+
console.log("entitiesNumber", entitiesNumber);
|
|
22
|
+
const instruction = `Un échantillon a une masse $m = ${(0, frenchify_1.frenchify)(sampleMass)}\\ kg$ ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(atom.name) ? "d'" : "de "}${atom.name}. La masse d'un atome ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(atom.name) ? "d'" : "de "}${atom.name} est de $${atomMass.toTex({ scientific: 2 })}\\ kg$.
|
|
23
|
+
Déterminer le nombre d'atomes ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(atom.name) ? "d'" : "de "}${atom.name} composant l'échantillon.`;
|
|
24
|
+
const question = {
|
|
25
|
+
answer: `${entitiesNumber.toSignificant(2).toTex()}`,
|
|
26
|
+
instruction,
|
|
27
|
+
keys: ["timesTenPower"],
|
|
28
|
+
answerFormat: "tex",
|
|
29
|
+
identifiers: { atomSymbol: atom.symbole, sampleMass },
|
|
30
|
+
};
|
|
31
|
+
return question;
|
|
32
|
+
};
|
|
33
|
+
const getPropositions = (n, { answer, atomSymbol, sampleMass }) => {
|
|
34
|
+
const propositions = [];
|
|
35
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
36
|
+
const atom = atome_1.atomes.find((a) => a.symbole === atomSymbol);
|
|
37
|
+
const sampleMassMeasure = new measure_1.Measure(sampleMass, 0);
|
|
38
|
+
const atomMass = atoms_1.nucleonMass.value.times(atom.masseAtomique).toSignificant(2);
|
|
39
|
+
const entitiesNumber = sampleMassMeasure.divide(atomMass).toSignificant(2);
|
|
40
|
+
const wrongDivision = atomMass.divide(sampleMassMeasure).toSignificant(2);
|
|
41
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `${wrongDivision.toTex({ scientific: 2 })}`);
|
|
42
|
+
const wrongCalculation = atomMass.times(sampleMassMeasure).toSignificant(2);
|
|
43
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `${wrongCalculation.toTex({ scientific: 2 })}`);
|
|
44
|
+
while (propositions.length < n) {
|
|
45
|
+
const wrongPower = entitiesNumber
|
|
46
|
+
.times(new measure_1.Measure(1, (0, randint_1.randint)(-2, 2, [0])))
|
|
47
|
+
.toTex({ scientific: 0 });
|
|
48
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `${wrongPower}`);
|
|
49
|
+
}
|
|
50
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
51
|
+
};
|
|
52
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
53
|
+
// const atom = atomes.find(a => a.symbole === atomSymbol)!
|
|
54
|
+
// const sampleMassMeasure = new Measure(sampleMass, 0);
|
|
55
|
+
// const atomMass = nucleonMass.value.times(atom.masseAtomique).toSignificant(2);
|
|
56
|
+
// const entitiesNumber = sampleMassMeasure.divide(atomMass).toSignificant(2);
|
|
57
|
+
// const texs = entitiesNumber.toAllValidTexs();
|
|
58
|
+
// return texs.includes(ans);
|
|
59
|
+
return ans === answer;
|
|
60
|
+
};
|
|
61
|
+
exports.findAtomEntitiesNumberFromMass = {
|
|
62
|
+
id: "findAtomEntitiesNumberFromMass",
|
|
63
|
+
label: "Déterminer le nombre d'entités d'un atome dans un échantillon",
|
|
64
|
+
levels: ["2nde"],
|
|
65
|
+
isSingleStep: true,
|
|
66
|
+
sections: ["Chimie organique"],
|
|
67
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFindAtomEntitiesNumberFromMassQuestion, nb),
|
|
68
|
+
qcmTimer: 60,
|
|
69
|
+
freeTimer: 60,
|
|
70
|
+
getPropositions,
|
|
71
|
+
isAnswerValid,
|
|
72
|
+
subject: "Chimie",
|
|
73
|
+
};
|
|
@@ -6,4 +6,5 @@ export * from "./weightPercent";
|
|
|
6
6
|
export * from "./calculateVolumetricMass";
|
|
7
7
|
export * from "./findValenceElectronsNumberFromElectronicConfiguration";
|
|
8
8
|
export * from "./identifyRightElectronicConfiguration";
|
|
9
|
+
export * from "./findAtomEntitiesNumberFromMass";
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalElements/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yDAAyD,CAAC;AACxE,cAAc,wCAAwC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalElements/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yDAAyD,CAAC;AACxE,cAAc,wCAAwC,CAAC;AACvD,cAAc,kCAAkC,CAAC"}
|
|
@@ -22,3 +22,4 @@ __exportStar(require("./weightPercent"), exports);
|
|
|
22
22
|
__exportStar(require("./calculateVolumetricMass"), exports);
|
|
23
23
|
__exportStar(require("./findValenceElectronsNumberFromElectronicConfiguration"), exports);
|
|
24
24
|
__exportStar(require("./identifyRightElectronicConfiguration"), exports);
|
|
25
|
+
__exportStar(require("./findAtomEntitiesNumberFromMass"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
combustibleName: string;
|
|
4
|
+
combustibleQuantity: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const calculateCombustionEnergy: Exercise<Identifiers>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=calculateCombustionEnergy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculateCombustionEnergy.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalReactions/calculateCombustionEnergy.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAgBlC,KAAK,WAAW,GAAG;IAAE,eAAe,EAAE,MAAM,CAAC;IAAC,mBAAmB,EAAE,MAAM,CAAA;CAAE,CAAC;AAiE5E,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAa3D,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.calculateCombustionEnergy = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
7
|
+
const round_1 = require("../../../math/utils/round");
|
|
8
|
+
const random_1 = require("../../../utils/random");
|
|
9
|
+
const requiresApostropheBefore_1 = require("../../../utils/requiresApostropheBefore");
|
|
10
|
+
const combustibles = [
|
|
11
|
+
{ name: "bois", value: 15 },
|
|
12
|
+
{ name: "éthanol", value: 29 },
|
|
13
|
+
{ name: "butane", value: 46.4 },
|
|
14
|
+
{ name: "heptane", value: 44.6 },
|
|
15
|
+
{ name: "gazole", value: 45 },
|
|
16
|
+
{ name: "méthane", value: 50 },
|
|
17
|
+
];
|
|
18
|
+
const getCalculateCombustionEnergyQuestion = () => {
|
|
19
|
+
const combustibleQuantity = (0, randint_1.randint)(100, 301);
|
|
20
|
+
const combustible = (0, random_1.random)(combustibles);
|
|
21
|
+
const instruction = `Calculer l'énergie libérée lors de la combustion de $${combustibleQuantity}\\ \\text{g}$ ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(combustible.name) ? "d'" : "de"}
|
|
22
|
+
${combustible.name} (en MJ). $\\text{PC(${combustible.name})} = ${combustible.value}\\ \\text{MJ}\\cdot\\text{kg}^{-1}$`;
|
|
23
|
+
const energy = (0, round_1.roundSignificant)(-combustibleQuantity * 0.001 * combustible.value, 1);
|
|
24
|
+
const question = {
|
|
25
|
+
answer: energy,
|
|
26
|
+
instruction,
|
|
27
|
+
keys: [],
|
|
28
|
+
answerFormat: "tex",
|
|
29
|
+
identifiers: { combustibleName: combustible.name, combustibleQuantity },
|
|
30
|
+
};
|
|
31
|
+
return question;
|
|
32
|
+
};
|
|
33
|
+
const getPropositions = (n, { answer, combustibleName, combustibleQuantity }) => {
|
|
34
|
+
const propositions = [];
|
|
35
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
36
|
+
const combustible = combustibles.find((c) => c.name === combustibleName);
|
|
37
|
+
const noNegative = (0, round_1.roundSignificant)(combustibleQuantity * 0.001 * combustible.value, 1);
|
|
38
|
+
const noConversion = (0, round_1.roundSignificant)(-combustibleQuantity * combustible.value, 1);
|
|
39
|
+
const noNegativeNoConversion = (0, round_1.roundSignificant)(combustibleQuantity * combustible.value, 1);
|
|
40
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `${noNegative}`);
|
|
41
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `${noConversion}`);
|
|
42
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `${noNegativeNoConversion}`);
|
|
43
|
+
while (propositions.length < n) {
|
|
44
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `${(0, randint_1.randint)(0, 10)}`);
|
|
45
|
+
}
|
|
46
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
47
|
+
};
|
|
48
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
49
|
+
// throw Error("VEA not implemented");
|
|
50
|
+
return ans === answer;
|
|
51
|
+
};
|
|
52
|
+
exports.calculateCombustionEnergy = {
|
|
53
|
+
id: "calculateCombustionEnergy",
|
|
54
|
+
label: "Calculer l'énergie libérée par combustion",
|
|
55
|
+
levels: ["1reESM"],
|
|
56
|
+
isSingleStep: true,
|
|
57
|
+
sections: ["Chimie des solutions"],
|
|
58
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getCalculateCombustionEnergyQuestion, nb),
|
|
59
|
+
qcmTimer: 60,
|
|
60
|
+
freeTimer: 60,
|
|
61
|
+
getPropositions,
|
|
62
|
+
isAnswerValid,
|
|
63
|
+
subject: "Chimie",
|
|
64
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
maxQuantity: number;
|
|
4
|
+
productQuantity: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const calculateSynthesisEfficiency: Exercise<Identifiers>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=calculateSynthesisEfficiency.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculateSynthesisEfficiency.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAqDF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAa9D,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.calculateSynthesisEfficiency = 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 getCalculateSynthesisEfficiencyQuestion = () => {
|
|
9
|
+
const maxQuantity = (0, randfloat_1.randfloat)(0.2, 0.6, 2);
|
|
10
|
+
const productQuantity = (0, randfloat_1.randfloat)(maxQuantity / 2, maxQuantity * 0.9, 2);
|
|
11
|
+
const efficiency = (0, round_1.round)(productQuantity / maxQuantity, 2);
|
|
12
|
+
const question = {
|
|
13
|
+
answer: `${(0, round_1.roundSignificant)(efficiency, 2)}`,
|
|
14
|
+
instruction: `Lors d'une synthèse chimique, $${(0, round_1.roundSignificant)(maxQuantity, 2)}\\ \\text{mol}$ de produit est attendu au maximum, et il se forme au final $${(0, round_1.roundSignificant)(productQuantity, 2)}\\ \\text{mol}$ de produit.
|
|
15
|
+
Calculer le rendement.
|
|
16
|
+
`,
|
|
17
|
+
keys: [],
|
|
18
|
+
answerFormat: "tex",
|
|
19
|
+
identifiers: { maxQuantity, productQuantity },
|
|
20
|
+
};
|
|
21
|
+
return question;
|
|
22
|
+
};
|
|
23
|
+
const getPropositions = (n, { answer, maxQuantity, productQuantity }) => {
|
|
24
|
+
const propositions = [];
|
|
25
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
26
|
+
const wrongDivision = maxQuantity / productQuantity;
|
|
27
|
+
const multiplied = maxQuantity * productQuantity;
|
|
28
|
+
const substracted = maxQuantity - productQuantity;
|
|
29
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `${(0, round_1.roundSignificant)(wrongDivision, 2)}`);
|
|
30
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `${(0, round_1.roundSignificant)(multiplied, 2)}`);
|
|
31
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `${(0, round_1.roundSignificant)(substracted, 2)}`);
|
|
32
|
+
while (propositions.length < n) {
|
|
33
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `${(0, round_1.roundSignificant)((0, randfloat_1.randfloat)(0, 5), 2)}`);
|
|
34
|
+
}
|
|
35
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
36
|
+
};
|
|
37
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
38
|
+
return ans === answer;
|
|
39
|
+
};
|
|
40
|
+
exports.calculateSynthesisEfficiency = {
|
|
41
|
+
id: "calculateSynthesisEfficiency",
|
|
42
|
+
label: "Calculer un rendement",
|
|
43
|
+
levels: ["1reESM"],
|
|
44
|
+
isSingleStep: true,
|
|
45
|
+
sections: ["Chimie des solutions"],
|
|
46
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getCalculateSynthesisEfficiencyQuestion, nb),
|
|
47
|
+
qcmTimer: 60,
|
|
48
|
+
freeTimer: 60,
|
|
49
|
+
getPropositions,
|
|
50
|
+
isAnswerValid,
|
|
51
|
+
subject: "Chimie",
|
|
52
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
firstReagentVariables: number[];
|
|
4
|
+
secondReagentVariables: number[];
|
|
5
|
+
};
|
|
6
|
+
export declare const identifyLimitingReagent: Exercise<Identifiers>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=identifyLimitingReagent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identifyLimitingReagent.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalReactions/identifyLimitingReagent.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAIlC,KAAK,WAAW,GAAG;IACjB,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,sBAAsB,EAAE,MAAM,EAAE,CAAC;CAClC,CAAC;AAwEF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAczD,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.identifyLimitingReagent = void 0;
|
|
4
|
+
const round_1 = require("../../../math/utils/round");
|
|
5
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
6
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
7
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
8
|
+
const getIdentifyLimitingReagentQuestion = () => {
|
|
9
|
+
let firstReagentVariables = [];
|
|
10
|
+
let secondReagentVariables = [];
|
|
11
|
+
let firstXMax;
|
|
12
|
+
let secondXMax;
|
|
13
|
+
do {
|
|
14
|
+
firstReagentVariables = [];
|
|
15
|
+
secondReagentVariables = [];
|
|
16
|
+
firstReagentVariables.push((0, randint_1.randint)(1, 11));
|
|
17
|
+
firstReagentVariables.push((0, randint_1.randint)(1, 5, [firstReagentVariables[0]]));
|
|
18
|
+
secondReagentVariables.push((0, randint_1.randint)(1, 11, [firstReagentVariables[0], firstReagentVariables[1]]));
|
|
19
|
+
secondReagentVariables.push((0, randint_1.randint)(1, 5, [firstReagentVariables[0], firstReagentVariables[1]]));
|
|
20
|
+
firstXMax = (0, round_1.roundSignificant)(firstReagentVariables[0] / firstReagentVariables[1], 1);
|
|
21
|
+
secondXMax = (0, round_1.roundSignificant)(secondReagentVariables[0] / secondReagentVariables[1], 1);
|
|
22
|
+
} while (firstXMax === secondXMax);
|
|
23
|
+
const limitingReagent = firstXMax < secondXMax ? "Le réactif A" : "Le réactif B";
|
|
24
|
+
const instruction = `On considère l'état final d'un système chimique,
|
|
25
|
+
pour lequel il y a eu transformation totale. Les quantités finales des
|
|
26
|
+
deux réactifs $\\text{A}$ et $\\text{B (en mol)}$, sont $\\text{n}_{\\text{A}} = ${(0, round_1.roundSignificant)(firstReagentVariables[0], 1)} - ${firstReagentVariables[1] === 1 ? "" : firstReagentVariables[1]} x_{\\text{max}}$ et $\\text{n}_{\\text{
|
|
27
|
+
B
|
|
28
|
+
}} = ${(0, round_1.roundSignificant)(secondReagentVariables[0], 1)} - ${secondReagentVariables[1] === 1 ? "" : secondReagentVariables[1]} x_{\\text{max}}$. Quel est le réactif limitant ?`;
|
|
29
|
+
const question = {
|
|
30
|
+
answer: limitingReagent,
|
|
31
|
+
instruction,
|
|
32
|
+
keys: [],
|
|
33
|
+
answerFormat: "raw",
|
|
34
|
+
identifiers: { firstReagentVariables, secondReagentVariables },
|
|
35
|
+
};
|
|
36
|
+
return question;
|
|
37
|
+
};
|
|
38
|
+
const getPropositions = (n, { answer }) => {
|
|
39
|
+
const propositions = [];
|
|
40
|
+
(0, exercise_1.addValidProp)(propositions, answer, "raw");
|
|
41
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Le réactif A", "raw");
|
|
42
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Le réactif B", "raw");
|
|
43
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
44
|
+
};
|
|
45
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
46
|
+
return ans === answer;
|
|
47
|
+
};
|
|
48
|
+
exports.identifyLimitingReagent = {
|
|
49
|
+
id: "identifyLimitingReagent",
|
|
50
|
+
label: "Identifier un réactif limitant",
|
|
51
|
+
levels: ["1reESM"],
|
|
52
|
+
isSingleStep: true,
|
|
53
|
+
sections: ["Chimie des solutions"],
|
|
54
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getIdentifyLimitingReagentQuestion, nb),
|
|
55
|
+
qcmTimer: 60,
|
|
56
|
+
freeTimer: 60,
|
|
57
|
+
getPropositions,
|
|
58
|
+
isAnswerValid,
|
|
59
|
+
subject: "Chimie",
|
|
60
|
+
answerType: "QCM",
|
|
61
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
firstReagentVariables: number[];
|
|
4
|
+
secondReagentVariables: number[];
|
|
5
|
+
};
|
|
6
|
+
export declare const identifyStoichiometricMixture: Exercise<Identifiers>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=identifyStoichiometricMixture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identifyStoichiometricMixture.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalReactions/identifyStoichiometricMixture.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,sBAAsB,EAAE,MAAM,EAAE,CAAC;CAClC,CAAC;AAmFF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAc/D,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.identifyStoichiometricMixture = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
7
|
+
const round_1 = require("../../../math/utils/round");
|
|
8
|
+
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
9
|
+
const getIdentifyStoichiometricMixtureQuestion = () => {
|
|
10
|
+
const isForcedStoichiometric = (0, coinFlip_1.coinFlip)();
|
|
11
|
+
let firstReagentVariables = [];
|
|
12
|
+
let secondReagentVariables = [];
|
|
13
|
+
let firstXMax;
|
|
14
|
+
let secondXMax;
|
|
15
|
+
if (isForcedStoichiometric) {
|
|
16
|
+
const factor = (0, randint_1.randint)(1, 7);
|
|
17
|
+
const firstMultiplicator = (0, randint_1.randint)(1, 5);
|
|
18
|
+
const secondMultiplicator = (0, randint_1.randint)(1, 5, [firstMultiplicator]);
|
|
19
|
+
firstReagentVariables.push(factor * firstMultiplicator, firstMultiplicator);
|
|
20
|
+
secondReagentVariables.push(factor * secondMultiplicator, secondMultiplicator);
|
|
21
|
+
}
|
|
22
|
+
if (!isForcedStoichiometric) {
|
|
23
|
+
firstReagentVariables.push((0, randint_1.randint)(1, 11));
|
|
24
|
+
firstReagentVariables.push((0, randint_1.randint)(1, 5, [firstReagentVariables[0]]));
|
|
25
|
+
secondReagentVariables.push((0, randint_1.randint)(1, 11, [firstReagentVariables[0], firstReagentVariables[1]]));
|
|
26
|
+
secondReagentVariables.push((0, randint_1.randint)(1, 5, [firstReagentVariables[0], firstReagentVariables[1]]));
|
|
27
|
+
firstXMax = (0, round_1.roundSignificant)(firstReagentVariables[0] / firstReagentVariables[1], 1);
|
|
28
|
+
secondXMax = (0, round_1.roundSignificant)(secondReagentVariables[0] / secondReagentVariables[1], 1);
|
|
29
|
+
}
|
|
30
|
+
const isStoichiometric = isForcedStoichiometric
|
|
31
|
+
? true
|
|
32
|
+
: firstXMax === secondXMax;
|
|
33
|
+
const instruction = `On considère l'état final d'un système chimique,
|
|
34
|
+
pour lequel il y a eu transformation totale. Les quantités finales des
|
|
35
|
+
deux réactifs $\\text{A}$ et $\\text{B (en mmol)}$, sont $\\text{n}_{\\text{A}} = ${(0, round_1.roundSignificant)(firstReagentVariables[0], 1)} - ${firstReagentVariables[1] === 1 ? "" : firstReagentVariables[1]} x_{\\text{max}}$ et $\\text{n}_{\\text{B}} = ${(0, round_1.roundSignificant)(secondReagentVariables[0], 1)} - ${secondReagentVariables[1] === 1 ? "" : secondReagentVariables[1]} x_{\\text{max}}$. Le mélange initial est-il stoechiométrique ?`;
|
|
36
|
+
const question = {
|
|
37
|
+
answer: isStoichiometric ? "Oui" : "Non",
|
|
38
|
+
instruction,
|
|
39
|
+
keys: [],
|
|
40
|
+
answerFormat: "raw",
|
|
41
|
+
identifiers: { firstReagentVariables, secondReagentVariables },
|
|
42
|
+
};
|
|
43
|
+
return question;
|
|
44
|
+
};
|
|
45
|
+
const getPropositions = (n, { answer }) => {
|
|
46
|
+
const propositions = [];
|
|
47
|
+
(0, exercise_1.addValidProp)(propositions, answer, "raw");
|
|
48
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Oui", "raw");
|
|
49
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Non", "raw");
|
|
50
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
51
|
+
};
|
|
52
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
53
|
+
return ans === answer;
|
|
54
|
+
};
|
|
55
|
+
exports.identifyStoichiometricMixture = {
|
|
56
|
+
id: "identifyStoichiometricMixture",
|
|
57
|
+
label: "Identifier un mélange stoechiométrique",
|
|
58
|
+
levels: ["1reESM"],
|
|
59
|
+
isSingleStep: true,
|
|
60
|
+
sections: ["Chimie des solutions"],
|
|
61
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getIdentifyStoichiometricMixtureQuestion, nb),
|
|
62
|
+
qcmTimer: 60,
|
|
63
|
+
freeTimer: 60,
|
|
64
|
+
getPropositions,
|
|
65
|
+
isAnswerValid,
|
|
66
|
+
subject: "Chimie",
|
|
67
|
+
answerType: "QCM",
|
|
68
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalReactions/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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("./calculateSynthesisEfficiency"), exports);
|
|
18
|
+
__exportStar(require("./calculateCombustionEnergy"), exports);
|
|
19
|
+
__exportStar(require("./identifyLimitingReagent"), exports);
|
|
20
|
+
__exportStar(require("./identifyStoichiometricMixture"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
intensity: number;
|
|
4
|
+
seconds: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const electricChargeFromIntensity: Exercise<Identifiers>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=electricChargeFromIntensity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"electricChargeFromIntensity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/electricity/electricChargeFromIntensity.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AA+C1D,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAa7D,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.electricChargeFromIntensity = void 0;
|
|
4
|
+
const round_1 = require("../../../math/utils/round");
|
|
5
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
6
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
7
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
8
|
+
const randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
9
|
+
const getElectricChargeFromIntensityQuestion = () => {
|
|
10
|
+
const intensity = (0, randfloat_1.randfloat)(0, 6, 1);
|
|
11
|
+
const seconds = (0, randint_1.randint)(1, 30);
|
|
12
|
+
const electricCharge = intensity * seconds;
|
|
13
|
+
const question = {
|
|
14
|
+
answer: (0, round_1.roundSignificant)(electricCharge, 1),
|
|
15
|
+
instruction: `Un conducteur électrique est parcouru par un courant d'intensité $${(0, round_1.roundSignificant)(intensity, 1)}\\ \\text{A}$. Calculer la charge électrique $\\text{Q (en C)}$ ayant traversé la section de ce conducteur durant $${seconds}\\ \\text{s}$.`,
|
|
16
|
+
keys: [],
|
|
17
|
+
answerFormat: "tex",
|
|
18
|
+
identifiers: { intensity, seconds },
|
|
19
|
+
};
|
|
20
|
+
return question;
|
|
21
|
+
};
|
|
22
|
+
const getPropositions = (n, { answer, intensity, seconds }) => {
|
|
23
|
+
const propositions = [];
|
|
24
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
25
|
+
const electricCharge = intensity * seconds;
|
|
26
|
+
const firstDivision = intensity / seconds;
|
|
27
|
+
const secondDivision = seconds / intensity;
|
|
28
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `${(0, round_1.roundSignificant)(firstDivision, 1)}`);
|
|
29
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `${(0, round_1.roundSignificant)(secondDivision, 1)}`);
|
|
30
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `${(0, round_1.roundSignificant)(electricCharge * 0.1, 1)}`);
|
|
31
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
32
|
+
};
|
|
33
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
34
|
+
return ans === answer;
|
|
35
|
+
};
|
|
36
|
+
exports.electricChargeFromIntensity = {
|
|
37
|
+
id: "electricChargeFromIntensity",
|
|
38
|
+
label: "Calculer une charge électrique",
|
|
39
|
+
levels: ["1reESM"],
|
|
40
|
+
isSingleStep: true,
|
|
41
|
+
sections: ["Électricité"],
|
|
42
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getElectricChargeFromIntensityQuestion, nb),
|
|
43
|
+
qcmTimer: 60,
|
|
44
|
+
freeTimer: 60,
|
|
45
|
+
getPropositions,
|
|
46
|
+
isAnswerValid,
|
|
47
|
+
subject: "Physique",
|
|
48
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"electricEnergyFromPower.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/electricity/electricEnergyFromPower.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AA8BlC,KAAK,WAAW,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAwCtD,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAazD,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.electricEnergyFromPower = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
7
|
+
const round_1 = require("../../../math/utils/round");
|
|
8
|
+
const random_1 = require("../../../utils/random");
|
|
9
|
+
// const homeObjects = [
|
|
10
|
+
// { id: "lampLed", label: "ampoule LED", gender: "feminine", power: 7 },
|
|
11
|
+
// { id: "lampLed", label: "ampoule LED", gender: "feminine", power: 7 },
|
|
12
|
+
// {
|
|
13
|
+
// id: "lampLow",
|
|
14
|
+
// label: "ampoule à basse consommation",
|
|
15
|
+
// gender: "feminine",
|
|
16
|
+
// powers: 11,
|
|
17
|
+
// },
|
|
18
|
+
// {
|
|
19
|
+
// id: "lampInc",
|
|
20
|
+
// label: "ampoule à incandescence",
|
|
21
|
+
// gender: "feminine",
|
|
22
|
+
// power: 60,
|
|
23
|
+
// },
|
|
24
|
+
// { id: "wifi", label: "box WiFi", gender: "feminine", power: 13 },
|
|
25
|
+
// { id: "tv", label: "télévision", gender: "feminine", power: 300 },
|
|
26
|
+
// { id: "hairdryer", label: "sèche-cheveux", gender: "masculine", power: 1200 },
|
|
27
|
+
// { id: "fridge", label: "réfrigérateur", gender: "masculine", power: 500 },
|
|
28
|
+
// ];
|
|
29
|
+
// const durations = [{label: "année",gender: "feminine", valueInSeconds: }]
|
|
30
|
+
const powers = [15, 18, 50, 25, 65, 66, 7.5, 10];
|
|
31
|
+
const getElectricEnergyFromPowerQuestion = () => {
|
|
32
|
+
const power = (0, random_1.random)(powers);
|
|
33
|
+
const seconds = (0, randint_1.randint)(10, 61);
|
|
34
|
+
const energy = power * seconds;
|
|
35
|
+
const question = {
|
|
36
|
+
answer: `${energy.toScientific(0).toTex({ scientific: 0 })}`,
|
|
37
|
+
instruction: `Un chargeur a une puissance maximale de $${power}\\ \\text{W}$. Calculer l'énergie électrique qu'il fournit durant $${seconds}\\ \\text{secondes}$ de fonctionnement (en $\\text{J}$).`,
|
|
38
|
+
keys: ["timesTenPower"],
|
|
39
|
+
answerFormat: "tex",
|
|
40
|
+
identifiers: { power, seconds },
|
|
41
|
+
};
|
|
42
|
+
return question;
|
|
43
|
+
};
|
|
44
|
+
const getPropositions = (n, { answer, power, seconds }) => {
|
|
45
|
+
const propositions = [];
|
|
46
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
47
|
+
const energy = power * seconds;
|
|
48
|
+
const firstDivision = power / seconds;
|
|
49
|
+
const secondDivision = seconds / power;
|
|
50
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `${(0, round_1.roundSignificant)(firstDivision, 1)}`);
|
|
51
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `${(0, round_1.roundSignificant)(secondDivision, 1)}`);
|
|
52
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `${(0, round_1.roundSignificant)(energy * 0.1, 0)}`);
|
|
53
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
54
|
+
};
|
|
55
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
56
|
+
return ans === answer;
|
|
57
|
+
};
|
|
58
|
+
exports.electricEnergyFromPower = {
|
|
59
|
+
id: "electricEnergyFromPower",
|
|
60
|
+
label: "Calculer une énergie électrique",
|
|
61
|
+
levels: ["1reESM"],
|
|
62
|
+
isSingleStep: true,
|
|
63
|
+
sections: ["Électricité"],
|
|
64
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getElectricEnergyFromPowerQuestion, nb),
|
|
65
|
+
qcmTimer: 60,
|
|
66
|
+
freeTimer: 60,
|
|
67
|
+
getPropositions,
|
|
68
|
+
isAnswerValid,
|
|
69
|
+
subject: "Physique",
|
|
70
|
+
};
|