math-exercises 2.1.16 → 2.1.17

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.
Files changed (40) hide show
  1. package/lib/exercises/exercise.d.ts +2 -0
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/math/calcul/proportionality/index.d.ts +1 -0
  4. package/lib/exercises/math/calcul/proportionality/index.d.ts.map +1 -1
  5. package/lib/exercises/math/calcul/proportionality/index.js +1 -0
  6. package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.d.ts +8 -0
  7. package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.d.ts.map +1 -0
  8. package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.js +55 -0
  9. package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.d.ts.map +1 -1
  10. package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.js +4 -0
  11. package/lib/exercises/math/equaDiff/equaDiffGeneralForme.d.ts.map +1 -1
  12. package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +8 -1
  13. package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.d.ts.map +1 -1
  14. package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.js +12 -0
  15. package/lib/exercises/math/geometry/vectors/scalarProductViaCoords.d.ts.map +1 -1
  16. package/lib/exercises/math/geometry/vectors/scalarProductViaCoords.js +2 -0
  17. package/lib/exercises/math/percent/index.d.ts +1 -0
  18. package/lib/exercises/math/percent/index.d.ts.map +1 -1
  19. package/lib/exercises/math/percent/index.js +1 -0
  20. package/lib/exercises/math/percent/isTableProportional.d.ts +5 -0
  21. package/lib/exercises/math/percent/isTableProportional.d.ts.map +1 -0
  22. package/lib/exercises/math/percent/isTableProportional.js +73 -0
  23. package/lib/exercises/math/python/pyWhileLoop1Exercise.js +1 -1
  24. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.d.ts.map +1 -1
  25. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +70 -0
  26. package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.d.ts.map +1 -1
  27. package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.js +12 -0
  28. package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.d.ts.map +1 -1
  29. package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.js +12 -5
  30. package/lib/exercises/pc/forces/forceWork.d.ts.map +1 -1
  31. package/lib/exercises/pc/pH.d.ts.map +1 -1
  32. package/lib/exercises/pc/pH.js +7 -0
  33. package/lib/exercises/pc/waves/periodicWaveCelerity.d.ts.map +1 -1
  34. package/lib/exercises/pc/waves/periodicWaveCelerity.js +13 -2
  35. package/lib/exercises/pc/weight/weightOnTheMoon.d.ts.map +1 -1
  36. package/lib/exercises/pc/weight/weightOnTheMoon.js +17 -0
  37. package/lib/index.d.ts +4 -1
  38. package/lib/index.d.ts.map +1 -1
  39. package/lib/math/polynomials/trinom.d.ts.map +1 -1
  40. package/package.json +1 -1
@@ -12,6 +12,8 @@ export type Proposition = {
12
12
  };
