math-exercises 2.1.26-beta.6 → 2.1.26-beta.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/calibrationCurveOfSolution.d.ts.map +1 -1
- package/lib/exercises/pc/calibrationCurveOfSolution.js +4 -6
- package/lib/exercises/pc/dosage/beerLambertRandomValue.js +4 -4
- package/lib/exercises/utils/geogebra/getPointFromGGB.js +1 -1
- package/lib/exercises/utils/geogebra/isGGBPoint.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calibrationCurveOfSolution.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/calibrationCurveOfSolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"calibrationCurveOfSolution.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/calibrationCurveOfSolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqFF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAa5D,CAAC"}
|
|
@@ -16,18 +16,17 @@ const getCalibrationCurveOfSolutionQuestion = () => {
|
|
|
16
16
|
const maxY = 10 * exo.epsilon * exo.l + 5;
|
|
17
17
|
const question = {
|
|
18
18
|
ggbAnswer: [
|
|
19
|
-
`(5
|
|
20
|
-
`(10
|
|
19
|
+
`(5,${5 * exo.epsilon * exo.l})`,
|
|
20
|
+
`(10,${10 * exo.epsilon * exo.l})`,
|
|
21
21
|
`Line(A, B)`,
|
|
22
22
|
],
|
|
23
23
|
instruction: exo.instruction,
|
|
24
24
|
keys: [],
|
|
25
25
|
studentGgbOptions: {
|
|
26
|
-
coords: [-
|
|
27
|
-
isXAxesNatural: true,
|
|
26
|
+
coords: [-1, 5, -1, 6],
|
|
28
27
|
isAxesRatioFixed: false,
|
|
29
28
|
enableShiftDragZoom: true,
|
|
30
|
-
axisLabels: ["$\\
|
|
29
|
+
axisLabels: ["$\\small{C}$", "$\\small{A}$"],
|
|
31
30
|
customToolBar: (0, toolBarConstructor_1.toolBarConstructor)({
|
|
32
31
|
join: true,
|
|
33
32
|
}),
|
|
@@ -44,7 +43,6 @@ const getCalibrationCurveOfSolutionQuestion = () => {
|
|
|
44
43
|
const isGGBAnswerValid = (ans, { ggbAnswer, epsilon, l }) => {
|
|
45
44
|
if ((0, arrayEqual_1.arrayEqual)(ans, ggbAnswer))
|
|
46
45
|
return true;
|
|
47
|
-
console.log(ans);
|
|
48
46
|
const points = ans
|
|
49
47
|
.filter((command) => (0, isGGBPoint_1.isGGBPoint)(command))
|
|
50
48
|
.map((value) => (0, getPointFromGGB_1.getPointFromGGB)(value, "", false));
|
|
@@ -35,7 +35,7 @@ const getBeerLambertRandomValueQuestion = () => {
|
|
|
35
35
|
const knownVariables = variables.filter((_, index) => index !== randomIndex);
|
|
36
36
|
const knownVariablesText = knownVariables
|
|
37
37
|
.map((v) => `${v.name === "concentration"
|
|
38
|
-
? "Concentration"
|
|
38
|
+
? "- Concentration"
|
|
39
39
|
: v.name === "molarAbsorptivity"
|
|
40
40
|
? "- Coefficient d'absorption molaire"
|
|
41
41
|
: v.name === "pathLength"
|
|
@@ -49,9 +49,9 @@ const getBeerLambertRandomValueQuestion = () => {
|
|
|
49
49
|
: "$A$"} = $${(0, frenchify_1.frenchify)(v.value)}\\ ${v.unit}$`)
|
|
50
50
|
.join(",\n");
|
|
51
51
|
const instruction = `Vous êtes en train de réaliser l'étalonnage d'une solution ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(molecule.name.toLowerCase()) ? "d'" : "de "}${molecule.name.toLowerCase()} en utilisant une solution étalon. Vous avez mesuré les données suivantes :\n
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
${knownVariablesText}.\n
|
|
53
|
+
|
|
54
|
+
À partir de ces données, déterminez ${targetVariable.name === "concentration"
|
|
55
55
|
? "la concentration en $\\text{mol} \\cdot \\text{L}^{-1}$"
|
|
56
56
|
: targetVariable.name === "molarAbsorptivity"
|
|
57
57
|
? "le coefficient d'absorption molaire en $\\text{L} \\cdot \\text{mol}^{-1} \\cdot \\text{cm}^{-1}$"
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getPointFromGGB = void 0;
|
|
4
4
|
const point_1 = require("../../../math/geometry/point");
|
|
5
5
|
function getPointFromGGB(command, name, isInteger = true) {
|
|
6
|
-
const splitted = command.split("
|
|
6
|
+
const splitted = command.split(",");
|
|
7
7
|
const x = isInteger
|
|
8
8
|
? +(+splitted[0].replace("(", "")).toFixed(0)
|
|
9
9
|
: +splitted[0].replace("(", "");
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isGGBPoint = void 0;
|
|
4
4
|
function isGGBPoint(command) {
|
|
5
|
-
const regex = /\(-?\d+(\.\d+)
|
|
5
|
+
const regex = /\(-?\d+(\.\d+)?\,-?\d+(\.\d+)?\)/;
|
|
6
6
|
return regex.test(command);
|
|
7
7
|
}
|
|
8
8
|
exports.isGGBPoint = isGGBPoint;
|