math-exercises 3.0.52 → 3.0.53
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/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +0 -2
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.js +0 -2
- package/lib/exercises/math/calcul/fractions/fractionsDivision.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsDivision.js +0 -2
- package/lib/exercises/math/calcul/fractions/fractionsSum.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSum.js +0 -2
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSub.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSub.js +0 -12
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.js +0 -12
- package/lib/exercises/math/calcul/mentalCaluls/mentalPercentage.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalPercentage.js +0 -13
- package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.d.ts.map +1 -1
- package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.js +0 -2
- package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.js +0 -2
- package/lib/exercises/math/calculLitteral/equation/equa4.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equa4.js +0 -2
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +4 -4
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +0 -2
- package/lib/exercises/math/calculLitteral/simplifying/evaluateExpression.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/simplifying/evaluateExpression.js +0 -2
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +0 -2
- package/lib/exercises/math/functions/affines/affineExpressionReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineExpressionReading.js +3 -2
- package/lib/exercises/math/functions/affines/interceptReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/interceptReading.js +47 -18
- package/lib/exercises/math/functions/affines/leadingCoefficientCalculV2.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/leadingCoefficientCalculV2.js +46 -13
- package/lib/exercises/math/geometry/cartesian/cartesianFromTwoPoints.d.ts +9 -0
- package/lib/exercises/math/geometry/cartesian/cartesianFromTwoPoints.d.ts.map +1 -0
- package/lib/exercises/math/geometry/cartesian/cartesianFromTwoPoints.js +162 -0
- package/lib/exercises/math/geometry/cartesian/cartesianFromVectorAndPoint.d.ts +10 -0
- package/lib/exercises/math/geometry/cartesian/cartesianFromVectorAndPoint.d.ts.map +1 -0
- package/lib/exercises/math/geometry/cartesian/cartesianFromVectorAndPoint.js +161 -0
- package/lib/exercises/math/geometry/cartesian/directionVector.d.ts +4 -2
- package/lib/exercises/math/geometry/cartesian/directionVector.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/directionVector.js +110 -79
- package/lib/exercises/math/geometry/cartesian/directionVectorEquation.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.js +18 -2
- package/lib/exercises/math/geometry/cartesian/index.d.ts +2 -0
- package/lib/exercises/math/geometry/cartesian/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/index.js +2 -0
- package/lib/exercises/math/geometry/cartesian/pointCoordinates.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/pointCoordinates.js +0 -2
- package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoAxisNumbers.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoAxisNumbers.js +0 -2
- package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoOrthonorm.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoOrthonorm.js +0 -2
- package/lib/exercises/math/geometry/lines/aAndBFromReductEquation.d.ts +9 -0
- package/lib/exercises/math/geometry/lines/aAndBFromReductEquation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/lines/aAndBFromReductEquation.js +108 -0
- package/lib/exercises/math/geometry/lines/directorVectorFromAnother.d.ts +9 -0
- package/lib/exercises/math/geometry/lines/directorVectorFromAnother.d.ts.map +1 -0
- package/lib/exercises/math/geometry/lines/directorVectorFromAnother.js +122 -0
- package/lib/exercises/math/geometry/lines/directorVectorFromReductEquation.d.ts +9 -0
- package/lib/exercises/math/geometry/lines/directorVectorFromReductEquation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/lines/directorVectorFromReductEquation.js +121 -0
- package/lib/exercises/math/geometry/lines/drawLineFromCartesianEquation.d.ts +9 -0
- package/lib/exercises/math/geometry/lines/drawLineFromCartesianEquation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/lines/drawLineFromCartesianEquation.js +115 -0
- package/lib/exercises/math/geometry/lines/index.d.ts +5 -0
- package/lib/exercises/math/geometry/lines/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/index.js +6 -0
- package/lib/exercises/math/geometry/lines/reductEquationFindY.d.ts +10 -0
- package/lib/exercises/math/geometry/lines/reductEquationFindY.d.ts.map +1 -0
- package/lib/exercises/math/geometry/lines/reductEquationFindY.js +105 -0
- package/lib/exercises/math/geometry/lines/reductEquationFromTwoPoints.d.ts +10 -0
- package/lib/exercises/math/geometry/lines/reductEquationFromTwoPoints.d.ts.map +1 -0
- package/lib/exercises/math/geometry/lines/reductEquationFromTwoPoints.js +149 -0
- package/lib/exercises/math/geometry/lines/reductEquationReading.d.ts +8 -0
- package/lib/exercises/math/geometry/lines/reductEquationReading.d.ts.map +1 -0
- package/lib/exercises/math/geometry/lines/reductEquationReading.js +142 -0
- package/lib/exercises/math/geometry/perimeters/squarePerimeter.d.ts.map +1 -1
- package/lib/exercises/math/geometry/perimeters/squarePerimeter.js +0 -2
- package/lib/exercises/math/geometry/vectors/alignementViaColinearity.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/alignementViaColinearity.js +78 -15
- package/lib/exercises/math/geometry/vectors/determinant.js +1 -1
- package/lib/exercises/math/geometry/vectors/lineFromDirectorVector.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/lineFromDirectorVector.js +117 -76
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.js +1 -1
- package/lib/exercises/math/powers/calculateNegativePower.d.ts.map +1 -1
- package/lib/exercises/math/powers/calculateNegativePower.js +0 -2
- package/lib/exercises/math/powers/calculatePower.d.ts.map +1 -1
- package/lib/exercises/math/powers/calculatePower.js +0 -2
- package/lib/exercises/math/powers/decimalToScientific.d.ts.map +1 -1
- package/lib/exercises/math/powers/decimalToScientific.js +0 -15
- package/lib/exercises/math/powers/scientificToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/powers/scientificToDecimal.js +0 -15
- package/lib/exercises/math/primitive/logarithmePrimitive.js +1 -1
- package/lib/exercises/math/probaStat/index.d.ts +1 -0
- package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/index.js +1 -0
- package/lib/exercises/math/probaStat/randomVariable/index.d.ts +5 -0
- package/lib/exercises/math/probaStat/randomVariable/index.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/index.js +4 -0
- package/lib/exercises/math/probaStat/randomVariable/isTableProbabilityLaw.d.ts +10 -0
- package/lib/exercises/math/probaStat/randomVariable/isTableProbabilityLaw.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/isTableProbabilityLaw.js +81 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableAverage.d.ts +9 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableAverage.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableAverage.js +95 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableStandardDeviation.d.ts +9 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableStandardDeviation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableStandardDeviation.js +106 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableVariance.d.ts +9 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableVariance.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableVariance.js +105 -0
- package/lib/index.d.ts +42 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/angle.js +5 -5
- package/lib/math/geometry/line.d.ts +3 -2
- package/lib/math/geometry/line.d.ts.map +1 -1
- package/lib/math/geometry/line.js +32 -20
- package/lib/math/geometry/vector.d.ts +5 -0
- package/lib/math/geometry/vector.d.ts.map +1 -1
- package/lib/math/geometry/vector.js +18 -1
- package/lib/math/probability/randomVariable.d.ts +15 -0
- package/lib/math/probability/randomVariable.d.ts.map +1 -0
- package/lib/math/probability/randomVariable.js +56 -0
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +7 -0
- package/lib/tree/nodes/equations/equalNode.d.ts +2 -2
- package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equalNode.js +2 -2
- package/lib/tree/nodes/node.d.ts +1 -0
- package/lib/tree/nodes/node.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/numberNode.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/numberNode.js +6 -2
- package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts +2 -1
- package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/binomialCoefficientNode.js +7 -2
- package/lib/tree/parsers/latexParser.d.ts.map +1 -1
- package/lib/tree/parsers/latexParser.js +6 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fractionAndIntegerDivision.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionAndIntegerDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAiKF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"fractionAndIntegerDivision.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionAndIntegerDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAiKF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAiB5D,CAAC"}
|
|
@@ -133,9 +133,7 @@ export const fractionAndIntegerDivision = {
|
|
|
133
133
|
id: "fractionAndIntegerDivision",
|
|
134
134
|
connector: "=",
|
|
135
135
|
label: "Division d'un entier par une fraction et vice-versa",
|
|
136
|
-
levels: ["4ème", "3ème", "2nde", "2ndPro", "1rePro", "CAP"],
|
|
137
136
|
isSingleStep: false,
|
|
138
|
-
sections: ["Fractions"],
|
|
139
137
|
generator: (nb) => getDistinctQuestions(getFractionAndIntegerDivision, nb),
|
|
140
138
|
qcmTimer: 60,
|
|
141
139
|
freeTimer: 60,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fractionAndIntegerProduct.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionAndIntegerProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAkBrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AA2IF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"fractionAndIntegerProduct.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionAndIntegerProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAkBrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AA2IF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAmBpE,CAAC"}
|
|
@@ -115,9 +115,7 @@ export const fractionAndIntegerProduct = {
|
|
|
115
115
|
id: "fractionAndIntegerProduct",
|
|
116
116
|
connector: "=",
|
|
117
117
|
label: "Produit d'un entier par une fraction",
|
|
118
|
-
levels: ["4ème", "3ème", "2nde", "CAP", "2ndPro", "1rePro"],
|
|
119
118
|
isSingleStep: false,
|
|
120
|
-
sections: ["Fractions"],
|
|
121
119
|
generator: (nb, opts) => getDistinctQuestions(() => getFractionAndIntegerProduct(opts), nb),
|
|
122
120
|
qcmTimer: 60,
|
|
123
121
|
freeTimer: 60,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fractionsDivision.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,6BAA6B,CAAC;AAkFrC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AAgDF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"fractionsDivision.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,6BAA6B,CAAC;AAkFrC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AAgDF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAcnD,CAAC"}
|
|
@@ -93,8 +93,6 @@ export const fractionsDivision = {
|
|
|
93
93
|
id: "fractionsDivision",
|
|
94
94
|
connector: "=",
|
|
95
95
|
label: "Divisions de fractions",
|
|
96
|
-
levels: ["4ème", "3ème", "2nde", "CAP", "2ndPro", "1rePro"],
|
|
97
|
-
sections: ["Fractions"],
|
|
98
96
|
isSingleStep: false,
|
|
99
97
|
generator: (nb, opts) => getDistinctQuestions(() => getFractionsDivision(opts), nb),
|
|
100
98
|
qcmTimer: 60,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fractionsSum.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsSum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAyGF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"fractionsSum.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsSum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAyGF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAcvD,CAAC"}
|
|
@@ -82,8 +82,6 @@ export const fractionsSum = {
|
|
|
82
82
|
id: "fractionsSum",
|
|
83
83
|
connector: "=",
|
|
84
84
|
label: "Sommes de fractions",
|
|
85
|
-
levels: ["4ème", "3ème", "2nde", "CAP", "2ndPro", "1rePro"],
|
|
86
|
-
sections: ["Fractions"],
|
|
87
85
|
isSingleStep: false,
|
|
88
86
|
generator: (nb, opts) => getDistinctQuestions(() => getFractionsSum(opts), nb),
|
|
89
87
|
qcmTimer: 60,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mentalAddAndSub.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/mentalAddAndSub.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAkEF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"mentalAddAndSub.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/mentalAddAndSub.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAkEF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAWjD,CAAC"}
|
|
@@ -60,18 +60,6 @@ export const mentalAddAndSub = {
|
|
|
60
60
|
id: "mentalAddAndSub",
|
|
61
61
|
connector: "=",
|
|
62
62
|
label: "Additions et soustractions avec des décimaux",
|
|
63
|
-
levels: [
|
|
64
|
-
"6ème",
|
|
65
|
-
"5ème",
|
|
66
|
-
"4ème",
|
|
67
|
-
"3ème",
|
|
68
|
-
"2nde",
|
|
69
|
-
"1reESM",
|
|
70
|
-
"CAP",
|
|
71
|
-
"2ndPro",
|
|
72
|
-
"1rePro",
|
|
73
|
-
],
|
|
74
|
-
sections: ["Calculs"],
|
|
75
63
|
isSingleStep: true,
|
|
76
64
|
generator: (nb) => getDistinctQuestions(getMentalAddAndSub, nb),
|
|
77
65
|
qcmTimer: 60,
|
|
@@ -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,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AA6EF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"mentalMultiplications.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/mentalMultiplications.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AA6EF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAWvD,CAAC"}
|
|
@@ -68,18 +68,6 @@ export const mentalMultiplications = {
|
|
|
68
68
|
id: "mentalMultiplications",
|
|
69
69
|
connector: "=",
|
|
70
70
|
label: "Multiplications avec des décimaux",
|
|
71
|
-
levels: [
|
|
72
|
-
"6ème",
|
|
73
|
-
"5ème",
|
|
74
|
-
"4ème",
|
|
75
|
-
"3ème",
|
|
76
|
-
"2nde",
|
|
77
|
-
"1reESM",
|
|
78
|
-
"CAP",
|
|
79
|
-
"2ndPro",
|
|
80
|
-
"1rePro",
|
|
81
|
-
],
|
|
82
|
-
sections: ["Calculs"],
|
|
83
71
|
isSingleStep: true,
|
|
84
72
|
generator: (nb) => getDistinctQuestions(getMentalMultiplications, nb),
|
|
85
73
|
qcmTimer: 60,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mentalPercentage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/mentalPercentage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,6BAA6B,CAAC;AA0ErC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAoEF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"mentalPercentage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/mentalPercentage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,6BAA6B,CAAC;AA0ErC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAoEF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAWlD,CAAC"}
|
|
@@ -113,19 +113,6 @@ export const mentalPercentage = {
|
|
|
113
113
|
id: "mentalPercentage",
|
|
114
114
|
connector: "=",
|
|
115
115
|
label: "Effectuer mentalement des calculs de pourcentages simples",
|
|
116
|
-
levels: [
|
|
117
|
-
"6ème",
|
|
118
|
-
"5ème",
|
|
119
|
-
"4ème",
|
|
120
|
-
"3ème",
|
|
121
|
-
"2nde",
|
|
122
|
-
"1reESM",
|
|
123
|
-
"CAP",
|
|
124
|
-
"2ndPro",
|
|
125
|
-
"1rePro",
|
|
126
|
-
"TermPro",
|
|
127
|
-
],
|
|
128
|
-
sections: ["Pourcentages"],
|
|
129
116
|
isSingleStep: true,
|
|
130
117
|
generator: (nb) => getDistinctQuestions(getMentalPercentage, nb),
|
|
131
118
|
qcmTimer: 60,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operationsPrioritiesParenthesis.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/operations/operationsPrioritiesParenthesis.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAsHF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"operationsPrioritiesParenthesis.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/operations/operationsPrioritiesParenthesis.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAsHF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAYjE,CAAC"}
|
|
@@ -97,9 +97,7 @@ export const operationsPrioritiesParenthesis = {
|
|
|
97
97
|
id: "operationsPrioritiesParenthesis",
|
|
98
98
|
connector: "=",
|
|
99
99
|
label: "Priorités opératoires avec parenthèses",
|
|
100
|
-
levels: [],
|
|
101
100
|
isSingleStep: true,
|
|
102
|
-
sections: [],
|
|
103
101
|
generator: (nb) => getDistinctQuestions(getOperationsPrioritiesParenthesisQuestion, nb),
|
|
104
102
|
qcmTimer: 60,
|
|
105
103
|
freeTimer: 60,
|
package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binomialsTrinomialsProposedSolutions.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,GAAG,CAAC;IACrB,eAAe,EAAE,GAAG,CAAC;CACtB,CAAC;AA0EF,eAAO,MAAM,oCAAoC,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"binomialsTrinomialsProposedSolutions.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,GAAG,CAAC;IACrB,eAAe,EAAE,GAAG,CAAC;CACtB,CAAC;AA0EF,eAAO,MAAM,oCAAoC,EAAE,QAAQ,CAAC,WAAW,CAYtE,CAAC"}
|
|
@@ -63,9 +63,7 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
63
63
|
export const binomialsTrinomialsProposedSolutions = {
|
|
64
64
|
id: "binomialsTrinomialsProposedSolutions",
|
|
65
65
|
label: "Vérifier si un nombre est solution d'une équation",
|
|
66
|
-
levels: ["1rePro"],
|
|
67
66
|
isSingleStep: true,
|
|
68
|
-
sections: ["Équations"],
|
|
69
67
|
generator: (nb) => getDistinctQuestions(getBinomialsTrinomialsProposedSolutionsQuestion, nb),
|
|
70
68
|
answerType: "QCU",
|
|
71
69
|
qcmTimer: 60,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equa4.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equa4.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAkBrC;;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;AAkGF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"equa4.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equa4.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAkBrC;;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;AAkGF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAkBvD,CAAC"}
|
|
@@ -88,8 +88,6 @@ export const equationType4Exercise = {
|
|
|
88
88
|
id: "equa4",
|
|
89
89
|
connector: "\\iff",
|
|
90
90
|
label: "Résoudre une équation du type $ax+b=cx+d$",
|
|
91
|
-
levels: ["4ème", "3ème", "2nde", "CAP", "2ndPro", "1rePro", "1reTech"],
|
|
92
|
-
sections: ["Équations"],
|
|
93
91
|
isSingleStep: false,
|
|
94
92
|
generator: (nb) => getDistinctQuestions(getEquationType4ExerciseQuestion, nb),
|
|
95
93
|
qcmTimer: 60,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factoIdRmq2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAsBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"factoIdRmq2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAsBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAiIF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAkB7C,CAAC"}
|
|
@@ -89,16 +89,16 @@ const getPropositions = (n, { answer, a, b }) => {
|
|
|
89
89
|
}
|
|
90
90
|
return shuffle(propositions);
|
|
91
91
|
};
|
|
92
|
-
const isAnswerValid = (ans, { answer,
|
|
92
|
+
const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
93
93
|
try {
|
|
94
94
|
const parsed = parseAlgebraic(ans);
|
|
95
|
-
if (!parsed)
|
|
96
|
-
return false;
|
|
97
95
|
if (!isMultiplyNode(parsed) &&
|
|
98
96
|
!isSquareNode(parsed) &&
|
|
99
97
|
!isPowerNode(parsed))
|
|
100
98
|
return false;
|
|
101
|
-
return parsed
|
|
99
|
+
return (parsed
|
|
100
|
+
.simplify({ towardsDistribute: true, forbidFactorize: true })
|
|
101
|
+
.toTex() === getStartStatement(identifiers));
|
|
102
102
|
}
|
|
103
103
|
catch (err) {
|
|
104
104
|
return handleVEAError(err);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factoType1Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoType1Exercise.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAuBrC;;;GAGG;AACH,KAAK,WAAW,GAAG;IAEjB,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAIlB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAoKF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"factoType1Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoType1Exercise.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAuBrC;;;GAGG;AACH,KAAK,WAAW,GAAG;IAEjB,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAIlB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAoKF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAapD,CAAC"}
|
|
@@ -130,8 +130,6 @@ export const factoType1Exercise = {
|
|
|
130
130
|
connector: "=",
|
|
131
131
|
isSingleStep: false,
|
|
132
132
|
label: "Factorisation du type $(ax+b)(cx+d) \\pm (ax+b)(ex+f)$",
|
|
133
|
-
levels: ["3ème", "2nde"],
|
|
134
|
-
sections: ["Calcul littéral"],
|
|
135
133
|
generator: (nb) => getDistinctQuestions(getFactoType1Question, nb),
|
|
136
134
|
qcmTimer: 60,
|
|
137
135
|
freeTimer: 60,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluateExpression.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/simplifying/evaluateExpression.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAoFF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"evaluateExpression.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/simplifying/evaluateExpression.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAoFF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAgBpD,CAAC"}
|
|
@@ -84,8 +84,6 @@ export const evaluateExpression = {
|
|
|
84
84
|
id: "evaluateExpression",
|
|
85
85
|
connector: "=",
|
|
86
86
|
label: "Évaluer une expression",
|
|
87
|
-
levels: ["4ème", "3ème", "2nde", "CAP", "2ndPro"],
|
|
88
|
-
sections: ["Calcul littéral"],
|
|
89
87
|
isSingleStep: true,
|
|
90
88
|
generator: (nb) => getDistinctQuestions(getEvaluateExpression, nb),
|
|
91
89
|
qcmTimer: 60,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affineExpressionFromTwoImages.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineExpressionFromTwoImages.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAgIF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"affineExpressionFromTwoImages.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineExpressionFromTwoImages.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAgIF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAiB/D,CAAC"}
|
|
@@ -113,9 +113,7 @@ export const affineExpressionFromTwoImages = {
|
|
|
113
113
|
id: "affineExpressionFromTwoImages",
|
|
114
114
|
connector: "=",
|
|
115
115
|
label: "Expression algébrique d'une fonction affine via deux images",
|
|
116
|
-
levels: ["3ème", "2nde", "2ndPro", "1rePro", "1reTech"],
|
|
117
116
|
isSingleStep: true,
|
|
118
|
-
sections: ["Fonctions affines", "Droites"],
|
|
119
117
|
generator: (nb) => getDistinctQuestions(getAffineExpressionFromTwoImagesQuestion, nb),
|
|
120
118
|
qcmTimer: 60,
|
|
121
119
|
freeTimer: 60,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affineExpressionReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineExpressionReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"affineExpressionReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineExpressionReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAgBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAuIF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAazD,CAAC"}
|
|
@@ -45,6 +45,9 @@ const getAffineExpressionReadingQuestion = () => {
|
|
|
45
45
|
const b = randint(-5, 6);
|
|
46
46
|
const secondPoint = [randint(-5, 6, [0]), randint(-5, 6)];
|
|
47
47
|
const identifiers = { b, secondPoint };
|
|
48
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
49
|
+
};
|
|
50
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
48
51
|
const question = {
|
|
49
52
|
answer: getAnswer(identifiers),
|
|
50
53
|
instruction: getInstruction(identifiers),
|
|
@@ -104,9 +107,7 @@ export const affineExpressionReading = {
|
|
|
104
107
|
id: "affineExpressionReading",
|
|
105
108
|
connector: "=",
|
|
106
109
|
label: "Lire graphiquement l'expression d'une fonction affine",
|
|
107
|
-
levels: ["2nde", "1reESM", "1rePro", "1reSpé", "1reTech"],
|
|
108
110
|
isSingleStep: true,
|
|
109
|
-
sections: ["Droites", "Fonctions affines"],
|
|
110
111
|
generator: (nb) => getDistinctQuestions(getAffineExpressionReadingQuestion, nb),
|
|
111
112
|
qcmTimer: 60,
|
|
112
113
|
freeTimer: 60,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interceptReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/interceptReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"interceptReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/interceptReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AA+FF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAclD,CAAC"}
|
|
@@ -2,34 +2,60 @@ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exer
|
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { randomColor } from "../../../../geogebra/colors.js";
|
|
4
4
|
import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
|
|
5
|
+
import { approxEqual } from "../../../../geogebra/parsers/approxEqual.js";
|
|
5
6
|
import { frenchify } from "../../../../math/utils/latex/frenchify.js";
|
|
6
7
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
7
8
|
import { round } from "../../../../math/utils/round.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
import { valueParser } from "../../../../tree/parsers/valueParser.js";
|
|
10
|
+
const getInstruction = (identifiers) => {
|
|
11
|
+
return `Déterminer graphiquement l'ordonnée à l'origine $b$ de la droite tracée ci-dessous : `;
|
|
12
|
+
};
|
|
13
|
+
const getAnswer = (identifiers) => {
|
|
14
|
+
const { b, secondPoint } = identifiers;
|
|
15
|
+
return b + "";
|
|
16
|
+
};
|
|
17
|
+
const getHint = (identifiers) => {
|
|
18
|
+
return `L'ordonnée à l'origine est l'ordonnée du point d'abscisse $0$ de la droite.`;
|
|
19
|
+
};
|
|
20
|
+
const getCorrection = (identifiers) => {
|
|
21
|
+
return `L'ordonnée à l'origine est l'ordonnée du point d'abscisse $0$ de la droite. En d'autres termes, c'est l'ordonnée du point d'intersection de la droite et de l'axe des ordonnées.
|
|
22
|
+
|
|
23
|
+
On lit graphiquement que l'ordonnée à l'origine est donc $${getAnswer(identifiers)}$.`;
|
|
24
|
+
};
|
|
25
|
+
const getGGBOptions = (identifiers) => {
|
|
26
|
+
const { b, secondPoint } = identifiers;
|
|
16
27
|
const commands = [
|
|
17
28
|
`l = Line((0, ${b}), (${secondPoint[0]}, ${secondPoint[1]}))`,
|
|
18
29
|
`SetColor(l, "${randomColor()}")`,
|
|
19
30
|
"SetFixed(l, true)",
|
|
20
31
|
];
|
|
32
|
+
let xMin = Math.min(0, secondPoint[0]);
|
|
33
|
+
let xMax = Math.max(0, secondPoint[0]);
|
|
34
|
+
let yMin = Math.min(b, secondPoint[1]);
|
|
35
|
+
let yMax = Math.max(b, secondPoint[1]);
|
|
21
36
|
const ggb = new GeogebraConstructor({
|
|
22
37
|
commands,
|
|
23
38
|
});
|
|
39
|
+
return ggb.getOptions({
|
|
40
|
+
coords: ggb.getAdaptedCoords({ xMin, xMax, yMin, yMax }),
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
const getInterceptReadingQuestion = () => {
|
|
44
|
+
const b = randint(-5, 6);
|
|
45
|
+
const secondPoint = [randint(-5, 6, [0]), randint(-5, 6)];
|
|
46
|
+
const identifiers = { b, secondPoint };
|
|
47
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
48
|
+
};
|
|
49
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
24
50
|
const question = {
|
|
25
|
-
answer,
|
|
26
|
-
instruction:
|
|
51
|
+
answer: getAnswer(identifiers),
|
|
52
|
+
instruction: getInstruction(identifiers),
|
|
27
53
|
keys: [],
|
|
28
|
-
ggbOptions:
|
|
29
|
-
coords: ggb.getAdaptedCoords({ xMin, xMax, yMin, yMax }),
|
|
30
|
-
}),
|
|
54
|
+
ggbOptions: getGGBOptions(identifiers),
|
|
31
55
|
answerFormat: "tex",
|
|
32
|
-
identifiers
|
|
56
|
+
identifiers,
|
|
57
|
+
hint: getHint(identifiers),
|
|
58
|
+
correction: getCorrection(identifiers),
|
|
33
59
|
};
|
|
34
60
|
return question;
|
|
35
61
|
};
|
|
@@ -47,15 +73,16 @@ const getPropositions = (n, { answer, b, secondPoint }) => {
|
|
|
47
73
|
return shuffleProps(propositions, n);
|
|
48
74
|
};
|
|
49
75
|
const isAnswerValid = (ans, { answer, secondPoint, b }) => {
|
|
50
|
-
|
|
76
|
+
const parsed = valueParser(ans);
|
|
77
|
+
if (parsed === false)
|
|
78
|
+
return false;
|
|
79
|
+
return approxEqual(parsed, b, 0.5);
|
|
51
80
|
};
|
|
52
81
|
export const interceptReading = {
|
|
53
82
|
id: "interceptReading",
|
|
54
83
|
connector: "=",
|
|
55
|
-
label: "Lire graphiquement l'ordonnée à l'origine",
|
|
56
|
-
levels: ["2nde", "1reESM", "1rePro", "1reSpé", "1reTech"],
|
|
84
|
+
label: "Lire graphiquement l'ordonnée à l'origine d'une droite",
|
|
57
85
|
isSingleStep: true,
|
|
58
|
-
sections: ["Droites", "Fonctions affines"],
|
|
59
86
|
generator: (nb) => getDistinctQuestions(getInterceptReadingQuestion, nb),
|
|
60
87
|
qcmTimer: 60,
|
|
61
88
|
freeTimer: 60,
|
|
@@ -63,4 +90,6 @@ export const interceptReading = {
|
|
|
63
90
|
isAnswerValid,
|
|
64
91
|
hasGeogebra: true,
|
|
65
92
|
subject: "Mathématiques",
|
|
93
|
+
getQuestionFromIdentifiers,
|
|
94
|
+
hasHintAndCorrection: true,
|
|
66
95
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leadingCoefficientCalculV2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/leadingCoefficientCalculV2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"leadingCoefficientCalculV2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/leadingCoefficientCalculV2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAkFF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAe5D,CAAC"}
|
|
@@ -2,18 +2,54 @@ import { addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise
|
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { Rational } from "../../../../math/numbers/rationals/rational.js";
|
|
4
4
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
+
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
6
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
7
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
5
8
|
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
9
|
+
const getHint = (identifers) => {
|
|
10
|
+
return `Pour déterminer le coefficient directeur $a$ à partir de deux points $A(x_A; y_A)$ et $B(x_B;y_B)$ de la droite, on utilise la formule :
|
|
11
|
+
|
|
12
|
+
$$
|
|
13
|
+
a = \\frac{y_B-y_A}{x_B-x_A}
|
|
14
|
+
$$`;
|
|
15
|
+
};
|
|
16
|
+
const getCorrection = (identifiers) => {
|
|
17
|
+
const { xA, yA, xB, yB } = identifiers;
|
|
18
|
+
return `Le coefficient directeur $a$ est égal à :
|
|
19
|
+
|
|
20
|
+
$$
|
|
21
|
+
a = ${frac(substract(yB, yA), substract(xB, xA)).toSimplificationTex()}
|
|
22
|
+
$$`;
|
|
23
|
+
};
|
|
24
|
+
const getInstruction = (identifiers) => {
|
|
25
|
+
const { xA, yA, xB, yB } = identifiers;
|
|
26
|
+
return `Soit $d$ une droite passant par les points $A(${xA};${yA})$ et $B(${xB};${yB})$.
|
|
27
|
+
|
|
28
|
+
Déterminer le coefficient directeur de $d$.`;
|
|
29
|
+
};
|
|
30
|
+
const getAnswer = (identifiers) => {
|
|
31
|
+
const { xA, yA, xB, yB } = identifiers;
|
|
32
|
+
const answer = frac(yB - yA, xB - xA)
|
|
33
|
+
.simplify()
|
|
34
|
+
.toTex();
|
|
35
|
+
return answer;
|
|
36
|
+
};
|
|
6
37
|
const getLeadingCoefficientCalculV1Question = () => {
|
|
7
38
|
const [xA, yA] = [1, 2].map((el) => randint(-9, 10));
|
|
8
39
|
const xB = randint(-9, 10, [xA]);
|
|
9
40
|
const yB = randint(-9, 10);
|
|
10
|
-
const
|
|
41
|
+
const identifiers = { xA, xB, yA, yB };
|
|
42
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
43
|
+
};
|
|
44
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
11
45
|
const question = {
|
|
12
|
-
instruction:
|
|
13
|
-
answer:
|
|
46
|
+
instruction: getInstruction(identifiers),
|
|
47
|
+
answer: getAnswer(identifiers),
|
|
14
48
|
answerFormat: "tex",
|
|
15
49
|
keys: [],
|
|
16
|
-
identifiers:
|
|
50
|
+
identifiers: identifiers,
|
|
51
|
+
hint: getHint(identifiers),
|
|
52
|
+
correction: getCorrection(identifiers),
|
|
17
53
|
};
|
|
18
54
|
return question;
|
|
19
55
|
};
|
|
@@ -29,24 +65,21 @@ const getPropositions = (n, { answer, xA, xB, yA, yB }) => {
|
|
|
29
65
|
}
|
|
30
66
|
return shuffle(propositions);
|
|
31
67
|
};
|
|
32
|
-
const isAnswerValid = (ans, { xA, xB, yA, yB }) => {
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
.toTree({ allowFractionToDecimal: true });
|
|
36
|
-
const texs = answer.toAllValidTexs();
|
|
37
|
-
return texs.includes(ans);
|
|
68
|
+
const isAnswerValid = (ans, { answer, xA, xB, yA, yB }) => {
|
|
69
|
+
const parsed = parseAlgebraic(ans);
|
|
70
|
+
return parsed.simplify({ decimalToFractions: true }).toTex() === answer;
|
|
38
71
|
};
|
|
39
72
|
export const leadingCoefficientCalculV2 = {
|
|
40
73
|
id: "leadingCoefficientCalculV2",
|
|
41
74
|
connector: "=",
|
|
42
|
-
label: "Calculer le coefficient directeur d'une
|
|
43
|
-
levels: ["3ème", "2nde", "2ndPro", "1rePro", "1reTech"],
|
|
75
|
+
label: "Calculer le coefficient directeur d'une droite à l'aide de deux points",
|
|
44
76
|
isSingleStep: false,
|
|
45
|
-
sections: ["Droites", "Fonctions affines"],
|
|
46
77
|
generator: (nb) => getDistinctQuestions(getLeadingCoefficientCalculV1Question, nb),
|
|
47
78
|
qcmTimer: 60,
|
|
48
79
|
freeTimer: 60,
|
|
49
80
|
getPropositions,
|
|
50
81
|
isAnswerValid,
|
|
51
82
|
subject: "Mathématiques",
|
|
83
|
+
getQuestionFromIdentifiers,
|
|
84
|
+
hasHintAndCorrection: true,
|
|
52
85
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { PointIdentifiers } from "../../../../math/geometry/point.js";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
pointIdentifiers: PointIdentifiers;
|
|
5
|
+
pointBIdentifiers: PointIdentifiers;
|
|
6
|
+
};
|
|
7
|
+
export declare const cartesianFromTwoPoints: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=cartesianFromTwoPoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cartesianFromTwoPoints.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/cartesianFromTwoPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAoBtC,KAAK,WAAW,GAAG;IACjB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,iBAAiB,EAAE,gBAAgB,CAAC;CACrC,CAAC;AA2JF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAkBxD,CAAC"}
|