math-exercises 2.2.5 → 2.2.7
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/math/calcul/addAndSub.js +1 -1
- package/lib/exercises/math/calcul/addAndSubWithoutRelatives.js +1 -1
- package/lib/exercises/math/calcul/digitDecimalRank.d.ts.map +1 -1
- package/lib/exercises/math/calcul/digitDecimalRank.js +2 -3
- package/lib/exercises/math/calcul/digitDecimalRankNumber.d.ts +8 -0
- package/lib/exercises/math/calcul/digitDecimalRankNumber.d.ts.map +1 -0
- package/lib/exercises/math/calcul/digitDecimalRankNumber.js +59 -0
- package/lib/exercises/math/calcul/digitRank.d.ts.map +1 -1
- package/lib/exercises/math/calcul/digitRank.js +2 -3
- package/lib/exercises/math/calcul/digitRankNumber.d.ts.map +1 -1
- package/lib/exercises/math/calcul/digitRankNumber.js +3 -5
- package/lib/exercises/math/calcul/index.d.ts +1 -0
- package/lib/exercises/math/calcul/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/index.js +1 -0
- package/lib/exercises/math/calcul/mentalCaluls/index.d.ts +2 -0
- package/lib/exercises/math/calcul/mentalCaluls/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/index.js +2 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSub.js +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.d.ts +7 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.d.ts.map +1 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.js +71 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.js +25 -17
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.d.ts +7 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.d.ts.map +1 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.js +93 -0
- package/lib/exercises/math/calcul/operations/expressionNature.d.ts +1 -0
- package/lib/exercises/math/calcul/operations/expressionNature.d.ts.map +1 -0
- package/lib/exercises/math/calcul/operations/expressionNature.js +81 -0
- package/lib/exercises/math/functions/basics/inverseImageFunctionTable.d.ts +2 -0
- package/lib/exercises/math/functions/basics/inverseImageFunctionTable.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/inverseImageFunctionTable.js +46 -66
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.js +1 -1
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.js +1 -1
- package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts +4 -1
- package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/placeAPoint.js +1 -1
- package/lib/exercises/math/percent/averageEvolutionRate.d.ts.map +1 -1
- package/lib/exercises/math/percent/averageEvolutionRate.js +16 -0
- package/lib/exercises/math/percent/cmToEvolution.d.ts +7 -0
- package/lib/exercises/math/percent/cmToEvolution.d.ts.map +1 -0
- package/lib/exercises/math/percent/cmToEvolution.js +70 -0
- package/lib/exercises/math/percent/evolutionToCM.d.ts +0 -1
- package/lib/exercises/math/percent/evolutionToCM.d.ts.map +1 -1
- package/lib/exercises/math/percent/evolutionToCM.js +20 -24
- package/lib/exercises/math/percent/findProportion.d.ts.map +1 -1
- package/lib/exercises/math/percent/findProportion.js +15 -0
- package/lib/exercises/math/percent/globalPercent.d.ts.map +1 -1
- package/lib/exercises/math/percent/globalPercent.js +14 -0
- package/lib/exercises/math/percent/index.d.ts +1 -0
- package/lib/exercises/math/percent/index.d.ts.map +1 -1
- package/lib/exercises/math/percent/index.js +1 -0
- package/lib/exercises/math/percent/isTableProportional.d.ts.map +1 -1
- package/lib/exercises/math/percent/isTableProportional.js +35 -33
- package/lib/exercises/math/percent/percentToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/percent/percentToDecimal.js +14 -0
- package/lib/exercises/math/percent/reciprocalPercentage.d.ts.map +1 -1
- package/lib/exercises/math/percent/reciprocalPercentage.js +18 -0
- package/lib/exercises/math/percent/valuePercent.d.ts.map +1 -1
- package/lib/exercises/math/percent/valuePercent.js +7 -0
- package/lib/exercises/math/powers/powersProduct.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersProduct.js +22 -0
- package/lib/exercises/math/probaStat/expectedValueOfBinomialProba.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/expectedValueOfBinomialProba.js +14 -2
- package/lib/exercises/math/probaStat/probaFromTableNoContext.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/probaFromTableNoContext.js +5 -4
- package/lib/exercises/math/probaStat/varianceOfBinomialProba.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/varianceOfBinomialProba.js +21 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +15 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.js +17 -0
- package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.js +13 -0
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.js +15 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.js +15 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.js +26 -1
- package/lib/exercises/math/suites/sequenceEvaluation.js +1 -1
- package/lib/exercises/math/suites/sequencePlot.d.ts.map +1 -1
- package/lib/exercises/math/suites/sequencePlot.js +10 -3
- package/lib/index.d.ts +48 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -0
- package/lib/math/geometry/spaceVector.d.ts +1 -0
- package/lib/math/geometry/spaceVector.d.ts.map +1 -1
- package/lib/math/geometry/spaceVector.js +3 -0
- package/lib/math/polynomials/trinom.js +2 -2
- package/lib/math/utils/random/randTupleInt.d.ts +1 -0
- package/lib/math/utils/random/randTupleInt.d.ts.map +1 -1
- package/lib/math/utils/random/randTupleInt.js +5 -1
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +2 -13
- package/lib/server.d.ts +1 -0
- package/lib/server.d.ts.map +1 -1
- package/lib/server.js +6 -2
- package/lib/utils/numberPrototype/toSeparatedThousands.d.ts +2 -0
- package/lib/utils/numberPrototype/toSeparatedThousands.d.ts.map +1 -0
- package/lib/utils/numberPrototype/toSeparatedThousands.js +12 -0
- package/package.json +1 -1
|
@@ -51,7 +51,7 @@ const isAnswerValid = (studentAns, { answer }) => {
|
|
|
51
51
|
exports.addAndSubExercise = {
|
|
52
52
|
id: "addAndSub",
|
|
53
53
|
connector: "=",
|
|
54
|
-
label: "Additions et soustractions",
|
|
54
|
+
label: "Additions et soustractions de nombres entiers",
|
|
55
55
|
levels: ["6ème", "5ème"],
|
|
56
56
|
sections: ["Calculs"],
|
|
57
57
|
isSingleStep: true,
|
|
@@ -61,7 +61,7 @@ const isAnswerValid = (studentAns, { answer }) => {
|
|
|
61
61
|
exports.addAndSubWithoutRelatives = {
|
|
62
62
|
id: "addAndSubWithoutRelatives",
|
|
63
63
|
connector: "=",
|
|
64
|
-
label: "Additions et soustractions
|
|
64
|
+
label: "Additions et soustractions de nombres entiers (sans relatifs)",
|
|
65
65
|
levels: ["6ème", "5ème"],
|
|
66
66
|
sections: ["Calculs"],
|
|
67
67
|
isSingleStep: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"digitDecimalRank.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/digitDecimalRank.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"digitDecimalRank.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/digitDecimalRank.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA0CF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC"}
|
|
@@ -5,6 +5,7 @@ const exercise_1 = require("../../../exercises/exercise");
|
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const decimal_1 = require("../../../math/numbers/decimals/decimal");
|
|
7
7
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
8
|
+
const toSeparatedThousands_1 = require("../../../utils/numberPrototype/toSeparatedThousands");
|
|
8
9
|
const ordinals = ["premier", "deuxième", "troisième", "quatrième"];
|
|
9
10
|
const getDigitDecimalRankQuestion = () => {
|
|
10
11
|
const decimalPartSize = (0, randint_1.randint)(2, 5);
|
|
@@ -15,9 +16,7 @@ const getDigitDecimalRankQuestion = () => {
|
|
|
15
16
|
const answer = decimalPartString[rankAsked];
|
|
16
17
|
const question = {
|
|
17
18
|
answer,
|
|
18
|
-
instruction: `Quel est le chiffre des ${rankAskedLabel} dans le nombre $${nb
|
|
19
|
-
.toTree()
|
|
20
|
-
.toTex()}$ ?`,
|
|
19
|
+
instruction: `Quel est le chiffre des ${rankAskedLabel} dans le nombre $${(0, toSeparatedThousands_1.toSeperatedThousands)(nb.toTree().toTex())}$ ?`,
|
|
21
20
|
keys: [],
|
|
22
21
|
answerFormat: "tex",
|
|
23
22
|
identifiers: { nb: nb.tex, rankAsked },
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"digitDecimalRankNumber.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/digitDecimalRankNumber.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAalC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAkDF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAexD,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.digitDecimalRankNumber = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const decimal_1 = require("../../../math/numbers/decimals/decimal");
|
|
7
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
8
|
+
const toSeparatedThousands_1 = require("../../../utils/numberPrototype/toSeparatedThousands");
|
|
9
|
+
const ordinals = ["premier", "deuxième", "troisième", "quatrième"];
|
|
10
|
+
const getDigitRankNumberQuestion = () => {
|
|
11
|
+
const decimalPartSize = (0, randint_1.randint)(2, 5);
|
|
12
|
+
const nb = decimal_1.DecimalConstructor.random(0, 1000, decimalPartSize);
|
|
13
|
+
const rankAsked = (0, randint_1.randint)(0, Math.min(decimalPartSize, 3));
|
|
14
|
+
const rankAskedLabel = decimal_1.decimalDigitRanks[rankAsked];
|
|
15
|
+
const str = nb.tex;
|
|
16
|
+
const answer = str.split(".")[0] + str.split(".")[1].substring(0, rankAsked + 1);
|
|
17
|
+
const question = {
|
|
18
|
+
answer,
|
|
19
|
+
instruction: `Quel est le nombre de ${rankAskedLabel} dans le nombre $${(0, toSeparatedThousands_1.toSeperatedThousands)(nb.toTree().toTex())}$ ?`,
|
|
20
|
+
keys: [],
|
|
21
|
+
// hint: `Attention ! On demande le 'nombre' et non pas le 'chiffre' !`,
|
|
22
|
+
// correction: `Le chiffre des ${rankAskedLabel} est le ${ordinals[rankAsked]} chiffre en partant de la droite. Donc le chiffre des ${rankAskedLabel} est $${answer}$.`,
|
|
23
|
+
answerFormat: "tex",
|
|
24
|
+
identifiers: { nb: nb.value, rankAsked },
|
|
25
|
+
};
|
|
26
|
+
return question;
|
|
27
|
+
};
|
|
28
|
+
const getPropositions = (n, { answer, nb, rankAsked }) => {
|
|
29
|
+
const propositions = [];
|
|
30
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
31
|
+
const str = nb.toString();
|
|
32
|
+
const [intPart, fracPart] = str.split(".");
|
|
33
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, fracPart[rankAsked]);
|
|
34
|
+
for (let i = 0; i < str.length; i++) {
|
|
35
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, intPart + fracPart.substring(0, i + 1));
|
|
36
|
+
}
|
|
37
|
+
while (propositions.length < n) {
|
|
38
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, randint_1.randint)(0, 100) + "");
|
|
39
|
+
}
|
|
40
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
41
|
+
};
|
|
42
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
43
|
+
return ans === answer;
|
|
44
|
+
};
|
|
45
|
+
exports.digitDecimalRankNumber = {
|
|
46
|
+
id: "digitDecimalRankNumber",
|
|
47
|
+
connector: "=",
|
|
48
|
+
label: "Déterminer le nombre de dixièmes, de centièmes...",
|
|
49
|
+
levels: [],
|
|
50
|
+
isSingleStep: true,
|
|
51
|
+
sections: [],
|
|
52
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getDigitRankNumberQuestion, nb),
|
|
53
|
+
qcmTimer: 60,
|
|
54
|
+
freeTimer: 60,
|
|
55
|
+
getPropositions,
|
|
56
|
+
isAnswerValid,
|
|
57
|
+
subject: "Mathématiques",
|
|
58
|
+
// hasHintAndCorrection: true,
|
|
59
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"digitRank.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/digitRank.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"digitRank.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/digitRank.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA0CF,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,WAAW,CAc3C,CAAC"}
|
|
@@ -5,6 +5,7 @@ const exercise_1 = require("../../../exercises/exercise");
|
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const integer_1 = require("../../../math/numbers/integer/integer");
|
|
7
7
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
8
|
+
const toSeparatedThousands_1 = require("../../../utils/numberPrototype/toSeparatedThousands");
|
|
8
9
|
const ordinals = ["premier", "deuxième", "troisième", "quatrième"];
|
|
9
10
|
const getDigitRankQuestion = () => {
|
|
10
11
|
const size = (0, randint_1.randint)(3, 6);
|
|
@@ -15,9 +16,7 @@ const getDigitRankQuestion = () => {
|
|
|
15
16
|
const answer = nbString[nbString.length - rankAsked - 1];
|
|
16
17
|
const question = {
|
|
17
18
|
answer,
|
|
18
|
-
instruction: `Quel est le chiffre des ${rankAskedLabel} dans le nombre $${nb
|
|
19
|
-
.toTree()
|
|
20
|
-
.toTex()}$ ?`,
|
|
19
|
+
instruction: `Quel est le chiffre des ${rankAskedLabel} dans le nombre $${(0, toSeparatedThousands_1.toSeperatedThousands)(nb.toTree().toTex())}$ ?`,
|
|
21
20
|
keys: [],
|
|
22
21
|
hint: `Le chiffre des ${rankAskedLabel} est le ${ordinals[rankAsked]} chiffre en partant de la droite.`,
|
|
23
22
|
correction: `Le chiffre des ${rankAskedLabel} est le ${ordinals[rankAsked]} chiffre en partant de la droite. Donc le chiffre des ${rankAskedLabel} est $${answer}$.`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"digitRankNumber.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/digitRankNumber.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"digitRankNumber.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/digitRankNumber.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA+CF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC"}
|
|
@@ -5,6 +5,7 @@ const exercise_1 = require("../../../exercises/exercise");
|
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const integer_1 = require("../../../math/numbers/integer/integer");
|
|
7
7
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
8
|
+
const toSeparatedThousands_1 = require("../../../utils/numberPrototype/toSeparatedThousands");
|
|
8
9
|
const ordinals = ["premier", "deuxième", "troisième", "quatrième"];
|
|
9
10
|
const getDigitRankNumberQuestion = () => {
|
|
10
11
|
const size = (0, randint_1.randint)(3, 6);
|
|
@@ -15,10 +16,8 @@ const getDigitRankNumberQuestion = () => {
|
|
|
15
16
|
const answer = nbString.substring(0, nbString.length - rankAsked);
|
|
16
17
|
const question = {
|
|
17
18
|
answer,
|
|
18
|
-
instruction: `Quel est le nombre ${rankAsked === 0 ? "d'" : "de "}${rankAskedLabel} dans le nombre $${nb.toTree().toTex()}$ ?`,
|
|
19
|
+
instruction: `Quel est le nombre ${rankAsked === 0 ? "d'" : "de "}${rankAskedLabel} dans le nombre $${(0, toSeparatedThousands_1.toSeperatedThousands)(nb.toTree().toTex())}$ ?`,
|
|
19
20
|
keys: [],
|
|
20
|
-
hint: `Attention ! On demande le 'nombre' et non pas le 'chiffre' !`,
|
|
21
|
-
correction: `Le chiffre des ${rankAskedLabel} est le ${ordinals[rankAsked]} chiffre en partant de la droite. Donc le chiffre des ${rankAskedLabel} est $${answer}$.`,
|
|
22
21
|
answerFormat: "tex",
|
|
23
22
|
identifiers: { nb, rankAsked },
|
|
24
23
|
};
|
|
@@ -43,7 +42,7 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
43
42
|
exports.digitRankNumber = {
|
|
44
43
|
id: "digitRankNumber",
|
|
45
44
|
connector: "=",
|
|
46
|
-
label: "Déterminer le
|
|
45
|
+
label: "Déterminer le nombre d'unités/de dizaines/de centièmes...",
|
|
47
46
|
levels: [],
|
|
48
47
|
isSingleStep: true,
|
|
49
48
|
sections: [],
|
|
@@ -53,5 +52,4 @@ exports.digitRankNumber = {
|
|
|
53
52
|
getPropositions,
|
|
54
53
|
isAnswerValid,
|
|
55
54
|
subject: "Mathématiques",
|
|
56
|
-
hasHintAndCorrection: true,
|
|
57
55
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC"}
|
|
@@ -25,3 +25,4 @@ __exportStar(require("./rounding"), exports);
|
|
|
25
25
|
__exportStar(require("./digitRank"), exports);
|
|
26
26
|
__exportStar(require("./digitDecimalRank"), exports);
|
|
27
27
|
__exportStar(require("./digitRankNumber"), exports);
|
|
28
|
+
__exportStar(require("./digitDecimalRankNumber"), exports);
|
|
@@ -2,4 +2,6 @@ export * from "./mentalAddAndSub";
|
|
|
2
2
|
export * from "./mentalDivisions";
|
|
3
3
|
export * from "./mentalMultiplications";
|
|
4
4
|
export * from "./mentalPercentage";
|
|
5
|
+
export * from "./mentalAddAndSubNoRelative";
|
|
6
|
+
export * from "./mentalMultiplicationsNoRelative";
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC"}
|
|
@@ -18,3 +18,5 @@ __exportStar(require("./mentalAddAndSub"), exports);
|
|
|
18
18
|
__exportStar(require("./mentalDivisions"), exports);
|
|
19
19
|
__exportStar(require("./mentalMultiplications"), exports);
|
|
20
20
|
__exportStar(require("./mentalPercentage"), exports);
|
|
21
|
+
__exportStar(require("./mentalAddAndSubNoRelative"), exports);
|
|
22
|
+
__exportStar(require("./mentalMultiplicationsNoRelative"), exports);
|
|
@@ -62,7 +62,7 @@ const isAnswerValid = (studentAns, { numbers }) => {
|
|
|
62
62
|
exports.mentalAddAndSub = {
|
|
63
63
|
id: "mentalAddAndSub",
|
|
64
64
|
connector: "=",
|
|
65
|
-
label: "
|
|
65
|
+
label: "Additions et soustractions avec des décimaux",
|
|
66
66
|
levels: [
|
|
67
67
|
"6ème",
|
|
68
68
|
"5ème",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mentalAddAndSubNoRelative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAgEF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAc3D,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mentalAddAndSubNoRelative = 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 randint_1 = require("../../../../math/utils/random/randint");
|
|
8
|
+
const round_1 = require("../../../../math/utils/round");
|
|
9
|
+
const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
10
|
+
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
11
|
+
const getMentalAddAndSubNoRelativeQuestion = () => {
|
|
12
|
+
let answer = -1;
|
|
13
|
+
let statementTree;
|
|
14
|
+
let numbers = [];
|
|
15
|
+
while (answer < 0) {
|
|
16
|
+
const nbOperations = (0, randint_1.randint)(2, 4);
|
|
17
|
+
numbers = [];
|
|
18
|
+
do {
|
|
19
|
+
numbers = [];
|
|
20
|
+
numbers.push((0, randfloat_1.randfloat)(1, 15, (0, randint_1.randint)(1, 3)));
|
|
21
|
+
let sum = numbers[0];
|
|
22
|
+
for (let i = 1; i < nbOperations + 1; i++) {
|
|
23
|
+
numbers.push((0, randfloat_1.randfloat)(-sum, 15, (0, randint_1.randint)(1, 3), [0]));
|
|
24
|
+
sum += numbers[i];
|
|
25
|
+
}
|
|
26
|
+
} while (numbers.every((a) => a > 0));
|
|
27
|
+
const allNumbersNodes = numbers.map((nb) => new numberNode_1.NumberNode(nb));
|
|
28
|
+
statementTree = new addNode_1.AddNode(allNumbersNodes[0], allNumbersNodes[1]);
|
|
29
|
+
for (let i = 2; i < allNumbersNodes.length; i++) {
|
|
30
|
+
statementTree = new addNode_1.AddNode(statementTree, allNumbersNodes[i]);
|
|
31
|
+
}
|
|
32
|
+
answer = (0, round_1.round)(numbers.reduce((a, b) => a + b), 2);
|
|
33
|
+
}
|
|
34
|
+
const answerTex = answer.frenchify();
|
|
35
|
+
const question = {
|
|
36
|
+
answer: answerTex,
|
|
37
|
+
instruction: `Calculer : $${statementTree.toTex()}$`,
|
|
38
|
+
startStatement: statementTree.toTex(),
|
|
39
|
+
keys: [],
|
|
40
|
+
answerFormat: "tex",
|
|
41
|
+
identifiers: { numbers },
|
|
42
|
+
};
|
|
43
|
+
return question;
|
|
44
|
+
};
|
|
45
|
+
const getPropositions = (n, { answer }) => {
|
|
46
|
+
const propositions = [];
|
|
47
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
48
|
+
const answerNb = answer.unfrenchify();
|
|
49
|
+
while (propositions.length < n) {
|
|
50
|
+
const incorrectAnswer = (0, round_1.round)(answerNb + Math.max(-answerNb, (0, randfloat_1.randfloat)(-5, 6, (0, randint_1.randint)(1, 3), [0])), 2);
|
|
51
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, incorrectAnswer.frenchify());
|
|
52
|
+
}
|
|
53
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
54
|
+
};
|
|
55
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
56
|
+
return ans === answer;
|
|
57
|
+
};
|
|
58
|
+
exports.mentalAddAndSubNoRelative = {
|
|
59
|
+
id: "mentalAddAndSubNoRelative",
|
|
60
|
+
connector: "=",
|
|
61
|
+
label: "Additions et soustractions avec des décimaux (sans relatifs)",
|
|
62
|
+
levels: [],
|
|
63
|
+
isSingleStep: true,
|
|
64
|
+
sections: [],
|
|
65
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getMentalAddAndSubNoRelativeQuestion, nb),
|
|
66
|
+
qcmTimer: 60,
|
|
67
|
+
freeTimer: 60,
|
|
68
|
+
getPropositions,
|
|
69
|
+
isAnswerValid,
|
|
70
|
+
subject: "Mathématiques",
|
|
71
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mentalMultiplications.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/mentalMultiplications.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;
|
|
1
|
+
{"version":3,"file":"mentalMultiplications.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/mentalMultiplications.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AA6EF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAuBvD,CAAC"}
|
|
@@ -10,30 +10,38 @@ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
|
10
10
|
const coinFlip_1 = require("../../../../utils/coinFlip");
|
|
11
11
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
12
12
|
const getMentalMultiplications = () => {
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
? (0, randint_1.randint)(-99, 100, [-10, 0, 10]) / 10
|
|
16
|
-
: (0, coinFlip_1.coinFlip)()
|
|
17
|
-
? (0, randint_1.randint)(2, 10) * 10 + (0, randint_1.randint)(-1, 2, [0])
|
|
18
|
-
: (0, randint_1.randint)(2, 10) + (0, randint_1.randint)(-1, 2, [0]) / 10;
|
|
19
|
-
const c = (0, randint_1.randint)(2, 9, [3, 6, 7]);
|
|
20
|
-
const d = (0, randint_1.randint)(2, 11, [c]) / c;
|
|
21
|
-
const f = (0, coinFlip_1.coinFlip)() ? (0, randint_1.randint)(2, 10) / 10 : (0, randint_1.randint)(2, 100) / 100;
|
|
22
|
-
let numbers = [a, b, c, d, f];
|
|
23
|
-
const allNumbersNodes = numbers.map((nb) => new numberNode_1.NumberNode(nb));
|
|
13
|
+
const numbers = [];
|
|
14
|
+
const nbOfOperations = (0, randint_1.randint)(2, 4);
|
|
24
15
|
let statementTree;
|
|
25
16
|
let answer;
|
|
26
|
-
if (
|
|
17
|
+
if (nbOfOperations === 2) {
|
|
18
|
+
const a = (0, randint_1.randint)(-9, 10, [-1, 0, 1]);
|
|
19
|
+
const b = (0, coinFlip_1.coinFlip)()
|
|
20
|
+
? (0, randint_1.randint)(-99, 100, [-10, 0, 10]) / 10
|
|
21
|
+
: (0, coinFlip_1.coinFlip)()
|
|
22
|
+
? (0, randint_1.randint)(2, 10) * 10 + (0, randint_1.randint)(-1, 2, [0]) / 10
|
|
23
|
+
: (0, randint_1.randint)(2, 10) + (0, randint_1.randint)(-1, 2, [0]) / 10;
|
|
24
|
+
numbers.push(a);
|
|
25
|
+
numbers.push(b);
|
|
26
|
+
const allNumbersNodes = numbers.map((nb) => new numberNode_1.NumberNode(nb));
|
|
27
27
|
statementTree = new multiplyNode_1.MultiplyNode(allNumbersNodes[0], allNumbersNodes[1]);
|
|
28
28
|
answer = numbers[0] * numbers[1];
|
|
29
29
|
}
|
|
30
30
|
else {
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
//nbOfOperations = 3
|
|
32
|
+
const c = (0, randint_1.randint)(2, 9, [3, 6, 7]);
|
|
33
|
+
const d = (0, randint_1.randint)(2, 11, [c]) / c;
|
|
34
|
+
const f = (0, coinFlip_1.coinFlip)() ? (0, randint_1.randint)(2, 10) / 10 : (0, randint_1.randint)(2, 100) / 100;
|
|
35
|
+
numbers.push(c);
|
|
36
|
+
numbers.push(d);
|
|
37
|
+
numbers.push(f);
|
|
38
|
+
const allNumbersNodes = numbers.map((nb) => new numberNode_1.NumberNode(nb));
|
|
39
|
+
statementTree = new multiplyNode_1.MultiplyNode(allNumbersNodes[0], new multiplyNode_1.MultiplyNode(allNumbersNodes[1], allNumbersNodes[2]));
|
|
40
|
+
answer = numbers[0] * numbers[1] * numbers[2];
|
|
33
41
|
}
|
|
34
42
|
statementTree.shuffle();
|
|
35
43
|
const statementTex = statementTree.toTex();
|
|
36
|
-
const answerTex = (
|
|
44
|
+
const answerTex = (0, round_1.round)(answer, 2).frenchify();
|
|
37
45
|
const question = {
|
|
38
46
|
instruction: `Calculer : $${statementTex}$`,
|
|
39
47
|
startStatement: statementTex,
|
|
@@ -47,7 +55,7 @@ const getMentalMultiplications = () => {
|
|
|
47
55
|
const getPropositions = (n, { answer }) => {
|
|
48
56
|
const propositions = [];
|
|
49
57
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
50
|
-
const result =
|
|
58
|
+
const result = answer.unfrenchify();
|
|
51
59
|
while (propositions.length < n) {
|
|
52
60
|
let incorrectAnswer = (0, round_1.round)(result + ((0, coinFlip_1.coinFlip)() ? 1 : -1) * Math.random() * 10, 2);
|
|
53
61
|
(0, exercise_1.tryToAddWrongProp)(propositions, incorrectAnswer.toString().replace(".", ","));
|
|
@@ -62,7 +70,7 @@ const isAnswerValid = (studentAns, { answer }) => {
|
|
|
62
70
|
exports.mentalMultiplications = {
|
|
63
71
|
id: "mentalMultiplications",
|
|
64
72
|
connector: "=",
|
|
65
|
-
label: "
|
|
73
|
+
label: "Multiplications avec des décimaux",
|
|
66
74
|
levels: [
|
|
67
75
|
"6ème",
|
|
68
76
|
"5ème",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mentalMultiplicationsNoRelative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AA4EF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAwBjE,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mentalMultiplicationsNoRelative = 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 numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
9
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
10
|
+
const coinFlip_1 = require("../../../../utils/coinFlip");
|
|
11
|
+
const shuffle_1 = require("../../../../utils/shuffle");
|
|
12
|
+
const getMentalMultiplicationsNoRelative = () => {
|
|
13
|
+
const numbers = [];
|
|
14
|
+
const nbOfOperations = (0, randint_1.randint)(2, 4);
|
|
15
|
+
let statementTree;
|
|
16
|
+
let answer;
|
|
17
|
+
if (nbOfOperations === 2) {
|
|
18
|
+
const a = (0, randint_1.randint)(2, 10);
|
|
19
|
+
const b = (0, coinFlip_1.coinFlip)()
|
|
20
|
+
? (0, randint_1.randint)(1, 100, [10]) / 10
|
|
21
|
+
: (0, coinFlip_1.coinFlip)()
|
|
22
|
+
? (0, randint_1.randint)(2, 10) * 10 + (0, randint_1.randint)(-1, 2, [0]) / 10
|
|
23
|
+
: (0, randint_1.randint)(2, 10) + (0, randint_1.randint)(-1, 2, [0]) / 10;
|
|
24
|
+
numbers.push(a);
|
|
25
|
+
numbers.push(b);
|
|
26
|
+
const allNumbersNodes = numbers.map((nb) => new numberNode_1.NumberNode(nb));
|
|
27
|
+
statementTree = new multiplyNode_1.MultiplyNode(allNumbersNodes[0], allNumbersNodes[1]);
|
|
28
|
+
answer = numbers[0] * numbers[1];
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
//nbOfOperations = 3
|
|
32
|
+
const c = (0, randint_1.randint)(2, 9, [3, 6, 7]);
|
|
33
|
+
const d = (0, randint_1.randint)(2, 11, [c]) / c;
|
|
34
|
+
const f = (0, coinFlip_1.coinFlip)() ? (0, randint_1.randint)(2, 10) / 10 : (0, randint_1.randint)(2, 100) / 100;
|
|
35
|
+
numbers.push(c);
|
|
36
|
+
numbers.push(d);
|
|
37
|
+
numbers.push(f);
|
|
38
|
+
const allNumbersNodes = numbers.map((nb) => new numberNode_1.NumberNode(nb));
|
|
39
|
+
statementTree = new multiplyNode_1.MultiplyNode(allNumbersNodes[0], new multiplyNode_1.MultiplyNode(allNumbersNodes[1], allNumbersNodes[2]));
|
|
40
|
+
answer = numbers[0] * numbers[1] * numbers[2];
|
|
41
|
+
}
|
|
42
|
+
statementTree.shuffle();
|
|
43
|
+
const statementTex = statementTree.toTex();
|
|
44
|
+
const answerTex = (0, round_1.round)(answer, 2).frenchify();
|
|
45
|
+
const question = {
|
|
46
|
+
instruction: `Calculer : $${statementTex}$`,
|
|
47
|
+
startStatement: statementTex,
|
|
48
|
+
answer: answerTex,
|
|
49
|
+
keys: [],
|
|
50
|
+
answerFormat: "tex",
|
|
51
|
+
identifiers: { numbers },
|
|
52
|
+
};
|
|
53
|
+
return question;
|
|
54
|
+
};
|
|
55
|
+
const getPropositions = (n, { answer }) => {
|
|
56
|
+
const propositions = [];
|
|
57
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
58
|
+
const result = answer.unfrenchify();
|
|
59
|
+
while (propositions.length < n) {
|
|
60
|
+
let incorrectAnswer = (0, round_1.round)(result + Math.random() * 10, 2);
|
|
61
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, incorrectAnswer.toString().replace(".", ","));
|
|
62
|
+
}
|
|
63
|
+
return (0, shuffle_1.shuffle)(propositions);
|
|
64
|
+
};
|
|
65
|
+
const isAnswerValid = (studentAns, { answer }) => {
|
|
66
|
+
const answerTree = answer.unfrenchify().toTree();
|
|
67
|
+
const texs = answerTree.toAllValidTexs();
|
|
68
|
+
return texs.includes(studentAns);
|
|
69
|
+
};
|
|
70
|
+
exports.mentalMultiplicationsNoRelative = {
|
|
71
|
+
id: "mentalMultiplicationsNoRelative",
|
|
72
|
+
connector: "=",
|
|
73
|
+
label: "Multiplications avec des décimaux (sans relatifs)",
|
|
74
|
+
levels: [
|
|
75
|
+
"6ème",
|
|
76
|
+
"5ème",
|
|
77
|
+
"4ème",
|
|
78
|
+
"3ème",
|
|
79
|
+
"2nde",
|
|
80
|
+
"1reESM",
|
|
81
|
+
"CAP",
|
|
82
|
+
"2ndPro",
|
|
83
|
+
"1rePro",
|
|
84
|
+
],
|
|
85
|
+
sections: ["Calculs"],
|
|
86
|
+
isSingleStep: true,
|
|
87
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getMentalMultiplicationsNoRelative, nb),
|
|
88
|
+
qcmTimer: 60,
|
|
89
|
+
freeTimer: 60,
|
|
90
|
+
getPropositions,
|
|
91
|
+
isAnswerValid,
|
|
92
|
+
subject: "Mathématiques",
|
|
93
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=expressionNature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expressionNature.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/operations/expressionNature.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// import {
|
|
3
|
+
// Exercise,
|
|
4
|
+
// Proposition,
|
|
5
|
+
// QCMGenerator,
|
|
6
|
+
// Question,
|
|
7
|
+
// QuestionGenerator,
|
|
8
|
+
// VEA,
|
|
9
|
+
// GGBVEA,
|
|
10
|
+
// addValidProp,
|
|
11
|
+
// shuffleProps,
|
|
12
|
+
// tryToAddWrongProp,
|
|
13
|
+
// } from "../../../../exercises/exercise";
|
|
14
|
+
// import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions";
|
|
15
|
+
// import { AddNode } from "../../../../tree/nodes/operators/addNode";
|
|
16
|
+
// import { diceFlip } from "../../../../utils/diceFlip";
|
|
17
|
+
// type Identifiers = {};
|
|
18
|
+
// const getExpressionNatureQuestion: QuestionGenerator<Identifiers> = () => {
|
|
19
|
+
// let answer = "";
|
|
20
|
+
// let statement = "";
|
|
21
|
+
// let numbers = [0, 0];
|
|
22
|
+
// const type = diceFlip(4)
|
|
23
|
+
// switch(type){
|
|
24
|
+
// case 0 :
|
|
25
|
+
// //somme
|
|
26
|
+
// //ab+c , ac + bc, a/b + c, a + b/c
|
|
27
|
+
// const node= new AddNode(
|
|
28
|
+
// )
|
|
29
|
+
// answer = "une somme"
|
|
30
|
+
// break;
|
|
31
|
+
// case 1 :
|
|
32
|
+
// //différence
|
|
33
|
+
// answer = "une différence"
|
|
34
|
+
// break;
|
|
35
|
+
// case 2 :
|
|
36
|
+
// //produit
|
|
37
|
+
// answer = "un produit"
|
|
38
|
+
// break;
|
|
39
|
+
// case 3 :
|
|
40
|
+
// default:
|
|
41
|
+
// //quotient
|
|
42
|
+
// answer = "un quotient"
|
|
43
|
+
// break;
|
|
44
|
+
// }
|
|
45
|
+
// const question: Question<Identifiers> = {
|
|
46
|
+
// answer,
|
|
47
|
+
// instruction: `L'expression ${statement} est : `,
|
|
48
|
+
// keys: [],
|
|
49
|
+
// answerFormat: "tex",
|
|
50
|
+
// identifiers: {},
|
|
51
|
+
// };
|
|
52
|
+
// return question;
|
|
53
|
+
// };
|
|
54
|
+
// const getPropositions: QCMGenerator<Identifiers> = (n, { answer }) => {
|
|
55
|
+
// const propositions: Proposition[] = [];
|
|
56
|
+
// addValidProp(propositions, answer);
|
|
57
|
+
// tryToAddWrongProp(propositions, "une somme");
|
|
58
|
+
// tryToAddWrongProp(propositions, "un produit");
|
|
59
|
+
// tryToAddWrongProp(propositions, "une différence");
|
|
60
|
+
// tryToAddWrongProp(propositions, "un quotient");
|
|
61
|
+
// return shuffleProps(propositions, n);
|
|
62
|
+
// };
|
|
63
|
+
// const isAnswerValid: VEA<Identifiers> = (ans, { answer }) => {
|
|
64
|
+
// return ans === answer;
|
|
65
|
+
// };
|
|
66
|
+
// export const expressionNature: Exercise<Identifiers> = {
|
|
67
|
+
// id: "expressionNature",
|
|
68
|
+
// connector: "=",
|
|
69
|
+
// label:
|
|
70
|
+
// "Déterminer la nature d'une expression (somme/produit/différence/quotient)",
|
|
71
|
+
// levels: [],
|
|
72
|
+
// isSingleStep: true,
|
|
73
|
+
// sections: [],
|
|
74
|
+
// generator: (nb: number) =>
|
|
75
|
+
// getDistinctQuestions(getExpressionNatureQuestion, nb),
|
|
76
|
+
// qcmTimer: 60,
|
|
77
|
+
// freeTimer: 60,
|
|
78
|
+
// getPropositions,
|
|
79
|
+
// isAnswerValid,
|
|
80
|
+
// subject: "Mathématiques",
|
|
81
|
+
// };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inverseImageFunctionTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/inverseImageFunctionTable.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"inverseImageFunctionTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/inverseImageFunctionTable.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAgFF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAc3D,CAAC"}
|