13
13
  export interface Question<TIdentifiers = {}> {
14
14
  instruction: string;
15
+ hint?: string;
16
+ correction?: string;
15
17
  startStatement?: string;
16
18
  answer: string;
17
19
  answerFormat: "tex" | "raw";
@@ -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,W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KAAK,GACL,QAAQ,GACR,QAAQ,GACR,SAAS,CAAC;AAEd,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,cAAc,GACd,iBAAiB,GACjB,SAAS,GACT,8BAA8B,GAC9B,aAAa,GACb,YAAY,GACZ,SAAS,GACT,0BAA0B,GAC1B,WAAW,GACX,2BAA2B,GAC3B,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,WAAW,GACX,mBAAmB,GACnB,wBAAwB,GACxB,WAAW,GACX,uBAAuB,GACvB,uBAAuB,GACvB,aAAa,GACb,aAAa,GACb,SAAS,GACT,qBAAqB,GACrB,oBAAoB,GACpB,UAAU,GACV,mBAAmB,GACnB,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,QAAQ,GACR,YAAY,GACZ,QAAQ,GACR,iBAAiB,GACjB,cAAc,GACd,cAAc,GACd,QAAQ,GACR,UAAU,GACV,uBAAuB,GACvB,oBAAoB,GACpB,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"}
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,GAA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N,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,UAAU,GACV,SAAS,GACT,UAAU,GACV,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,SAAS,CAAC;AAEd,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,cAAc,GACd,iBAAiB,GACjB,SAAS,GACT,8BAA8B,GAC9B,aAAa,GACb,YAAY,GACZ,SAAS,GACT,0BAA0B,GAC1B,WAAW,GACX,2BAA2B,GAC3B,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,WAAW,GACX,mBAAmB,GACnB,wBAAwB,GACxB,WAAW,GACX,uBAAuB,GACvB,uBAAuB,GACvB,aAAa,GACb,aAAa,GACb,SAAS,GACT,qBAAqB,GACrB,oBAAoB,GACpB,UAAU,GACV,mBAAmB,GACnB,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,QAAQ,GACR,YAAY,GACZ,QAAQ,GACR,iBAAiB,GACjB,cAAc,GACd,cAAc,GACd,QAAQ,GACR,UAAU,GACV,uBAAuB,GACvB,oBAAoB,GACpB,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"}
@@ -1,2 +1,3 @@
1
1
  export * from "./proportionalityTable";
2
+ export * from "./proportionalityTableCoefficient";
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC"}
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./proportionalityTable"), exports);
18
+ __exportStar(require("./proportionalityTableCoefficient"), exports);
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ xValues: number[];
4
+ yValues: number[];
5
+ };
6
+ export declare const proportionalityTableCoefficient: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=proportionalityTableCoefficient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proportionalityTableCoefficient.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/proportionalityTableCoefficient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAoDF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAcjE,CAAC"}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.proportionalityTableCoefficient = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const integer_1 = require("../../../../math/numbers/integer/integer");
7
+ const randint_1 = require("../../../../math/utils/random/randint");
8
+ const shuffle_1 = require("../../../../utils/shuffle");
9
+ const getProportionalityTableCoefficient = () => {
10
+ const factor = (0, randint_1.randint)(2, 15);
11
+ const xValues = integer_1.IntegerConstructor.randomDifferents(1, 100 / factor, 3).sort((a, b) => a - b);
12
+ const yValues = xValues.map((x) => x * factor);
13
+ let dataTable = `
14
+ | ${xValues.join(" | ")} |
15
+ |-|-|-|
16
+ | ${yValues.map((n) => n.frenchify()).join(" | ")} |
17
+ `;
18
+ const instruction = `On considère le tableau de proportionnalité suivant : ${dataTable}
19
+
20
+ \n Calculer le coefficient de proportionnalité.`;
21
+ const answer = factor.toTree().toTex();
22
+ const question = {
23
+ instruction,
24
+ answer,
25
+ keys: [],
26
+ answerFormat: "tex",
27
+ identifiers: { xValues, yValues },
28
+ };
29
+ return question;
30
+ };
31
+ const getPropositions = (n, { answer }) => {
32
+ const propositions = [];
33
+ (0, exercise_1.addValidProp)(propositions, answer);
34
+ while (propositions.length < n) {
35
+ (0, exercise_1.tryToAddWrongProp)(propositions, (Number(answer) + (0, randint_1.randint)(-3, 3, [0])).toString());
36
+ }
37
+ return (0, shuffle_1.shuffle)(propositions);
38
+ };
39
+ const isAnswerValid = (ans, { answer }) => {
40
+ return ans === answer;
41
+ };
42
+ exports.proportionalityTableCoefficient = {
43
+ id: "proportionalityTableCoefficient",
44
+ connector: "=",
45
+ label: "Calculer un coefficient de proportionnalité à partir d'un tableau",
46
+ levels: ["6ème", "5ème", "4ème", "3ème", "CAP", "2ndPro", "1rePro"],
47
+ isSingleStep: false,
48
+ sections: ["Proportionnalité"],
49
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getProportionalityTableCoefficient, nb),
50
+ qcmTimer: 60,
51
+ freeTimer: 60,
52
+ getPropositions,
53
+ isAnswerValid,
54
+ subject: "Mathématiques",
55
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"equationType3Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType3Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAiBlC;;GAEG;AACH,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAkDF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAevD,CAAC"}
1
+ {"version":3,"file":"equationType3Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType3Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAalC;;GAEG;AACH,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA2DF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAevD,CAAC"}
@@ -24,6 +24,10 @@ const getEquationType3ExerciseQuestion = () => {
24
24
  const answer = answerTree.toTex();
25
25
  const question = {
26
26
  instruction: `Résoudre : $${statementTree.toTex()}$`,
27
+ hint: "Isolez le terme $x$ dans la partie gauche de l'equation.",
28
+ correction: `Commencer par soustraire $${b}$ des deux côtés de l'équation pour
29
+ l'éliminer du côté gauche, ensuite, diviser les deux côtés de l'équation par
30
+ $${a}$ pour isoler $x$, ce qui donne : $ ${a}x = ${c}${b < 0 ? "+" + Math.abs(b) : "-" + Math.abs(b)} \\Leftrightarrow x=\\frac{${c}${b < 0 ? "+" + Math.abs(b) : "-" + Math.abs(b)}}{${a}} \\Leftrightarrow ${answer}$.`,
27
31
  startStatement: statementTree.toTex(),
28
32
  answer,
29
33
  keys: equationKeys_1.equationKeys,
@@ -1 +1 @@
1
- {"version":3,"file":"equaDiffGeneralForme.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/equaDiff/equaDiffGeneralForme.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA8DF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAajE,CAAC"}
1
+ {"version":3,"file":"equaDiffGeneralForme.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/equaDiff/equaDiffGeneralForme.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA6EF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAajE,CAAC"}
@@ -6,18 +6,25 @@ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQues
6
6
  const randint_1 = require("../../../math/utils/random/randint");
7
7
  const expNode_1 = require("../../../tree/nodes/functions/expNode");
8
8
  const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
9
+ const variableNode_1 = require("../../../tree/nodes/variables/variableNode");
9
10
  const equalNode_1 = require("../../../tree/nodes/equations/equalNode");
10
11
  const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
11
- const variableNode_1 = require("../../../tree/nodes/variables/variableNode");
12
12
  const shuffle_1 = require("../../../utils/shuffle");
13
+ const substractNode_1 = require("../../../tree/nodes/operators/substractNode");
13
14
  const getExponentialEquation = () => {
14
15
  const a = (0, randint_1.randint)(-19, 20, [0]);
15
16
  const equation = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new variableNode_1.VariableNode("y"));
16
17
  const answer = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y"), new multiplyNode_1.MultiplyNode(new variableNode_1.VariableNode("C"), new expNode_1.ExpNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new variableNode_1.VariableNode("x"))))).toTex();
18
+ const correctionequation = new equalNode_1.EqualNode(new substractNode_1.SubstractNode(new variableNode_1.VariableNode("y'"), new multiplyNode_1.MultiplyNode(a.toTree(), new variableNode_1.VariableNode("y"))).simplify(), new numberNode_1.NumberNode(0)).toTex();
19
+ const hint = "Rappelez-vous que la solution générale d'une équation différentielle de la forme $y' = ay$ est de la forme $y = Ce^{ax}$, où $C$ est une constante d'intégration.";
20
+ const correction = `La solution est $y = Ce^{ax}$, où $C$ est une constante d'intégration.
21
+ \n Donc, la solution générale de l'équation différentielle $y' = ${a}y$ est $y = Ce^{${a}x}$.`;
17
22
  const question = {
18
23
  instruction: `Résoudre l'équation différentielle suivante : $y' = ${equation.toTex()}$.`,
19
24
  startStatement: `y(x)`,
20
25
  answer,
26
+ hint,
27
+ correction,
21
28
  keys: ["x", "y", "epower", "exp", "C", "equal"],
22
29
  answerFormat: "tex",
23
30
  identifiers: { a },
@@ -1 +1 @@
1
- {"version":3,"file":"log10PowerSimplifying.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/logarithm/log10PowerSimplifying.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAsCF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAevD,CAAC"}
1
+ {"version":3,"file":"log10PowerSimplifying.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/logarithm/log10PowerSimplifying.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAmDF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAevD,CAAC"}
@@ -20,6 +20,8 @@ const getLog10PowerSimplifyingQuestion = () => {
20
20
  const question = {
21
21
  answer,
22
22
  instruction: `Calculer : $${new log10Node_1.Log10Node(nb).toTex()}$`,
23
+ hint: getHint(nb),
24
+ correction: getCorrection(tenthPower, nb),
23
25
  keys: [],
24
26
  answerFormat: "tex",
25
27
  identifiers: { tenthPower, nbTex: nb.toTex() },
@@ -36,6 +38,16 @@ const getPropositions = (n, { answer, tenthPower }) => {
36
38
  (0, exercise_1.tryToAddWrongProp)(propositions, tenthPower - 2 + "");
37
39
  return (0, exercise_1.shuffleProps)(propositions, n);
38
40
  };
41
+ const getHint = (nb) => {
42
+ return `Pour calculer $log(⁡${nb.toTex()})$, il est utile de transformer le nombre $${nb.toTex()}$ en une puissance de $10$.`;
43
+ };
44
+ const getCorrection = (tenthPower, nb) => {
45
+ const powerTen = new powerNode_1.PowerNode((10).toTree(), tenthPower.toTree());
46
+ return `1 . Exprimez $${nb.toTex()}$ en puissance de $10$ : $${powerTen.toTex()}$ \n
47
+ 2 . Utilisez la propriété des logarithmes qui stipule que $log(a^{b}) = b*log(a) \\Leftrightarrow \\log(${powerTen.toTex()}) = ${tenthPower}*log(10)
48
+ \\Leftrightarrow log(${nb.toTex()}) = ${tenthPower}$.
49
+ `;
50
+ };
39
51
  const isAnswerValid = (ans, { answer, tenthPower }) => {
40
52
  return ans === answer;
41
53
  };
@@ -1 +1 @@
1
- {"version":3,"file":"scalarProductViaCoords.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/scalarProductViaCoords.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AA8CF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
1
+ {"version":3,"file":"scalarProductViaCoords.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/scalarProductViaCoords.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAgDF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
@@ -23,6 +23,8 @@ const getScalarProductViaCoordsQuestion = () => {
23
23
  uCoords: [u.x.toTex(), u.y.toTex()],
24
24
  vCoords: [v.x.toTex(), v.y.toTex()],
25
25
  },
26
+ hint: "Rappelez-vous que le produit scalaire de deux vecteurs se calcule en multipliant les coordonnées correspondantes et en additionnant les résultats.",
27
+ correction: `Le produit scalaire de $${u.toTex()}$ et $${v.toTex()}$ est calculé comme suit : $(${u.x.toTex()} \\times ${v.x.toTex()}) + (${u.y.toTex()} \\times ${v.y.toTex()}) = ${answer}$.`,
26
28
  };
27
29
  return question;
28
30
  };
@@ -6,4 +6,5 @@ export * from "./reciprocalPercentage";
6
6
  export * from "./percentToDecimal";
7
7
  export * from "./valuePercent";
8
8
  export * from "./findProportion";
9
+ export * from "./isTableProportional";
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC"}
@@ -22,3 +22,4 @@ __exportStar(require("./reciprocalPercentage"), exports);
22
22
  __exportStar(require("./percentToDecimal"), exports);
23
23
  __exportStar(require("./valuePercent"), exports);
24
24
  __exportStar(require("./findProportion"), exports);
25
+ __exportStar(require("./isTableProportional"), exports);
@@ -0,0 +1,5 @@
1
+ import { Exercise } from "../../../exercises/exercise";
2
+ type Identifiers = {};
3
+ export declare const isTableProportional: Exercise<Identifiers>;
4
+ export {};
5
+ //# sourceMappingURL=isTableProportional.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isTableProportional.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/isTableProportional.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG,EAAE,CAAC;AAkEtB,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAerD,CAAC"}
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isTableProportional = 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 coinFlip_1 = require("../../../utils/coinFlip");
8
+ const getIsTableProportionalQuestion = () => {
9
+ const table = generateTable();
10
+ const question = {
11
+ answer: table.coeff ? "Oui" : "Non",
12
+ instruction: `On considere le tableau ci-dessous, est-il proportionnel ?${table.table}`,
13
+ keys: [],
14
+ answerFormat: "raw",
15
+ style: { tableHasNoHeader: true },
16
+ identifiers: {},
17
+ };
18
+ return question;
19
+ };
20
+ const getPropositions = (n, { answer }) => {
21
+ const propositions = [];
22
+ (0, exercise_1.addValidProp)(propositions, answer, "raw");
23
+ (0, exercise_1.tryToAddWrongProp)(propositions, "Oui", "raw");
24
+ (0, exercise_1.tryToAddWrongProp)(propositions, "Non", "raw");
25
+ (0, exercise_1.tryToAddWrongProp)(propositions, "On peut pas savoir", "raw");
26
+ return (0, exercise_1.shuffleProps)(propositions, n);
27
+ };
28
+ const isAnswerValid = (ans, { answer }) => {
29
+ return ans === answer;
30
+ };
31
+ const generateTable = () => {
32
+ const xValues = [(0, randint_1.randint)(1, 11)];
33
+ while (xValues.length < 3) {
34
+ let lastNb = xValues[xValues.length - 1];
35
+ let random = (0, randint_1.randint)(lastNb, lastNb + 11, [...xValues]);
36
+ xValues.push(random);
37
+ }
38
+ const yValues = generateYValues(xValues);
39
+ return {
40
+ table: `
41
+ |${xValues.map((value) => `$${value}$`).join("|")}|
42
+ |-|-|-|
43
+ |${yValues.values.map((value) => `$${value}$`).join("|")}|
44
+ `,
45
+ coeff: yValues.coeff,
46
+ };
47
+ };
48
+ const generateYValues = (xValues) => {
49
+ const flip = (0, coinFlip_1.coinFlip)();
50
+ const coeff = (0, randint_1.randint)(1, 5);
51
+ return flip
52
+ ? {
53
+ values: xValues.map((value) => value * (0, randint_1.randint)(2, 5)),
54
+ }
55
+ : {
56
+ values: xValues.map((value) => value * coeff),
57
+ coeff,
58
+ };
59
+ };
60
+ exports.isTableProportional = {
61
+ id: "isVTableProportional",
62
+ label: "Reconnaître si 2 grandeurs sont proportionnelles à partir d'un tableau.",
63
+ levels: ["5ème"],
64
+ isSingleStep: true,
65
+ sections: ["Proportionnalité"],
66
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getIsTableProportionalQuestion, nb),
67
+ qcmTimer: 60,
68
+ freeTimer: 60,
69
+ getPropositions,
70
+ isAnswerValid,
71
+ answerType: "QCM",
72
+ subject: "Mathématiques",
73
+ };
@@ -89,7 +89,7 @@ const generateType16Instruction = (a, b, op) => {
89
89
  const generateType17Instruction = (a, b, op) => {
90
90
  const instruction = `Qu’affichera le programme suivant, si l'utilisateur entre ${a} ?
91
91
  \`\`\`
92
- a=input("Entrez un entiel naturel non nul.")
92
+ a=input("Entrez un entier naturel non nul.")
93
93
  a=int(a)
94
94
  n=1
95
95
  while n<=a:
@@ -1 +1 @@
1
- {"version":3,"file":"trigonometrySideCalcul.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/trigonometrySideCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AA4FF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAexD,CAAC"}
1
+ {"version":3,"file":"trigonometrySideCalcul.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/trigonometrySideCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAiNF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAexD,CAAC"}
@@ -54,6 +54,8 @@ const getTrigonometrySideCalcul = () => {
54
54
  const question = {
55
55
  instruction: `Le triangle $${triangle.getTriangleName()}$ rectangle en $${triangle.getRightAngle()}$ est tel que $${sides[randSide]} = ${(sideLengths[randSide] + "").replace(".", ",")}$ cm et $\\widehat{${angle[randAngle]}} = ${(angleValue[randAngle] + "").replace(".", ",")}^\\circ$. Calculer $${sides[randSideQuestion]}$ à $0,1$ cm près.`,
56
56
  answer,
57
+ hint: getHint(sides, angle[randAngle]),
58
+ correction: getCorrection(sides, sideLengths, randSideQuestion, randSide, angle[randAngle], angleValue[randAngle], answer),
57
59
  keys: [],
58
60
  commands: ggb.commands,
59
61
  options: ggb.getOptions(),
@@ -71,6 +73,74 @@ const getPropositions = (n, { answer }) => {
71
73
  }
72
74
  return (0, shuffle_1.shuffle)(propositions);
73
75
  };
76
+ const getHint = (sides, angle) => {
77
+ const hypothenus = sides[2];
78
+ const adjacent = sides.filter((value) => value !== hypothenus &&
79
+ [value.charAt(0), value.charAt(1)].includes(angle))[0];
80
+ const opposite = sides.filter((value) => value !== hypothenus && value !== adjacent[0])[0];
81
+ return `Identifier le côté opposé, le côté adjacent et l'hypoténuse, puis utiliesr la bonne formule de trigonométrie.`;
82
+ };
83
+ const getCorrection = (sides, sideLengths, randSideQuestion, randSide, angle, angleValue, answer) => {
84
+ const hypothenus = { name: sides[2], length: sideLengths[2] };
85
+ const sidesWithLentgh = sides.map((value, index) => {
86
+ return { name: value, length: sideLengths[index] };
87
+ });
88
+ const adjacent = sidesWithLentgh.filter((value) => value.name !== hypothenus.name &&
89
+ [value.name.charAt(0), value.name.charAt(1)].includes(angle))[0];
90
+ const opposite = sidesWithLentgh.filter((value) => value.name !== hypothenus.name && value.name !== adjacent.name)[0];
91
+ const correctEquations = getCorrectEquations({ name: sides[randSideQuestion], length: sideLengths[randSideQuestion] }, { name: sides[randSide], length: sideLengths[randSide] }, hypothenus, { name: angle, value: angleValue }, adjacent, opposite, answer);
92
+ return `On utilise la relation $${correctEquations[0]}$, on a donc :
93
+ $${correctEquations[1]} \\Leftrightarrow ${correctEquations[2]} \\Leftrightarrow ${correctEquations[3]}$ `;
94
+ };
95
+ const getCorrectEquations = (randSideQuestion, randSide, hypothenus, angle, adjacent, opposite, answer) => {
96
+ let result;
97
+ switch (randSideQuestion.name) {
98
+ case adjacent.name:
99
+ result =
100
+ randSide.name === opposite.name
101
+ ? [
102
+ `\\tan(\\widehat{${angle.name}})=\\frac{${opposite.name}}{${adjacent.name}}`,
103
+ `\\tan(\\widehat{${angle.value}})=\\frac{${opposite.length}}{${adjacent.name}}`,
104
+ `\\frac{${opposite.length}}{\\tan(\\widehat{${angle.value}})}=${adjacent.name}`,
105
+ ]
106
+ : [
107
+ `\\cos(\\widehat{${angle.name}})=\\frac{${adjacent.name}}{${hypothenus.name}}`,
108
+ `\\cos(\\widehat{${angle.value}})=\\frac{${adjacent.name}}{${hypothenus.length}}`,
109
+ `\\cos(\\widehat{${angle.value}})*${hypothenus.length}=${adjacent.name}`,
110
+ ];
111
+ return result.concat(`${answer}=${adjacent.name}`);
112
+ case opposite.name:
113
+ result =
114
+ randSide.name === adjacent.name
115
+ ? [
116
+ `\\tan(\\widehat{${angle.name}})=\\frac{${opposite.name}}{${adjacent.name}}`,
117
+ `\\tan(\\widehat{${angle.value}})=\\frac{${opposite.name}}{${adjacent.length}}`,
118
+ `\\tan(\\widehat{${angle.value}})*${adjacent.length}=${opposite.name}`,
119
+ ]
120
+ : [
121
+ `\\sin(\\widehat{${angle.name}})=\\frac{${opposite.name}}{${hypothenus.name}}`,
122
+ `\\sin(\\widehat{${angle.value}})=\\frac{${opposite.name}}{${hypothenus.length}}`,
123
+ `\\sin(\\widehat{${angle.value}})*${hypothenus.length}=${opposite.name}`,
124
+ ];
125
+ return result.concat(`${answer}=${opposite.name}`);
126
+ case hypothenus.name:
127
+ result =
128
+ randSide.name === adjacent.name
129
+ ? [
130
+ `\\cos(\\widehat{${angle.name}})=\\frac{${adjacent.name}}{${hypothenus.name}}`,
131
+ `\\cos(\\widehat{${angle.value}})=\\frac{${adjacent.length}}{${hypothenus.name}}`,
132
+ `\\frac{${adjacent.length}}{\\cos(${angle.value})}=${hypothenus.name}`,
133
+ ]
134
+ : [
135
+ `\\sin(\\widehat{${angle.name}})=\\frac{${opposite.name}}{${hypothenus.name}}`,
136
+ `\\sin(\\widehat{${angle.value}})=\\frac{${opposite.length}}{${hypothenus.name}}`,
137
+ `\\frac{${opposite.length}}{\\sin(${angle.value})}=${hypothenus.name}`,
138
+ ];
139
+ return result.concat(`${answer}=${hypothenus.name}`);
140
+ default:
141
+ return [];
142
+ }
143
+ };
74
144
  const isAnswerValid = (ans, { answer }) => {
75
145
  const answerTree = new numberNode_1.NumberNode(Number(answer.replace(",", ".")));
76
146
  const texs = answerTree.toAllValidTexs();
@@ -1 +1 @@
1
- {"version":3,"file":"findAtomicStructureElement.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalElements/findAtomicStructureElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAKtE,KAAK,sBAAsB,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;AAQhE,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,WAAW,CAAC;IACxB,aAAa,EAAE,sBAAsB,CAAC;CACvC,CAAC;AAiEF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAa5D,CAAC"}
1
+ {"version":3,"file":"findAtomicStructureElement.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalElements/findAtomicStructureElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAKtE,KAAK,sBAAsB,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;AAQhE,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,WAAW,CAAC;IACxB,aAAa,EAAE,sBAAsB,CAAC;CACvC,CAAC;AAoFF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAa5D,CAAC"}
@@ -27,6 +27,8 @@ const getFindAtomicStructureElementQuestion = () => {
27
27
  const question = {
28
28
  answer: `${answer}`,
29
29
  instruction,
30
+ hint: getHint(elementToFind),
31
+ correction: getCorrection(elementToFind, protonsNumber, neutronsNumber),
30
32
  keys: [],
31
33
  answerFormat: "tex",
32
34
  identifiers: { atomSymbol: atom.symbole, elementToFind },
@@ -53,6 +55,16 @@ const getPropositions = (n, { answer, atomSymbol, elementToFind }) => {
53
55
  const isAnswerValid = (ans, { answer }) => {
54
56
  return ans === answer;
55
57
  };
58
+ const getHint = (elementToFind) => {
59
+ return elementToFind === "proton"
60
+ ? `Pour déterminer le nombre de protons d'un atome, vous pouvez utiliser l'écriture conventionnelle du noyau atomique.`
61
+ : `On rapelle que : Nombre de neutrons $= A - Z$.`;
62
+ };
63
+ const getCorrection = (elementToFind, protonNb, neutronNb) => {
64
+ return elementToFind === "proton"
65
+ ? `Le nombre de proton est égal à : $${protonNb}$`
66
+ : `Le nombre de neutron est égal à : $A - Z=${neutronNb}$`;
67
+ };
56
68
  exports.findAtomicStructureElement = {
57
69
  id: "findAtomicStructureElement",
58
70
  label: "Trouver le nombre de protons, neutrons ou électrons d'un atome",
@@ -1 +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"}
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;AA6EF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAa9D,CAAC"}
@@ -9,11 +9,18 @@ const getCalculateSynthesisEfficiencyQuestion = () => {
9
9
  const maxQuantity = (0, randfloat_1.randfloat)(0.2, 0.6, 2);
10
10
  const productQuantity = (0, randfloat_1.randfloat)(maxQuantity / 2, maxQuantity * 0.9, 2);
11
11
  const efficiency = (0, round_1.round)(productQuantity / maxQuantity, 2);
12
+ const 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.
13
+ Calculer le rendement.`;
14
+ const hint = "Le rendement est calculé en utilisant la formule : $R = \\frac{n_{produit}}{n_{max}}$, où $n_{produit}$ est la quantité de produit obtenue et $n_{max}$ est la quantité maximale attendue.";
15
+ const correction = `Pour calculer le rendement :
16
+ \n1. La quantité maximale de produit attendue est $${(0, round_1.roundSignificant)(maxQuantity, 2)}\\ \\text{mol}$.
17
+ \n2. La quantité de produit effectivement obtenue est $${(0, round_1.roundSignificant)(productQuantity, 2)}\\ \\text{mol}$.
18
+ \n3. Le rendement est donné par $R = \\frac{n_{produit}}{n_{max}} = \\frac{${(0, round_1.roundSignificant)(productQuantity, 2)}}{${(0, round_1.roundSignificant)(maxQuantity, 2)}} = ${(0, round_1.roundSignificant)(efficiency, 2)}$.`;
12
19
  const question = {
13
20
  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
- `,
21
+ instruction,
22
+ hint,
23
+ correction,
17
24
  keys: [],
18
25
  answerFormat: "tex",
19
26
  identifiers: { maxQuantity, productQuantity },
@@ -25,10 +32,10 @@ const getPropositions = (n, { answer, maxQuantity, productQuantity }) => {
25
32
  (0, exercise_1.addValidProp)(propositions, answer);
26
33
  const wrongDivision = maxQuantity / productQuantity;
27
34
  const multiplied = maxQuantity * productQuantity;
28
- const substracted = maxQuantity - productQuantity;
35
+ const subtracted = maxQuantity - productQuantity;
29
36
  (0, exercise_1.tryToAddWrongProp)(propositions, `${(0, round_1.roundSignificant)(wrongDivision, 2)}`);
30
37
  (0, exercise_1.tryToAddWrongProp)(propositions, `${(0, round_1.roundSignificant)(multiplied, 2)}`);
31
- (0, exercise_1.tryToAddWrongProp)(propositions, `${(0, round_1.roundSignificant)(substracted, 2)}`);
38
+ (0, exercise_1.tryToAddWrongProp)(propositions, `${(0, round_1.roundSignificant)(subtracted, 2)}`);
32
39
  while (propositions.length < n) {
33
40
  (0, exercise_1.tryToAddWrongProp)(propositions, `${(0, round_1.roundSignificant)((0, randfloat_1.randfloat)(0, 5), 2)}`);
34
41
  }
@@ -1 +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"}
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;AASlC,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"}
@@ -1 +1 @@
1
- {"version":3,"file":"pH.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/pH.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAwCF,eAAO,MAAM,EAAE,EAAE,QAAQ,CAAC,WAAW,CAapC,CAAC"}
1
+ {"version":3,"file":"pH.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/pH.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAkDF,eAAO,MAAM,EAAE,EAAE,QAAQ,CAAC,WAAW,CAapC,CAAC"}
@@ -13,10 +13,17 @@ const getpH = () => {
13
13
  const concentrationHydrogene = randomNumber * 10 ** -randomTenPower;
14
14
  const instruction = `Calculer le pH d'une solution ayant une concentration en ions hydrogène ($H^+$) de $${randomNumber} \\times 10^{-${randomTenPower}}$ mol/L.`;
15
15
  const answer = (0, frenchify_1.frenchify)((0, round_1.round)(-Math.log10(concentrationHydrogene), 1));
16
+ const hint = "Utilisez la formule du pH : $\\text{pH} = -\\log[H^+]$.";
17
+ const correction = `Pour calculer le pH, on utilise la formule $\\text{pH} = -\\log[H^+]$ :
18
+ \n1. La concentration en ions hydrogène est $${randomNumber} \\times 10^{-${randomTenPower}}$ mol/L.
19
+ \n2. En appliquant la formule, on obtient $\\text{pH} = -\\log(${randomNumber} \\times 10^{-${randomTenPower}})$.
20
+ \n3. Le résultat est $${answer}$.`;
16
21
  const question = {
17
22
  instruction,
18
23
  startStatement: `pH`,
19
24
  answer,
25
+ hint,
26
+ correction,
20
27
  keys: ["log"],
21
28
  answerFormat: "tex",
22
29
  identifiers: { randomNumber, randomTenPower },
@@ -1 +1 @@
1
- {"version":3,"file":"periodicWaveCelerity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/waves/periodicWaveCelerity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA4EF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CActD,CAAC"}
1
+ {"version":3,"file":"periodicWaveCelerity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/waves/periodicWaveCelerity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAoGF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CActD,CAAC"}
@@ -6,13 +6,15 @@ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQues
6
6
  const randfloat_1 = require("../../../math/utils/random/randfloat");
7
7
  const round_1 = require("../../../math/utils/round");
8
8
  const random_1 = require("../../../utils/random");
9
- // v = lambda / t
9
+ // v = lambda / T
10
10
  const getPeriodicWaveCelerityQuestion = () => {
11
11
  const varAsked = (0, random_1.random)(["v", "T", "l"]);
12
12
  let v;
13
13
  let T;
14
14
  let l;
15
15
  let instruction = "";
16
+ let hint = "";
17
+ let correction = "";
16
18
  let answer = "";
17
19
  switch (varAsked) {
18
20
  case "v":
@@ -20,6 +22,8 @@ const getPeriodicWaveCelerityQuestion = () => {
20
22
  l = (0, randfloat_1.randfloat)(1, 10, 1);
21
23
  v = (0, round_1.round)(l / T, 1);
22
24
  instruction = `Une onde périodique a une longueur d'onde de $${(0, round_1.roundSignificant)(l, 1)}\\ \\text{m}$ et une période de $${(0, round_1.roundSignificant)(T, 1)}\\ \\text{s}$. Quelle est sa célérité ?`;
25
+ hint = "Utilisez la formule de la célérité: $v = \\frac{\\lambda}{T}$";
26
+ correction = `La célérité est donnée par $v = \\frac{\\lambda}{T} = \\frac{${(0, round_1.roundSignificant)(l, 1)}}{${(0, round_1.roundSignificant)(T, 1)}} = ${(0, round_1.roundSignificant)(v, 1)}$.`;
23
27
  answer = (0, round_1.roundSignificant)(v, 1);
24
28
  break;
25
29
  case "T":
@@ -27,6 +31,8 @@ const getPeriodicWaveCelerityQuestion = () => {
27
31
  v = (0, randfloat_1.randfloat)(1, 10, 1);
28
32
  T = (0, round_1.round)(l / v, 1);
29
33
  instruction = `Une onde périodique a une longueur d'onde de $${(0, round_1.roundSignificant)(l, 1)}\\ \\text{m}$ et une célérité de $${(0, round_1.roundSignificant)(v, 1)}\\ \\text{m}\\cdot\\text{s}^{-1}$. Quelle est sa période ?`;
34
+ hint = "Utilisez la formule de la période: $T = \\frac{\\lambda}{v}$";
35
+ correction = `La période est donnée par $T = \\frac{\\lambda}{v} = \\frac{${(0, round_1.roundSignificant)(l, 1)}}{${(0, round_1.roundSignificant)(v, 1)}} = ${(0, round_1.roundSignificant)(T, 1)}$.`;
30
36
  answer = (0, round_1.roundSignificant)(T, 1);
31
37
  break;
32
38
  case "l":
@@ -35,12 +41,17 @@ const getPeriodicWaveCelerityQuestion = () => {
35
41
  T = (0, randfloat_1.randfloat)(1, 10, 1);
36
42
  l = (0, round_1.round)(v * T, 1);
37
43
  instruction = `Une onde périodique a une période de $${(0, round_1.roundSignificant)(T, 1)}\\ \\text{m}$ et une célérité de $${(0, round_1.roundSignificant)(v, 1)}\\ \\text{m}\\cdot\\text{s}^{-1}$. Quelle est sa longueur d'onde ?`;
38
- answer = (0, round_1.roundSignificant)(T, 1);
44
+ hint =
45
+ "Utilisez la formule de la longueur d'onde: $\\lambda = v \\times T$";
46
+ correction = `La longueur d'onde est donnée par $\\lambda = v \\times T = ${(0, round_1.roundSignificant)(v, 1)} \\times ${(0, round_1.roundSignificant)(T, 1)} = ${(0, round_1.roundSignificant)(l, 1)}$.`;
47
+ answer = (0, round_1.roundSignificant)(l, 1);
39
48
  break;
40
49
  }
41
50
  const question = {
42
51
  answer,
43
52
  instruction,
53
+ hint,
54
+ correction,
44
55
  keys: [],
45
56
  answerFormat: "tex",
46
57
  identifiers: { v, T, l },
@@ -1 +1 @@
1
- {"version":3,"file":"weightOnTheMoon.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/weight/weightOnTheMoon.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AA+DF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC"}
1
+ {"version":3,"file":"weightOnTheMoon.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/weight/weightOnTheMoon.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AA+FF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC"}
@@ -26,6 +26,9 @@ const getWeightOnTheMoonQuestion = () => {
26
26
 
27
27
  Données : $g_T = ${gt.toTex()}\\ ${gravity_1.earthGravity.unit}$ , $g_L = ${gl.toTex()}\\ ${gravity_1.moonGravity.unit}$
28
28
  `,
29
+ //hint: ` Pour calculer la masse de l'objet sur Terre, utiliser la formule : $m=\\frac{p_T}{g_T}$`,
30
+ hint: "On rappelle que : $m=\\frac{p_T}{g_T}$ et $m=\\frac{p_L}{g_L}$",
31
+ correction: getCorrection(origin, weight, answer, gt, gl),
29
32
  keys: ["N"],
30
33
  answerFormat: "tex",
31
34
  identifiers: { weight, originIsMoon },
@@ -45,6 +48,20 @@ const getPropositions = (n, { answer, originIsMoon, weight }) => {
45
48
  }
46
49
  return (0, exercise_1.shuffleProps)(propositions, n);
47
50
  };
51
+ const getCorrection = (origin, weight, answer, gt, gl) => {
52
+ switch (origin) {
53
+ case "Terre":
54
+ return `1 . Trouver la masse de l'objet en utilisant son poids sur Terre $p_T$ et l'accélération due à la gravité terrestre $g_T$ : \n $m = \\frac{p_T}{g_T} \\Leftrightarrow m=${(0, round_1.round)(weight / gt.evaluate(), 1)}$. \n \\
55
+ 2 . Utiliser la masse trouvée et l'accélération due à la gravité sur la Lune $g_L$ pour calculer le poids sur la Lune $p_L$ : $p_L = m \\ \\cdot g_L \\Leftrightarrow$ $p_L = ${(0, frenchify_1.frenchify)(answer)}$.`;
56
+ case "Lune":
57
+ return `1 . Trouver la masse de l'objet en utilisant son poids sur la Lune $p_L$ et l'accélération due à la gravité luanire $g_L$ :
58
+ $m = \\frac{p_L}{g_L} \\Leftrightarrow m=${(0, round_1.round)(weight / gl.evaluate(), 1)}$. \n \\
59
+ 2 . Utiliser la masse trouvée et l'accélération due à la gravité sur la Terre $g_T$ pour calculer le poids sur la Terre $p_T$ :
60
+ $p_T = m \\ \\cdot g_T \\Leftrightarrow p_T = ${(0, frenchify_1.frenchify)(answer)}$.`;
61
+ default:
62
+ return "";
63
+ }
64
+ };
48
65
  const isAnswerValid = (ans, { answer }) => {
49
66
  return [answer, answer.replace("N", "")].includes(ans);
50
67
  };
package/lib/index.d.ts CHANGED
@@ -121,6 +121,9 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
121
121
  x2: string | number;
122
122
  x3: string | number;
123
123
  x4: string | number;
124
+ }> | import("./exercises/exercise").Exercise<{
125
+ xValues: number[];
126
+ yValues: number[];
124
127
  }> | import("./exercises/exercise").Exercise<{
125
128
  precisionAsked: number;
126
129
  decimal: number;
@@ -955,7 +958,7 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
955
958
  }> | import("./exercises/exercise").Exercise<{
956
959
  total: number;
957
960
  lefties: number;
958
- }> | import("./exercises/exercise").Exercise<{
961
+ }> | import("./exercises/exercise").Exercise<{}> | import("./exercises/exercise").Exercise<{
959
962
  int: number;
960
963
  power: number;
961
964
  }> | import("./exercises/exercise").Exercise<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,aAAa,CAAC;QAC5B,SAAS,EAAE,MAAM,MAAM,CAAC;QACxB,YAAY,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,aAAa,CAAC;KACpD;CACF;AAcD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BE;AAEF,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAjCnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA+BE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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3B,QAAQ;IAGR,YAAY;IAIZ,OAAO;IAIP,WAAW;IAIX,iBAAiB;IA4CjB,gBAAgB;IAsBhB,SAAS;IAIT,SAAS;IAYT,QAAQ;CAkCT"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "math-exercises",
3
- "version": "2.1.16",
3
+ "version": "2.1.17",
4
4
  "description": "Math exercises generator for middle school and high school",
5
5
  "main": "lib/index.js",
6
6
  "files": [