math-exercises 2.2.9 → 2.2.10
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/arithmetics/commonDivisorsList.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.js +24 -7
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +33 -1
- package/lib/exercises/math/calcul/operations/expressionNature.d.ts +8 -0
- package/lib/exercises/math/calcul/operations/expressionNature.d.ts.map +1 -1
- package/lib/exercises/math/calcul/operations/expressionNature.js +180 -80
- package/lib/exercises/math/calcul/operations/index.d.ts +1 -0
- package/lib/exercises/math/calcul/operations/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/operations/index.js +1 -0
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/graphicInequation.js +4 -1
- package/lib/exercises/math/functions/basics/twoFunctionsInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +12 -1
- package/lib/exercises/math/functions/trinoms/canonicalFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/directionVector.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/directionVectorEquation.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/placeAPoint.js +0 -4
- package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.js +2 -3
- package/lib/exercises/math/geometry/vectors/vectorCoordinatesFromTwoPoints.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/vectorCoordinatesFromTwoPoints.js +17 -0
- package/lib/exercises/math/geometry/volumes/volumeOfCube.d.ts.map +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfCube.js +7 -1
- package/lib/exercises/math/index.d.ts +0 -1
- package/lib/exercises/math/index.d.ts.map +1 -1
- package/lib/exercises/math/index.js +0 -1
- package/lib/exercises/math/limits/rationalFracForbiddenValueLimit.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersDivision.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersDivision.js +35 -2
- package/lib/exercises/math/probaStat/calculateProbaOfBinomialDistribution.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/calculateProbaOfBinomialDistribution.js +21 -0
- package/lib/exercises/math/probaStat/probaFromTableWithContext.js +1 -1
- package/lib/exercises/math/probaStat/stats1var/averageList.d.ts +7 -0
- package/lib/exercises/math/probaStat/stats1var/averageList.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/stats1var/averageList.js +52 -0
- package/lib/exercises/math/probaStat/stats1var/etendueList.d.ts +7 -0
- package/lib/exercises/math/probaStat/stats1var/etendueList.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/stats1var/etendueList.js +49 -0
- package/lib/exercises/math/probaStat/stats1var/index.d.ts +2 -0
- package/lib/exercises/math/probaStat/stats1var/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/index.js +2 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.js +42 -0
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.js +7 -2
- package/lib/exercises/math/sequences/geometric/geometricFindTerm.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindTerm.js +42 -0
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.d.ts +10 -0
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.js +56 -0
- package/lib/exercises/math/sequences/geometric/index.d.ts +1 -0
- package/lib/exercises/math/sequences/geometric/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/index.js +1 -0
- package/lib/exercises/math/sequences/index.d.ts +2 -0
- package/lib/exercises/math/sequences/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/index.js +2 -0
- package/lib/exercises/math/sequences/sequenceEvaluation.d.ts +10 -0
- package/lib/exercises/math/sequences/sequenceEvaluation.d.ts.map +1 -0
- package/lib/exercises/math/sequences/sequenceEvaluation.js +143 -0
- package/lib/exercises/math/sequences/sequencePlot.d.ts +9 -0
- package/lib/exercises/math/sequences/sequencePlot.d.ts.map +1 -0
- package/lib/exercises/math/sequences/sequencePlot.js +94 -0
- package/lib/exercises/math/sets/intervals/intervalsIntersection.d.ts.map +1 -1
- package/lib/exercises/math/sets/intervals/intervalsIntersection.js +19 -1
- package/lib/exercises/math/sets/intervals/intervalsUnion.js +1 -1
- package/lib/exercises/math/trigonometry/arcValue.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/arcValue.js +23 -0
- package/lib/index.d.ts +22 -9
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/point.d.ts +11 -0
- package/lib/math/geometry/point.d.ts.map +1 -1
- package/lib/math/geometry/point.js +8 -0
- package/lib/math/numbers/reals/extendedRingElement.d.ts +3 -1
- package/lib/math/numbers/reals/extendedRingElement.d.ts.map +1 -1
- package/lib/math/numbers/reals/real.d.ts +1 -1
- package/lib/math/polynomials/trinom.d.ts +1 -1
- package/lib/math/sets/intervals/intervals.d.ts +3 -1
- package/lib/math/sets/intervals/intervals.d.ts.map +1 -1
- package/lib/math/sets/intervals/intervals.js +7 -3
- package/lib/math/sets/mathSet.d.ts +2 -2
- package/lib/math/sets/mathSet.d.ts.map +1 -1
- package/lib/math/sets/mathSetInterface.d.ts +1 -1
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +18 -2
- package/lib/server.d.ts.map +1 -1
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- package/lib/tree/nodes/algebraicNode.js +0 -3
- package/lib/tree/nodes/complex/complexNode.d.ts +10 -1
- package/lib/tree/nodes/complex/complexNode.d.ts.map +1 -1
- package/lib/tree/nodes/complex/complexNode.js +7 -0
- package/lib/tree/nodes/equations/equalNode.d.ts +10 -1
- package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equalNode.js +7 -0
- package/lib/tree/nodes/equations/equationSolutionNode.d.ts +10 -1
- package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equationSolutionNode.js +6 -0
- package/lib/tree/nodes/equations/multiEqualNode.d.ts +7 -1
- package/lib/tree/nodes/equations/multiEqualNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/multiEqualNode.js +6 -0
- package/lib/tree/nodes/functions/absNode.d.ts +7 -1
- package/lib/tree/nodes/functions/absNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/absNode.js +6 -0
- package/lib/tree/nodes/functions/arcSinNode.d.ts +7 -1
- package/lib/tree/nodes/functions/arcSinNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/arcSinNode.js +8 -1
- package/lib/tree/nodes/functions/arccosNode.d.ts +7 -1
- package/lib/tree/nodes/functions/arccosNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/arccosNode.js +8 -1
- package/lib/tree/nodes/functions/arctanNode.d.ts +7 -1
- package/lib/tree/nodes/functions/arctanNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/arctanNode.js +8 -1
- package/lib/tree/nodes/functions/cosNode.d.ts +7 -1
- package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/cosNode.js +8 -1
- package/lib/tree/nodes/functions/expNode.d.ts +7 -1
- package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/expNode.js +6 -0
- package/lib/tree/nodes/functions/integralNode.d.ts +19 -2
- package/lib/tree/nodes/functions/integralNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/integralNode.js +20 -0
- package/lib/tree/nodes/functions/log10Node.d.ts +7 -1
- package/lib/tree/nodes/functions/log10Node.d.ts.map +1 -1
- package/lib/tree/nodes/functions/log10Node.js +6 -0
- package/lib/tree/nodes/functions/logNode.d.ts +7 -1
- package/lib/tree/nodes/functions/logNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/logNode.js +6 -0
- package/lib/tree/nodes/functions/oppositeNode.d.ts +7 -1
- package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/oppositeNode.js +6 -0
- package/lib/tree/nodes/functions/sinNode.d.ts +7 -1
- package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sinNode.js +8 -1
- package/lib/tree/nodes/functions/sqrtNode.d.ts +7 -1
- package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sqrtNode.js +6 -0
- package/lib/tree/nodes/functions/tanNode.d.ts +7 -1
- package/lib/tree/nodes/functions/tanNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/tanNode.js +8 -1
- package/lib/tree/nodes/geometry/degree.d.ts +5 -1
- package/lib/tree/nodes/geometry/degree.d.ts.map +1 -1
- package/lib/tree/nodes/geometry/degree.js +6 -0
- package/lib/tree/nodes/geometry/lengthNode.d.ts +5 -1
- package/lib/tree/nodes/geometry/lengthNode.d.ts.map +1 -1
- package/lib/tree/nodes/geometry/lengthNode.js +6 -0
- package/lib/tree/nodes/geometry/pointNode.d.ts +14 -1
- package/lib/tree/nodes/geometry/pointNode.d.ts.map +1 -1
- package/lib/tree/nodes/geometry/pointNode.js +6 -0
- package/lib/tree/nodes/geometry/vectorNode.d.ts +5 -1
- package/lib/tree/nodes/geometry/vectorNode.d.ts.map +1 -1
- package/lib/tree/nodes/geometry/vectorNode.js +6 -0
- package/lib/tree/nodes/hasVariableNode.d.ts +3 -0
- package/lib/tree/nodes/hasVariableNode.d.ts.map +1 -0
- package/lib/tree/nodes/hasVariableNode.js +16 -0
- package/lib/tree/nodes/inequations/inequationNode.d.ts +8 -1
- package/lib/tree/nodes/inequations/inequationNode.d.ts.map +1 -1
- package/lib/tree/nodes/inequations/inequationNode.js +7 -0
- package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts +19 -1
- package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts.map +1 -1
- package/lib/tree/nodes/inequations/inequationSolutionNode.js +6 -0
- package/lib/tree/nodes/node.d.ts +50 -8
- package/lib/tree/nodes/node.d.ts.map +1 -1
- package/lib/tree/nodes/node.js +49 -21
- package/lib/tree/nodes/nodeConstructor.d.ts +7 -0
- package/lib/tree/nodes/nodeConstructor.d.ts.map +1 -0
- package/lib/tree/nodes/nodeConstructor.js +170 -0
- package/lib/tree/nodes/numbers/constantNode.d.ts +7 -1
- package/lib/tree/nodes/numbers/constantNode.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/constantNode.js +9 -1
- package/lib/tree/nodes/numbers/numberNode.d.ts +5 -1
- package/lib/tree/nodes/numbers/numberNode.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/numberNode.js +6 -0
- package/lib/tree/nodes/numbers/percentNode.d.ts +5 -1
- package/lib/tree/nodes/numbers/percentNode.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/percentNode.js +6 -0
- package/lib/tree/nodes/operators/addNode.d.ts +10 -1
- package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/addNode.js +7 -0
- package/lib/tree/nodes/operators/divideNode.d.ts +11 -1
- package/lib/tree/nodes/operators/divideNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/divideNode.js +12 -0
- package/lib/tree/nodes/operators/fractionNode.d.ts +10 -1
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +7 -0
- package/lib/tree/nodes/operators/limitNode.d.ts +11 -1
- package/lib/tree/nodes/operators/limitNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/limitNode.js +8 -0
- package/lib/tree/nodes/operators/multiplyNode.d.ts +10 -1
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +7 -0
- package/lib/tree/nodes/operators/powerNode.d.ts +10 -1
- package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/powerNode.js +7 -0
- package/lib/tree/nodes/operators/substractNode.d.ts +11 -1
- package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/substractNode.js +12 -0
- package/lib/tree/nodes/sets/belongsNode.d.ts +10 -1
- package/lib/tree/nodes/sets/belongsNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/belongsNode.js +7 -0
- package/lib/tree/nodes/sets/closure.d.ts +2 -0
- package/lib/tree/nodes/sets/closure.d.ts.map +1 -1
- package/lib/tree/nodes/sets/closure.js +20 -0
- package/lib/tree/nodes/sets/discreteSetNode.d.ts +10 -2
- package/lib/tree/nodes/sets/discreteSetNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/discreteSetNode.js +13 -3
- package/lib/tree/nodes/sets/intervalNode.d.ts +14 -2
- package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/intervalNode.js +21 -0
- package/lib/tree/nodes/sets/setNode.d.ts +1 -0
- package/lib/tree/nodes/sets/setNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/unionIntervalNode.d.ts +7 -1
- package/lib/tree/nodes/sets/unionIntervalNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/unionIntervalNode.js +6 -0
- package/lib/tree/nodes/variables/variableNode.d.ts +5 -1
- package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -1
- package/lib/tree/nodes/variables/variableNode.js +6 -0
- package/lib/tree/utilities/operatorComposition.js +4 -2
- package/lib/utils/alignTex.js +11 -9
- package/lib/utils/diceFlip.d.ts.map +1 -1
- package/lib/utils/diceFlip.js +2 -6
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commonDivisorsList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/commonDivisorsList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"commonDivisorsList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/commonDivisorsList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA2EF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAcpD,CAAC"}
|
|
@@ -17,12 +17,25 @@ const getCommonDivisorsListQuestion = () => {
|
|
|
17
17
|
const res = [];
|
|
18
18
|
divisorsA.forEach((n) => divisorsB.includes(n) && res.push(n));
|
|
19
19
|
res.sort((a, b) => a - b);
|
|
20
|
-
const answer = res.join("
|
|
20
|
+
const answer = res.join(";");
|
|
21
21
|
const question = {
|
|
22
22
|
answer,
|
|
23
|
-
instruction: `Donner la liste des diviseurs communs à $${a}$ et $${b}$ (séparer les valeurs par des virgules).`,
|
|
24
|
-
keys: [],
|
|
23
|
+
instruction: `Donner la liste des diviseurs communs à $${a}$ et $${b}$ (séparer les valeurs par des point-virgules).`,
|
|
24
|
+
keys: ["semicolon"],
|
|
25
25
|
answerFormat: "tex",
|
|
26
|
+
hint: `Détermine la liste des diviseurs de chaque nombre, puis identifie ceux qu'ils ont en commun.`,
|
|
27
|
+
correction: `Les diviseurs de $${a}$ sont :
|
|
28
|
+
|
|
29
|
+
$${divisorsA.join(";")}$
|
|
30
|
+
|
|
31
|
+
Les diviseurs de $${b}$ sont :
|
|
32
|
+
|
|
33
|
+
$${divisorsB.join(";")}$
|
|
34
|
+
|
|
35
|
+
Les diviseurs communs à $${a}$ et $${b}$ sont donc :
|
|
36
|
+
|
|
37
|
+
$${answer}$
|
|
38
|
+
`,
|
|
26
39
|
identifiers: { a, b },
|
|
27
40
|
};
|
|
28
41
|
return question;
|
|
@@ -30,7 +43,7 @@ const getCommonDivisorsListQuestion = () => {
|
|
|
30
43
|
const getPropositions = (n, { answer, a, b }) => {
|
|
31
44
|
const propositions = [];
|
|
32
45
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
33
|
-
const values = answer.split("
|
|
46
|
+
const values = answer.split(";").map((v) => Number(v));
|
|
34
47
|
const max = Math.max(a, b);
|
|
35
48
|
while (propositions.length < n) {
|
|
36
49
|
const newValue = (0, doWhile_1.doWhile)(() => (0, randint_1.randint)(2, max), (x) => values.includes(max));
|
|
@@ -39,16 +52,19 @@ const getPropositions = (n, { answer, a, b }) => {
|
|
|
39
52
|
willRemove
|
|
40
53
|
? copy.splice((0, randint_1.randint)(0, values.length), 1)
|
|
41
54
|
: copy.splice(0, 0, newValue);
|
|
42
|
-
(0, exercise_1.tryToAddWrongProp)(propositions, willRemove ? copy.join("
|
|
55
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, willRemove ? copy.join(";") : copy.sort((a, b) => a - b).join(";"));
|
|
43
56
|
}
|
|
44
57
|
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
45
58
|
};
|
|
46
59
|
const isAnswerValid = (ans, { answer }) => {
|
|
47
|
-
let values = ans
|
|
60
|
+
let values = ans
|
|
61
|
+
.replaceAll(",", ";")
|
|
62
|
+
.split(";")
|
|
63
|
+
.map((v) => Number(v));
|
|
48
64
|
if (values.some((v) => isNaN(v)))
|
|
49
65
|
return false;
|
|
50
66
|
values.sort((a, b) => a - b);
|
|
51
|
-
return values.join("
|
|
67
|
+
return values.join(";") === answer;
|
|
52
68
|
};
|
|
53
69
|
exports.commonDivisorsList = {
|
|
54
70
|
id: "commonDivisorsList",
|
|
@@ -62,4 +78,5 @@ exports.commonDivisorsList = {
|
|
|
62
78
|
getPropositions,
|
|
63
79
|
isAnswerValid,
|
|
64
80
|
subject: "Mathématiques",
|
|
81
|
+
hasHintAndCorrection: true,
|
|
65
82
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fractionsSumsSameDenominators.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsSumsSameDenominators.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"fractionsSumsSameDenominators.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsSumsSameDenominators.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAclC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAiGF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAe/D,CAAC"}
|
|
@@ -4,8 +4,13 @@ exports.fractionsSumsSameDenominators = void 0;
|
|
|
4
4
|
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const rational_1 = require("../../../../math/numbers/rationals/rational");
|
|
7
|
+
const primeFactors_1 = require("../../../../math/utils/arithmetic/primeFactors");
|
|
7
8
|
const randint_1 = require("../../../../math/utils/random/randint");
|
|
8
9
|
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
10
|
+
const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
|
|
11
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
12
|
+
const operatorComposition_1 = require("../../../../tree/utilities/operatorComposition");
|
|
13
|
+
const alignTex_1 = require("../../../../utils/alignTex");
|
|
9
14
|
const getFractionsSumsSameDenominatorsQuestion = () => {
|
|
10
15
|
const denom = (0, randint_1.randint)(2, 15);
|
|
11
16
|
const num1 = (0, randint_1.randint)(1, denom + 10);
|
|
@@ -13,11 +18,37 @@ const getFractionsSumsSameDenominatorsQuestion = () => {
|
|
|
13
18
|
const ratio1 = new rational_1.Rational(num1, denom).toTree();
|
|
14
19
|
const ratio2 = new rational_1.Rational(num2, denom).toTree();
|
|
15
20
|
const statement = new addNode_1.AddNode(ratio1, ratio2).toTex();
|
|
16
|
-
const
|
|
21
|
+
const answerRatio = new rational_1.Rational(num1 + num2, denom);
|
|
22
|
+
const answer = answerRatio.simplify().toTree().toTex();
|
|
17
23
|
const question = {
|
|
18
24
|
answer,
|
|
19
25
|
instruction: `Calculer et donner le résultat sous forme d'une fraction irréductible : $${statement}$`,
|
|
20
26
|
keys: [],
|
|
27
|
+
hint: `Pour additionner deux fractions qui ont le même dénominateur, on peut additionner leurs numerateurs.`,
|
|
28
|
+
correction: `Les deux fractions ont bien le même dénominateur donc on additionne leurs numérateurs :
|
|
29
|
+
|
|
30
|
+
${(0, alignTex_1.alignTex)([
|
|
31
|
+
[
|
|
32
|
+
statement,
|
|
33
|
+
"=",
|
|
34
|
+
new fractionNode_1.FractionNode(new addNode_1.AddNode(num1.toTree(), num2.toTree()), denom.toTree()).toTex(),
|
|
35
|
+
],
|
|
36
|
+
["", "=", answerRatio.toTree().toTex()],
|
|
37
|
+
])}
|
|
38
|
+
|
|
39
|
+
${answerRatio.isSimplified && answerRatio.denum !== 1
|
|
40
|
+
? "Cette fraction est bien irréductible."
|
|
41
|
+
: `Puis on simplifie la fraction :
|
|
42
|
+
|
|
43
|
+
${(0, alignTex_1.alignTex)([
|
|
44
|
+
[
|
|
45
|
+
answerRatio.toTree().toTex(),
|
|
46
|
+
"=",
|
|
47
|
+
new fractionNode_1.FractionNode((0, operatorComposition_1.operatorComposition)(multiplyNode_1.MultiplyNode, (0, primeFactors_1.primeFactors)(num1 + num2).map((e) => e.toTree())), (0, operatorComposition_1.operatorComposition)(multiplyNode_1.MultiplyNode, (0, primeFactors_1.primeFactors)(denom).map((e) => e.toTree()))).toTex(),
|
|
48
|
+
],
|
|
49
|
+
["", "=", answer],
|
|
50
|
+
])}`}
|
|
51
|
+
`,
|
|
21
52
|
answerFormat: "tex",
|
|
22
53
|
identifiers: { denom, num1, num2 },
|
|
23
54
|
};
|
|
@@ -54,4 +85,5 @@ exports.fractionsSumsSameDenominators = {
|
|
|
54
85
|
getPropositions,
|
|
55
86
|
isAnswerValid,
|
|
56
87
|
subject: "Mathématiques",
|
|
88
|
+
hasHintAndCorrection: true,
|
|
57
89
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expressionNature.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/operations/expressionNature.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"expressionNature.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/operations/expressionNature.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAalC,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,GAAG,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAoLnE,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC"}
|
|
@@ -1,81 +1,181 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
// type
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
//
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
//
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
//
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
//
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
//
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
//
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
//
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
//
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
//
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
//
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
//
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
//
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.expressionNature = 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 addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
8
|
+
const divideNode_1 = require("../../../../tree/nodes/operators/divideNode");
|
|
9
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
10
|
+
const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
|
|
11
|
+
const diceFlip_1 = require("../../../../utils/diceFlip");
|
|
12
|
+
const getExpressionNatureQuestion = () => {
|
|
13
|
+
let answer = "";
|
|
14
|
+
let statement = "";
|
|
15
|
+
let node;
|
|
16
|
+
let subType;
|
|
17
|
+
// const type = diceFlip(4);
|
|
18
|
+
const a = (0, randint_1.randint)(1, 10).toTree();
|
|
19
|
+
const b = (0, randint_1.randint)(1, 10).toTree();
|
|
20
|
+
const c = (0, randint_1.randint)(1, 10).toTree();
|
|
21
|
+
const d = (0, randint_1.randint)(1, 10).toTree();
|
|
22
|
+
const type = (0, randint_1.randint)(0, 4);
|
|
23
|
+
switch (type) {
|
|
24
|
+
case 0:
|
|
25
|
+
//somme
|
|
26
|
+
subType = (0, diceFlip_1.diceFlip)(5);
|
|
27
|
+
switch (subType) {
|
|
28
|
+
case 1:
|
|
29
|
+
//ab+c
|
|
30
|
+
node = new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(a, b), c);
|
|
31
|
+
node.shuffle();
|
|
32
|
+
break;
|
|
33
|
+
case 2:
|
|
34
|
+
//ab + cd
|
|
35
|
+
node = new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(a, b), new multiplyNode_1.MultiplyNode(c, d));
|
|
36
|
+
break;
|
|
37
|
+
case 3:
|
|
38
|
+
//a/b + c
|
|
39
|
+
node = new addNode_1.AddNode(new divideNode_1.DivideNode(a, b), c);
|
|
40
|
+
node.shuffle();
|
|
41
|
+
break;
|
|
42
|
+
case 4:
|
|
43
|
+
//ab + c/d
|
|
44
|
+
node = new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(a, b), new divideNode_1.DivideNode(c, d));
|
|
45
|
+
node.shuffle();
|
|
46
|
+
break;
|
|
47
|
+
case 5:
|
|
48
|
+
//a/b + c/d
|
|
49
|
+
node = new addNode_1.AddNode(new divideNode_1.DivideNode(a, b), new divideNode_1.DivideNode(c, d));
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
answer = "une somme";
|
|
53
|
+
break;
|
|
54
|
+
case 1:
|
|
55
|
+
//différence
|
|
56
|
+
subType = (0, diceFlip_1.diceFlip)(5);
|
|
57
|
+
switch (subType) {
|
|
58
|
+
case 1:
|
|
59
|
+
//ab+c
|
|
60
|
+
node = new substractNode_1.SubstractNode(new multiplyNode_1.MultiplyNode(a, b), c);
|
|
61
|
+
node.dangerouslyShuffle();
|
|
62
|
+
break;
|
|
63
|
+
case 2:
|
|
64
|
+
//ab - cd
|
|
65
|
+
node = new substractNode_1.SubstractNode(new multiplyNode_1.MultiplyNode(a, b), new multiplyNode_1.MultiplyNode(c, d));
|
|
66
|
+
break;
|
|
67
|
+
case 3:
|
|
68
|
+
//a/b - c
|
|
69
|
+
node = new substractNode_1.SubstractNode(new divideNode_1.DivideNode(a, b), c);
|
|
70
|
+
node.dangerouslyShuffle();
|
|
71
|
+
break;
|
|
72
|
+
case 4:
|
|
73
|
+
//ab - c/d
|
|
74
|
+
node = new substractNode_1.SubstractNode(new multiplyNode_1.MultiplyNode(a, b), new divideNode_1.DivideNode(c, d));
|
|
75
|
+
node.dangerouslyShuffle();
|
|
76
|
+
break;
|
|
77
|
+
case 5:
|
|
78
|
+
//a/b - c/d
|
|
79
|
+
node = new substractNode_1.SubstractNode(new divideNode_1.DivideNode(a, b), new divideNode_1.DivideNode(c, d));
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
answer = "une différence";
|
|
83
|
+
break;
|
|
84
|
+
case 2:
|
|
85
|
+
//produit
|
|
86
|
+
subType = (0, diceFlip_1.diceFlip)(5);
|
|
87
|
+
switch (subType) {
|
|
88
|
+
case 1:
|
|
89
|
+
//(a+b)*c
|
|
90
|
+
node = new multiplyNode_1.MultiplyNode(new addNode_1.AddNode(a, b), c);
|
|
91
|
+
node.shuffle();
|
|
92
|
+
break;
|
|
93
|
+
case 2:
|
|
94
|
+
//(a-b)*c
|
|
95
|
+
node = new multiplyNode_1.MultiplyNode(new substractNode_1.SubstractNode(a, b), c);
|
|
96
|
+
node.shuffle();
|
|
97
|
+
break;
|
|
98
|
+
case 3:
|
|
99
|
+
//(a+b)(c+d)
|
|
100
|
+
node = new multiplyNode_1.MultiplyNode(new addNode_1.AddNode(a, b), new addNode_1.AddNode(c, d));
|
|
101
|
+
break;
|
|
102
|
+
case 4:
|
|
103
|
+
//(a+b)(c-d)
|
|
104
|
+
node = new multiplyNode_1.MultiplyNode(new addNode_1.AddNode(a, b), new substractNode_1.SubstractNode(c, d));
|
|
105
|
+
node.shuffle();
|
|
106
|
+
break;
|
|
107
|
+
case 5:
|
|
108
|
+
//(a-b)(c-d)
|
|
109
|
+
node = new multiplyNode_1.MultiplyNode(new substractNode_1.SubstractNode(a, b), new substractNode_1.SubstractNode(c, d));
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
answer = "un produit";
|
|
113
|
+
break;
|
|
114
|
+
case 3:
|
|
115
|
+
default:
|
|
116
|
+
//quotient
|
|
117
|
+
subType = (0, diceFlip_1.diceFlip)(5);
|
|
118
|
+
switch (subType) {
|
|
119
|
+
case 1:
|
|
120
|
+
//(a+b)/c
|
|
121
|
+
node = new divideNode_1.DivideNode(new addNode_1.AddNode(a, b), c);
|
|
122
|
+
node.dangerouslyShuffle();
|
|
123
|
+
break;
|
|
124
|
+
case 2:
|
|
125
|
+
//(a-b)/c
|
|
126
|
+
node = new divideNode_1.DivideNode(new substractNode_1.SubstractNode(a, b), c);
|
|
127
|
+
node.dangerouslyShuffle();
|
|
128
|
+
break;
|
|
129
|
+
case 3:
|
|
130
|
+
//(a+b)/(c+d)
|
|
131
|
+
node = new divideNode_1.DivideNode(new addNode_1.AddNode(a, b), new addNode_1.AddNode(c, d));
|
|
132
|
+
break;
|
|
133
|
+
case 4:
|
|
134
|
+
//(a+b)/(c-d)
|
|
135
|
+
node = new divideNode_1.DivideNode(new addNode_1.AddNode(a, b), new substractNode_1.SubstractNode(c, d));
|
|
136
|
+
node.dangerouslyShuffle();
|
|
137
|
+
break;
|
|
138
|
+
case 5:
|
|
139
|
+
//(a-b)/(c-d)
|
|
140
|
+
node = new divideNode_1.DivideNode(new substractNode_1.SubstractNode(a, b), new substractNode_1.SubstractNode(c, d));
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
answer = "un quotient";
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
statement = node.toTex();
|
|
147
|
+
const question = {
|
|
148
|
+
answer,
|
|
149
|
+
instruction: `L'expression $${statement}$ est : `,
|
|
150
|
+
keys: [],
|
|
151
|
+
answerFormat: "raw",
|
|
152
|
+
identifiers: { nodeIds: node.toIdentifiers(), type, subType },
|
|
153
|
+
};
|
|
154
|
+
return question;
|
|
155
|
+
};
|
|
156
|
+
const getPropositions = (n, { answer }) => {
|
|
157
|
+
const propositions = [];
|
|
158
|
+
(0, exercise_1.addValidProp)(propositions, answer, "raw");
|
|
159
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "une somme", "raw");
|
|
160
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "un produit", "raw");
|
|
161
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "une différence", "raw");
|
|
162
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "un quotient", "raw");
|
|
163
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
164
|
+
};
|
|
165
|
+
const isAnswerValid = (ans, { answer, nodeIds }) => {
|
|
166
|
+
return ans === answer;
|
|
167
|
+
};
|
|
168
|
+
exports.expressionNature = {
|
|
169
|
+
id: "expressionNature",
|
|
170
|
+
connector: "=",
|
|
171
|
+
label: "Déterminer la nature d'une expression (somme/produit/différence/quotient)",
|
|
172
|
+
levels: [],
|
|
173
|
+
isSingleStep: true,
|
|
174
|
+
sections: [],
|
|
175
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getExpressionNatureQuestion, nb),
|
|
176
|
+
qcmTimer: 60,
|
|
177
|
+
freeTimer: 60,
|
|
178
|
+
getPropositions,
|
|
179
|
+
isAnswerValid,
|
|
180
|
+
subject: "Mathématiques",
|
|
181
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/operations/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,uCAAuC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/operations/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,uCAAuC,CAAC;AACtD,cAAc,oBAAoB,CAAC"}
|
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./operationsPriorities"), exports);
|
|
18
18
|
__exportStar(require("./operationsPrioritiesWithoutRelative"), exports);
|
|
19
|
+
__exportStar(require("./expressionNature"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doubleDistributivity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/doubleDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"doubleDistributivity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/doubleDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AA0GF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAetD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firstIdentity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/firstIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"firstIdentity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/firstIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,WAAW,CAqDnE,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,YAAY,CAAC,WAAW,CAkClE,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,GAAG,CAAC,WAAW,CAKvD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAc/C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secondIdentity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/secondIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"secondIdentity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/secondIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,iBAAiB,CAAC,WAAW,CAiDpE,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,YAAY,CAAC,WAAW,CAqCnE,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,GAAG,CAAC,WAAW,CAQxD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAehD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simpleDistributivity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/simpleDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"simpleDistributivity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/simpleDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAoEF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAetD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thirdIdentity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/thirdIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"thirdIdentity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/thirdIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,WAAW,CAqCnE,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,YAAY,CAAC,WAAW,CA2BlE,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,GAAG,CAAC,WAAW,CAUvD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAc/C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equationType2Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType2Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"equationType2Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType2Exercise.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;CACX,CAAC;AAoEF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAevD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equationType4Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType4Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"equationType4Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType4Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAclC;;GAEG;AAEH,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA4EF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAcvD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factoIdRmq1.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"factoIdRmq1.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA8EF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAc7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factoIdRmq2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"factoIdRmq2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAalC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+EF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAc7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convexityQuadrinomials.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/convexityQuadrinomials.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"convexityQuadrinomials.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/convexityQuadrinomials.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAkBlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAoIF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphicInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/graphicInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"graphicInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/graphicInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAQlC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAM5D,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,WAAW,CAAA;KAAE,EAAE,CAAC;CAC7D,CAAC;AA8LF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAenD,CAAC"}
|
|
@@ -119,14 +119,17 @@ const getGraphicInequationQuestion = () => {
|
|
|
119
119
|
const getPropositions = (n, { answer, intervals, splinePoints, yValue }) => {
|
|
120
120
|
const propositions = [];
|
|
121
121
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
122
|
-
(0,
|
|
122
|
+
if ((0, coinFlip_1.coinFlip)())
|
|
123
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\varnothing`);
|
|
123
124
|
if (intervals.length === 1) {
|
|
124
125
|
const interval = new intervalNode_1.IntervalNode(intervals[0].a.toTree(), intervals[0].b.toTree(), intervals[0].closure);
|
|
125
126
|
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${interval.toRandomDifferentClosure().toTex()}`);
|
|
126
127
|
}
|
|
127
128
|
else if (intervals.length === 2) {
|
|
128
129
|
const rightIntervals = intervals.map((i) => new intervalNode_1.IntervalNode(i.a.toTree(), i.b.toTree(), i.closure));
|
|
130
|
+
const fakeIntervals = intervals.map((i) => new intervalNode_1.IntervalNode(i.a.toTree(), i.b.toTree(), i.closure));
|
|
129
131
|
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${rightIntervals[(0, coinFlip_1.coinFlip)() ? 0 : 1].toTex()}`);
|
|
132
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${new unionIntervalNode_1.UnionIntervalNode(fakeIntervals.map((i) => i.toRandomDifferentClosure())).toTex()}`);
|
|
130
133
|
}
|
|
131
134
|
while (propositions.length < n) {
|
|
132
135
|
let a = (0, randint_1.randint)(splinePoints[0][0], splinePoints[splinePoints.length - 1][0] + 1);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"twoFunctionsInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/twoFunctionsInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAKlC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAK3C,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAQ5D,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,UAAU,EAAE,gBAAgB,CAAC;IAC7B,SAAS,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,WAAW,CAAA;KAAE,EAAE,CAAC;CAC7D,CAAC;
|
|
1
|
+
{"version":3,"file":"twoFunctionsInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/twoFunctionsInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAKlC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAK3C,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAQ5D,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,UAAU,EAAE,gBAAgB,CAAC;IAC7B,SAAS,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,WAAW,CAAA;KAAE,EAAE,CAAC;CAC7D,CAAC;AAuOF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
|
|
@@ -143,7 +143,18 @@ const getTwoFunctionsInequationQuestion = () => {
|
|
|
143
143
|
const getPropositions = (n, { answer, intervals, fSplinePoints, ineqSymbol }) => {
|
|
144
144
|
const propositions = [];
|
|
145
145
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
146
|
-
(0,
|
|
146
|
+
if ((0, coinFlip_1.coinFlip)())
|
|
147
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\varnothing`);
|
|
148
|
+
if (intervals.length === 1) {
|
|
149
|
+
const interval = new intervalNode_1.IntervalNode(intervals[0].a.toTree(), intervals[0].b.toTree(), intervals[0].closure);
|
|
150
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${interval.toRandomDifferentClosure().toTex()}`);
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
const rightIntervals = intervals.map((i) => new intervalNode_1.IntervalNode(i.a.toTree(), i.b.toTree(), i.closure));
|
|
154
|
+
const fakeIntervals = intervals.map((i) => new intervalNode_1.IntervalNode(i.a.toTree(), i.b.toTree(), i.closure));
|
|
155
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${rightIntervals[(0, coinFlip_1.coinFlip)() ? 0 : 1].toTex()}`);
|
|
156
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${new unionIntervalNode_1.UnionIntervalNode(fakeIntervals.map((i) => i.toRandomDifferentClosure())).toTex()}`);
|
|
157
|
+
}
|
|
147
158
|
while (propositions.length < n) {
|
|
148
159
|
const isStrict = ineqSymbol === "<" || ineqSymbol === ">";
|
|
149
160
|
const x1 = (0, randint_1.randint)(-10, -5);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canonicalFromDevForm.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/canonicalFromDevForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"canonicalFromDevForm.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/canonicalFromDevForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAyCF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CActD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directionVector.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/directionVector.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"directionVector.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/directionVector.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAyIF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAajD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directionVectorEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/directionVectorEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"directionVectorEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/directionVectorEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAwHF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAczD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"placeAPoint.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/placeAPoint.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAIT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"placeAPoint.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/placeAPoint.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAIT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AA0B5C,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAY/C,CAAC"}
|
|
@@ -8,10 +8,6 @@ const arrayHasSameElement_1 = require("../../../../utils/arrayHasSameElement");
|
|
|
8
8
|
const deleteObjectNamesFromAnswer_1 = require("../../../../geogebra/deleteObjectNamesFromAnswer");
|
|
9
9
|
const getPlaceAPointQuestion = () => {
|
|
10
10
|
const point = point_1.PointConstructor.random("A");
|
|
11
|
-
const xMax = point.getXnumber() + 2;
|
|
12
|
-
const xMin = point.getXnumber() - 2;
|
|
13
|
-
const yMin = point.getYnumber() - 2;
|
|
14
|
-
const yMax = point.getYnumber() + 2;
|
|
15
11
|
const question = {
|
|
16
12
|
ggbAnswer: [`(${point.getXnumber()},${point.getYnumber()})`],
|
|
17
13
|
instruction: `Placer le point $A$ de coordonnées $${point.toTexWithCoords()}$.`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equalCaracteristicFromGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/equalCaracteristicFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC;CACrB,CAAC;
|
|
1
|
+
{"version":3,"file":"equalCaracteristicFromGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/equalCaracteristicFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC;CACrB,CAAC;AAuLF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAe7D,CAAC"}
|
|
@@ -16,8 +16,7 @@ const getEqualCaracteristicFromGraphQuestion = () => {
|
|
|
16
16
|
let points = [];
|
|
17
17
|
// const caracAsked = random(["sens", "direction", "norme"]);
|
|
18
18
|
let instruction = "";
|
|
19
|
-
const caracAsked = (0, random_1.random)(["opposes"]);
|
|
20
|
-
// ["sens", "norme", "direction", "egaux", "opposes"]
|
|
19
|
+
const caracAsked = (0, random_1.random)(["sens", "norme", "direction", "egaux", "opposes"]);
|
|
21
20
|
const isTrue = (0, coinFlip_1.coinFlip)();
|
|
22
21
|
let uPoints = [];
|
|
23
22
|
let vPoints = [];
|
|
@@ -164,7 +163,7 @@ const getEqualCaracteristicFromGraphQuestion = () => {
|
|
|
164
163
|
commands: ggb.commands,
|
|
165
164
|
options: ggb.getOptions(),
|
|
166
165
|
coords: [-8, 8, -4, 4],
|
|
167
|
-
answerFormat: "
|
|
166
|
+
answerFormat: "raw",
|
|
168
167
|
identifiers: { caracAsked, uPoints, vPoints },
|
|
169
168
|
};
|
|
170
169
|
return question;
|