math-exercises 2.1.7 → 2.1.8
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/pc/chemicalReactions/calculateCombustionEnergy.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactions/calculateCombustionEnergy.js +3 -4
- package/lib/exercises/pc/electricity/electricEnergyFromPower.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/electricEnergyFromPower.js +3 -4
- package/lib/exercises/pc/mole/molFromMass.js +1 -1
- package/package.json +1 -1
|
@@ -1 +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;
|
|
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;AAkE5E,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAa3D,CAAC"}
|
|
@@ -18,10 +18,9 @@ const combustibles = [
|
|
|
18
18
|
const getCalculateCombustionEnergyQuestion = () => {
|
|
19
19
|
const combustibleQuantity = (0, randint_1.randint)(100, 301);
|
|
20
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
|
-
|
|
23
|
-
|
|
24
|
-
Données : $\\text{PC(${combustible.name})} = ${combustible.value}\\ \\text{MJ}\\cdot\\text{kg}^{-1}$`;
|
|
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"} ${combustible.name} (en $\\text{MJ}$).
|
|
22
|
+
$\\newline$
|
|
23
|
+
Données : $\\text{PC(${combustible.name})} = ${combustible.value.frenchify()}\\ \\text{MJ}\\cdot\\text{kg}^{-1}$`;
|
|
25
24
|
const energy = (0, round_1.roundSignificant)(-combustibleQuantity * 0.001 * combustible.value, 1);
|
|
26
25
|
const question = {
|
|
27
26
|
answer: energy,
|
|
@@ -1 +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;
|
|
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;AAiDtD,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAazD,CAAC"}
|
|
@@ -4,7 +4,6 @@ exports.electricEnergyFromPower = void 0;
|
|
|
4
4
|
const exercise_1 = require("../../../exercises/exercise");
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
7
|
-
const round_1 = require("../../../math/utils/round");
|
|
8
7
|
const random_1 = require("../../../utils/random");
|
|
9
8
|
// const homeObjects = [
|
|
10
9
|
// { id: "lampLed", label: "ampoule LED", gender: "feminine", power: 7 },
|
|
@@ -47,9 +46,9 @@ const getPropositions = (n, { answer, power, seconds }) => {
|
|
|
47
46
|
const energy = power * seconds;
|
|
48
47
|
const firstDivision = power / seconds;
|
|
49
48
|
const secondDivision = seconds / power;
|
|
50
|
-
(0, exercise_1.tryToAddWrongProp)(propositions,
|
|
51
|
-
(0, exercise_1.tryToAddWrongProp)(propositions,
|
|
52
|
-
(0, exercise_1.tryToAddWrongProp)(propositions,
|
|
49
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, firstDivision.toScientific(0).toTex({ scientific: 0 }));
|
|
50
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, secondDivision.toScientific(0).toTex({ scientific: 0 }));
|
|
51
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (energy * 0.1).toScientific(0).toTex({ scientific: 0 }));
|
|
53
52
|
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
54
53
|
};
|
|
55
54
|
const isAnswerValid = (ans, { answer }) => {
|
|
@@ -11,7 +11,7 @@ const getMolFromMassQuestion = () => {
|
|
|
11
11
|
const answer = (0, round_1.roundSignificant)(mass / molarMass, 1);
|
|
12
12
|
const question = {
|
|
13
13
|
answer,
|
|
14
|
-
instruction: `On prélève $${(0, round_1.roundSignificant)(mass, 1)}\\ \\text{g}$ d'une espèce chimique de masse molaire $${(0, round_1.roundSignificant)(molarMass, 1)}\\ \\text{g}\\cdot \\text{mol}^{-1}$. Quelle est la quantité de matière prélevée ?`,
|
|
14
|
+
instruction: `On prélève $${(0, round_1.roundSignificant)(mass, 1)}\\ \\text{g}$ d'une espèce chimique de masse molaire $${(0, round_1.roundSignificant)(molarMass, 1)}\\ \\text{g}\\cdot \\text{mol}^{-1}$. Quelle est la quantité de matière prélevée, en $\\text{mol}$ ?`,
|
|
15
15
|
keys: [],
|
|
16
16
|
answerFormat: "tex",
|
|
17
17
|
identifiers: { mass, molarMass },
|