math-exercises 2.1.6 → 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 -2
- package/lib/exercises/pc/chemicalReactions/identifyLimitingReagent.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactions/identifyLimitingReagent.js +1 -3
- package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.js +1 -1
- package/lib/exercises/pc/electricity/electricChargeFromIntensity.js +1 -1
- package/lib/exercises/pc/electricity/electricEnergyFromPower.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/electricEnergyFromPower.js +4 -5
- 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,8 +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
|
-
|
|
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}$`;
|
|
23
24
|
const energy = (0, round_1.roundSignificant)(-combustibleQuantity * 0.001 * combustible.value, 1);
|
|
24
25
|
const question = {
|
|
25
26
|
answer: energy,
|
|
@@ -1 +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;
|
|
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;AAyEF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAczD,CAAC"}
|
|
@@ -23,9 +23,7 @@ const getIdentifyLimitingReagentQuestion = () => {
|
|
|
23
23
|
const limitingReagent = firstXMax < secondXMax ? "Le réactif A" : "Le réactif B";
|
|
24
24
|
const instruction = `On considère l'état final d'un système chimique,
|
|
25
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)
|
|
27
|
-
B
|
|
28
|
-
}} = ${(0, round_1.roundSignificant)(secondReagentVariables[0], 1)} - ${secondReagentVariables[1] === 1 ? "" : secondReagentVariables[1]} x_{\\text{max}}$. Quel est le réactif limitant ?`;
|
|
26
|
+
deux réactifs $\\text{A}$ et $\\text{B}$ (en $\\text{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{B}} = ${(0, round_1.roundSignificant)(secondReagentVariables[0], 1)} - ${secondReagentVariables[1] === 1 ? "" : secondReagentVariables[1]} x_{\\text{max}}$. Quel est le réactif limitant ?`;
|
|
29
27
|
const question = {
|
|
30
28
|
answer: limitingReagent,
|
|
31
29
|
instruction,
|
|
@@ -32,7 +32,7 @@ const getIdentifyStoichiometricMixtureQuestion = () => {
|
|
|
32
32
|
: firstXMax === secondXMax;
|
|
33
33
|
const instruction = `On considère l'état final d'un système chimique,
|
|
34
34
|
pour lequel il y a eu transformation totale. Les quantités finales des
|
|
35
|
-
deux réactifs $\\text{A}$ et $\\text{B (en
|
|
35
|
+
deux réactifs $\\text{A}$ et $\\text{B}$ (en $\\text{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{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
36
|
const question = {
|
|
37
37
|
answer: isStoichiometric ? "Oui" : "Non",
|
|
38
38
|
instruction,
|
|
@@ -12,7 +12,7 @@ const getElectricChargeFromIntensityQuestion = () => {
|
|
|
12
12
|
const electricCharge = intensity * seconds;
|
|
13
13
|
const question = {
|
|
14
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
|
|
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 $\\text{C}$) ayant traversé la section de ce conducteur durant $${seconds}\\ \\text{s}$.`,
|
|
16
16
|
keys: [],
|
|
17
17
|
answerFormat: "tex",
|
|
18
18
|
identifiers: { intensity, seconds },
|
|
@@ -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 },
|
|
@@ -34,7 +33,7 @@ const getElectricEnergyFromPowerQuestion = () => {
|
|
|
34
33
|
const energy = power * seconds;
|
|
35
34
|
const question = {
|
|
36
35
|
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{
|
|
36
|
+
instruction: `Un chargeur a une puissance maximale de $${power}\\ \\text{W}$. Calculer l'énergie électrique qu'il fournit durant $${seconds}\\ \\text{s}$ de fonctionnement (en $\\text{J}$).`,
|
|
38
37
|
keys: ["timesTenPower"],
|
|
39
38
|
answerFormat: "tex",
|
|
40
39
|
identifiers: { power, seconds },
|
|
@@ -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 },
|