math-exercises 3.0.52 → 3.0.54
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 +3 -17
- 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 +8 -3
- package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.js +53 -30
- 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/equation/multiplicationEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +3 -0
- 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/calculLitteral/systems/basicNiceValuesSystemResolution.d.ts +2 -2
- package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.js +52 -25
- package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.d.ts +2 -2
- package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.js +50 -33
- package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.d.ts +2 -1
- package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.js +37 -17
- 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/angles/recognizeAngleType.d.ts.map +1 -1
- package/lib/exercises/math/geometry/angles/recognizeAngleType.js +33 -12
- package/lib/exercises/math/geometry/areas/circleArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/circleArea.js +45 -2
- package/lib/exercises/math/geometry/areas/squareArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/squareArea.js +40 -7
- package/lib/exercises/math/geometry/areas/triangleArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.js +52 -7
- 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/directionVectorEquation.js +55 -11
- 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/cartesianEquationToReduced.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/cartesianEquationToReduced.js +20 -1
- package/lib/exercises/math/geometry/lines/cartesianEquationsIntersection.d.ts +9 -0
- package/lib/exercises/math/geometry/lines/cartesianEquationsIntersection.d.ts.map +1 -0
- package/lib/exercises/math/geometry/lines/cartesianEquationsIntersection.js +115 -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 +10 -0
- package/lib/exercises/math/geometry/lines/drawLineFromCartesianEquation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/lines/drawLineFromCartesianEquation.js +124 -0
- package/lib/exercises/math/geometry/lines/drawLineFromPointAndVector.d.ts +10 -0
- package/lib/exercises/math/geometry/lines/drawLineFromPointAndVector.d.ts.map +1 -0
- package/lib/exercises/math/geometry/lines/drawLineFromPointAndVector.js +123 -0
- package/lib/exercises/math/geometry/lines/findParallelLineFromCartesianEquation.d.ts +12 -0
- package/lib/exercises/math/geometry/lines/findParallelLineFromCartesianEquation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/lines/findParallelLineFromCartesianEquation.js +130 -0
- package/lib/exercises/math/geometry/lines/findParallelLineFromReductEquation.d.ts +10 -0
- package/lib/exercises/math/geometry/lines/findParallelLineFromReductEquation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/lines/findParallelLineFromReductEquation.js +109 -0
- package/lib/exercises/math/geometry/lines/index.d.ts +10 -0
- package/lib/exercises/math/geometry/lines/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/index.js +10 -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/circleCircumference.d.ts.map +1 -1
- package/lib/exercises/math/geometry/perimeters/circleCircumference.js +58 -9
- package/lib/exercises/math/geometry/perimeters/rectanglePerimeter.d.ts.map +1 -1
- package/lib/exercises/math/geometry/perimeters/rectanglePerimeter.js +39 -6
- package/lib/exercises/math/geometry/perimeters/squarePerimeter.d.ts.map +1 -1
- package/lib/exercises/math/geometry/perimeters/squarePerimeter.js +40 -7
- package/lib/exercises/math/geometry/perimeters/trianglePerimeter.d.ts.map +1 -1
- package/lib/exercises/math/geometry/perimeters/trianglePerimeter.js +34 -7
- package/lib/exercises/math/geometry/pythagore/pythagore.d.ts.map +1 -1
- package/lib/exercises/math/geometry/pythagore/pythagore.js +51 -15
- package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.d.ts.map +1 -1
- package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +109 -19
- package/lib/exercises/math/geometry/thales/thales.d.ts.map +1 -1
- package/lib/exercises/math/geometry/thales/thales.js +36 -5
- package/lib/exercises/math/geometry/triangles/triangleNature.d.ts.map +1 -1
- package/lib/exercises/math/geometry/triangles/triangleNature.js +45 -14
- 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/colinearity.d.ts +5 -4
- package/lib/exercises/math/geometry/vectors/colinearity.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/colinearity.js +82 -21
- package/lib/exercises/math/geometry/vectors/determinant.js +1 -1
- package/lib/exercises/math/geometry/vectors/findCoordForAligment.d.ts +2 -0
- package/lib/exercises/math/geometry/vectors/findCoordForAligment.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/findCoordForAligment.js +92 -0
- 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 +63 -8
- 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/powerDefinition.d.ts.map +1 -1
- package/lib/exercises/math/powers/powerDefinition.js +39 -8
- package/lib/exercises/math/powers/powersOfTenToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersOfTenToDecimal.js +2 -1
- package/lib/exercises/math/powers/powersPower.d.ts +5 -2
- package/lib/exercises/math/powers/powersPower.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersPower.js +59 -28
- 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/exercises/math/trigonometry/calculateCosSinAndTan.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/calculateCosSinAndTan.js +21 -0
- package/lib/exercises/math/trigonometry/mainRemarkableValues.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/mainRemarkableValues.js +1 -1
- package/lib/exercises/math/trigonometry/remarkableValues.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/remarkableValues.js +3 -0
- package/lib/index.d.ts +76 -15
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/angle.d.ts.map +1 -1
- package/lib/math/geometry/angle.js +12 -7
- package/lib/math/geometry/line.d.ts +5 -10
- package/lib/math/geometry/line.d.ts.map +1 -1
- package/lib/math/geometry/line.js +71 -37
- package/lib/math/geometry/point.d.ts +2 -1
- package/lib/math/geometry/point.d.ts.map +1 -1
- package/lib/math/geometry/point.js +3 -0
- package/lib/math/geometry/segment.js +1 -1
- package/lib/math/geometry/triangles/triangle.d.ts.map +1 -1
- package/lib/math/geometry/triangles/triangle.js +11 -11
- package/lib/math/geometry/vector.d.ts +6 -0
- package/lib/math/geometry/vector.d.ts.map +1 -1
- package/lib/math/geometry/vector.js +30 -4
- 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/math/systems/generalSystem.d.ts +12 -1
- package/lib/math/systems/generalSystem.d.ts.map +1 -1
- package/lib/math/systems/generalSystem.js +92 -55
- package/lib/math/trigonometry/remarkableValue.d.ts.map +1 -1
- package/lib/math/trigonometry/remarkableValue.js +1 -1
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +1 -8
- package/lib/server.js +1 -1
- package/lib/tree/nodes/algebraicNode.d.ts +0 -1
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equalNode.d.ts +3 -3
- package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equalNode.js +3 -3
- package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/cosNode.js +11 -5
- package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sinNode.js +11 -5
- package/lib/tree/nodes/functions/tanNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/tanNode.js +11 -5
- package/lib/tree/nodes/node.d.ts +9 -8
- package/lib/tree/nodes/node.d.ts.map +1 -1
- package/lib/tree/nodes/nodeConstructor.d.ts.map +1 -1
- package/lib/tree/nodes/nodeConstructor.js +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/nodes/operators/fractionNode.js +2 -2
- package/lib/tree/nodes/operators/multiplyNode.js +1 -1
- package/lib/tree/nodes/operators/powerNode.d.ts +4 -4
- package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/powerNode.js +5 -5
- 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;
|
|
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;AAUrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AA8DF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAWjD,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { numberVEA } from "../../../../exercises/vea/numberVEA.js";
|
|
3
4
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
4
5
|
import { round } from "../../../../math/utils/round.js";
|
|
5
6
|
import { NumberNode } from "../../../../tree/nodes/numbers/numberNode.js";
|
|
@@ -50,28 +51,13 @@ const getPropositions = (n, { answer, numbers }) => {
|
|
|
50
51
|
}
|
|
51
52
|
return shuffle(propositions);
|
|
52
53
|
};
|
|
53
|
-
const isAnswerValid = (
|
|
54
|
-
|
|
55
|
-
const answerTree = new NumberNode(round(sum, 2));
|
|
56
|
-
const texs = answerTree.toAllValidTexs();
|
|
57
|
-
return texs.includes(studentAns);
|
|
54
|
+
const isAnswerValid = (ans, { answer, numbers }) => {
|
|
55
|
+
return numberVEA(ans, answer);
|
|
58
56
|
};
|
|
59
57
|
export const mentalAddAndSub = {
|
|
60
58
|
id: "mentalAddAndSub",
|
|
61
59
|
connector: "=",
|
|
62
60
|
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
61
|
isSingleStep: true,
|
|
76
62
|
generator: (nb) => getDistinctQuestions(getMentalAddAndSub, nb),
|
|
77
63
|
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
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { EqualNodeIdentifiers } from "../../../../tree/nodes/equations/equalNode.js";
|
|
3
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
|
|
2
4
|
type Identifiers = {
|
|
3
|
-
solutionNodeIds:
|
|
4
|
-
equationNodeIds:
|
|
5
|
+
solutionNodeIds: NodeIdentifiers;
|
|
6
|
+
equationNodeIds: EqualNodeIdentifiers;
|
|
5
7
|
};
|
|
6
|
-
|
|
8
|
+
type Options = {
|
|
9
|
+
degree: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const binomialsTrinomialsProposedSolutions: Exercise<Identifiers, Options>;
|
|
7
12
|
export {};
|
|
8
13
|
//# sourceMappingURL=binomialsTrinomialsProposedSolutions.d.ts.map
|
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,
|
|
1
|
+
{"version":3,"file":"binomialsTrinomialsProposedSolutions.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAGL,oBAAoB,EACrB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAW7C,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,eAAe,CAAC;IACjC,eAAe,EAAE,oBAAoB,CAAC;CACvC,CAAC;AA2FF,KAAK,OAAO,GAAG;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAYF,eAAO,MAAM,oCAAoC,EAAE,QAAQ,CACzD,WAAW,EACX,OAAO,CAiBR,CAAC"}
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
1
|
+
import { GeneratorOptionTarget, GeneratorOptionType, addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { Affine } from "../../../../math/polynomials/affine.js";
|
|
4
4
|
import { Trinom } from "../../../../math/polynomials/trinom.js";
|
|
5
5
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
6
|
-
import { EqualNode } from "../../../../tree/nodes/equations/equalNode.js";
|
|
6
|
+
import { EqualNode, } from "../../../../tree/nodes/equations/equalNode.js";
|
|
7
|
+
import { reifyAlgebraic, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
8
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
7
9
|
import { FractionNode } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
8
|
-
import { SubstractNode } from "../../../../tree/nodes/operators/substractNode.js";
|
|
10
|
+
import { substract, SubstractNode, } from "../../../../tree/nodes/operators/substractNode.js";
|
|
9
11
|
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
12
|
+
import { random } from "../../../../utils/alea/random.js";
|
|
13
|
+
const getInstruction = (identifiers) => {
|
|
14
|
+
const { solutionNodeIds, equationNodeIds } = identifiers;
|
|
15
|
+
const solution = reifyAlgebraic(solutionNodeIds, true);
|
|
16
|
+
const equation = reifyAlgebraic(equationNodeIds, true);
|
|
17
|
+
return `Le nombre $${solution.toTex()}$ est-il une solution de l'équation $${equation.toTex()}$ ?`;
|
|
18
|
+
};
|
|
10
19
|
function generateTrinomialFromRoot(root, constante) {
|
|
11
20
|
const a = randint(1, 5);
|
|
12
21
|
const r2 = randint(-10, 10, [0]);
|
|
@@ -14,63 +23,77 @@ function generateTrinomialFromRoot(root, constante) {
|
|
|
14
23
|
const c = root * r2;
|
|
15
24
|
return new Trinom(a, a * b, a * c + constante);
|
|
16
25
|
}
|
|
17
|
-
const getBinomialsTrinomialsProposedSolutionsQuestion = () => {
|
|
18
|
-
const degree =
|
|
26
|
+
const getBinomialsTrinomialsProposedSolutionsQuestion = (opts) => {
|
|
27
|
+
const degree = opts?.degree === "Second degré"
|
|
28
|
+
? 2
|
|
29
|
+
: opts?.degree === "Premier degré"
|
|
30
|
+
? 1
|
|
31
|
+
: random([1, 2]);
|
|
19
32
|
const constante = randint(-10, 10);
|
|
20
33
|
const root = randint(-10, 10, [0]);
|
|
21
34
|
const trinomial = generateTrinomialFromRoot(root, constante);
|
|
22
35
|
const a1 = randint(-10, 10, [0]);
|
|
23
36
|
const b1 = randint(-10, 10);
|
|
24
|
-
|
|
25
|
-
do {
|
|
26
|
-
a2 = randint(-10, 10, [0]);
|
|
27
|
-
} while (a2 === a1);
|
|
37
|
+
const a2 = randint(-10, 10, [0, a1]);
|
|
28
38
|
const b2 = randint(-10, 10);
|
|
29
39
|
const binomial1 = new Affine(a1, b1);
|
|
30
40
|
const binomial2 = new Affine(a2, b2);
|
|
31
|
-
const equation = degree
|
|
41
|
+
const equation = degree === 2
|
|
32
42
|
? new EqualNode(trinomial.toTree(), constante.toTree())
|
|
33
43
|
: new EqualNode(binomial1.toTree(), binomial2.toTree());
|
|
34
|
-
const ans = degree
|
|
44
|
+
const ans = degree === 2
|
|
35
45
|
? root.toTree()
|
|
36
46
|
: new FractionNode(new SubstractNode(binomial2.b.toTree(), binomial1.b.toTree()), new SubstractNode(binomial1.a.toTree(), binomial2.a.toTree())).simplify();
|
|
37
|
-
const
|
|
38
|
-
const solution =
|
|
39
|
-
const
|
|
47
|
+
const isSol = coinFlip();
|
|
48
|
+
const solution = isSol ? ans : add(ans, randint(-2, 3, [0])).simplify();
|
|
49
|
+
const identifiers = {
|
|
50
|
+
equationNodeIds: equation.toIdentifiers(),
|
|
51
|
+
solutionNodeIds: solution.toIdentifiers(),
|
|
52
|
+
};
|
|
53
|
+
return getQuestionFromIdentifiers(identifiers, opts);
|
|
54
|
+
};
|
|
55
|
+
const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
40
56
|
const question = {
|
|
41
|
-
|
|
42
|
-
instruction: `Le nombre $${solution.toTex()}$ est-il une solution de l'équation $${equation.toTex()}$ ?`,
|
|
43
|
-
keys: [],
|
|
57
|
+
instruction: getInstruction(identifiers, opts),
|
|
44
58
|
answerFormat: "raw",
|
|
45
|
-
identifiers
|
|
46
|
-
equationNodeIds: equation.toIdentifiers(),
|
|
47
|
-
solutionNodeIds: solution.toIdentifiers(),
|
|
48
|
-
},
|
|
59
|
+
identifiers,
|
|
49
60
|
};
|
|
50
61
|
return question;
|
|
51
62
|
};
|
|
52
|
-
const getPropositions = (n, { answer }) => {
|
|
63
|
+
const getPropositions = (n, { answer, ...identifiers }, opts) => {
|
|
53
64
|
const propositions = [];
|
|
54
|
-
|
|
65
|
+
const { solutionNodeIds, equationNodeIds } = identifiers;
|
|
66
|
+
const solution = reifyAlgebraic(solutionNodeIds, true);
|
|
67
|
+
const equation = reifyAlgebraic(equationNodeIds, true);
|
|
68
|
+
const allLeft = substract(equation.leftChild, equation.rightChild);
|
|
69
|
+
const ev = allLeft.toDetailedEvaluation({ x: solution }).simplify();
|
|
70
|
+
const isSol = ev.evaluate() === 0;
|
|
71
|
+
addValidProp(propositions, isSol ? "Oui" : "Non", "raw");
|
|
55
72
|
tryToAddWrongProp(propositions, "Oui", "raw");
|
|
56
73
|
tryToAddWrongProp(propositions, "Non", "raw");
|
|
57
74
|
tryToAddWrongProp(propositions, "On ne peut pas savoir", "raw");
|
|
58
75
|
return shuffleProps(propositions, n);
|
|
59
76
|
};
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
77
|
+
const options = [
|
|
78
|
+
{
|
|
79
|
+
id: "degree",
|
|
80
|
+
label: "Degré de l'équation",
|
|
81
|
+
target: GeneratorOptionTarget.generation,
|
|
82
|
+
type: GeneratorOptionType.select,
|
|
83
|
+
defaultValue: "Les deux",
|
|
84
|
+
values: ["Premier degré", "Second degré", "Les deux"],
|
|
85
|
+
},
|
|
86
|
+
];
|
|
63
87
|
export const binomialsTrinomialsProposedSolutions = {
|
|
64
88
|
id: "binomialsTrinomialsProposedSolutions",
|
|
65
89
|
label: "Vérifier si un nombre est solution d'une équation",
|
|
66
|
-
levels: ["1rePro"],
|
|
67
90
|
isSingleStep: true,
|
|
68
|
-
|
|
69
|
-
generator: (nb) => getDistinctQuestions(getBinomialsTrinomialsProposedSolutionsQuestion, nb),
|
|
91
|
+
generator: (nb, opts) => getDistinctQuestions(() => getBinomialsTrinomialsProposedSolutionsQuestion(opts), nb),
|
|
70
92
|
answerType: "QCU",
|
|
71
93
|
qcmTimer: 60,
|
|
72
94
|
freeTimer: 60,
|
|
73
95
|
getPropositions,
|
|
74
|
-
isAnswerValid,
|
|
75
96
|
subject: "Mathématiques",
|
|
97
|
+
getQuestionFromIdentifiers,
|
|
98
|
+
options,
|
|
76
99
|
};
|
|
@@ -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":"multiplicationEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/multiplicationEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"multiplicationEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/multiplicationEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAarC,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;AA8HF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAiBxD,CAAC"}
|
|
@@ -67,6 +67,9 @@ const getMultiplicationEquation = () => {
|
|
|
67
67
|
d = randint(-9, 10, [0]);
|
|
68
68
|
} while (a / c === b / d);
|
|
69
69
|
const identifiers = { a, b, c, d };
|
|
70
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
71
|
+
};
|
|
72
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
70
73
|
const question = {
|
|
71
74
|
instruction: getInstruction(identifiers),
|
|
72
75
|
startStatement: getStartStatement(identifiers),
|
|
@@ -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,7 +1,7 @@
|
|
|
1
1
|
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
|
|
2
3
|
type Identifiers = {
|
|
3
|
-
|
|
4
|
-
isXAsked: boolean;
|
|
4
|
+
coeffsIds: NodeIdentifiers[][];
|
|
5
5
|
};
|
|
6
6
|
export declare const basicNiceValuesSystemResolution: Exercise<Identifiers>;
|
|
7
7
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basicNiceValuesSystemResolution.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"basicNiceValuesSystemResolution.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AASrC,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAKtE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,EAAE,EAAE,CAAC;CAIhC,CAAC;AA2EF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAgBjE,CAAC"}
|
|
@@ -1,44 +1,69 @@
|
|
|
1
1
|
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { Point, PointConstructor } from "../../../../math/geometry/point.js";
|
|
4
|
+
import { GeneralSystemConstructor, } from "../../../../math/systems/generalSystem.js";
|
|
5
|
+
import { pointParser } from "../../../../tree/parsers/pointParser.js";
|
|
6
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
6
7
|
//{ a1x + b1y = c1 , a2x + b2y = c2}
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
const rebuildIdentifiers = (oldIds) => {
|
|
9
|
+
if (oldIds?.coeffsIds?.length)
|
|
10
|
+
return oldIds;
|
|
11
|
+
return {
|
|
12
|
+
coeffsIds: oldIds.coeffs.map((row) => row.map((e) => e.toTree())),
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
const getInstruction = (identifiers) => {
|
|
16
|
+
const sys = GeneralSystemConstructor.fromIdentifiers(identifiers);
|
|
17
|
+
return `Résoudre le système d'équations suivant :
|
|
18
|
+
|
|
18
19
|
$$
|
|
19
20
|
${sys.toTex()}
|
|
20
21
|
$$
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
|
|
23
|
+
*Donner le couple solution sous la forme $\\left(x;y\\right)$ : par exemple, si la solution est $x=2$ et $y=3$, alors on écrira $\\left(2;3\\right)$.*`;
|
|
24
|
+
};
|
|
25
|
+
const getAnswer = (identifiers) => {
|
|
26
|
+
const sys = GeneralSystemConstructor.fromIdentifiers(identifiers);
|
|
27
|
+
const { x, y } = sys.solve();
|
|
28
|
+
return new Point("A", x, y).toCoords();
|
|
29
|
+
};
|
|
30
|
+
const getBasicSystemResolutionQuestion = () => {
|
|
31
|
+
const sys = GeneralSystemConstructor.niceValues();
|
|
32
|
+
const identifiers = {
|
|
33
|
+
coeffsIds: sys.toIdentifiers().coeffsIds,
|
|
34
|
+
};
|
|
35
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
36
|
+
};
|
|
37
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
38
|
+
const question = {
|
|
39
|
+
answer: getAnswer(identifiers),
|
|
40
|
+
instruction: getInstruction(identifiers),
|
|
23
41
|
keys: [],
|
|
24
42
|
answerFormat: "tex",
|
|
25
|
-
identifiers
|
|
43
|
+
identifiers,
|
|
26
44
|
};
|
|
27
45
|
return question;
|
|
28
46
|
};
|
|
29
|
-
const getPropositions = (n, { answer,
|
|
47
|
+
const getPropositions = (n, { answer, ...identifiers }) => {
|
|
30
48
|
const propositions = [];
|
|
31
|
-
const sys = new System(coeffs);
|
|
32
|
-
const { x, y } = sys.solve();
|
|
33
49
|
addValidProp(propositions, answer);
|
|
34
|
-
tryToAddWrongProp(propositions, isXAsked ? y.toTex() : x.toTex());
|
|
50
|
+
// tryToAddWrongProp(propositions, isXAsked ? y.toTex() : x.toTex());
|
|
35
51
|
while (propositions.length < n) {
|
|
36
|
-
|
|
52
|
+
const point = PointConstructor.random("A");
|
|
53
|
+
tryToAddWrongProp(propositions, point.toCoords());
|
|
37
54
|
}
|
|
38
55
|
return shuffleProps(propositions, n);
|
|
39
56
|
};
|
|
40
|
-
const isAnswerValid = (ans, { answer,
|
|
41
|
-
|
|
57
|
+
const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
58
|
+
try {
|
|
59
|
+
const parsed = pointParser(ans);
|
|
60
|
+
if (!parsed)
|
|
61
|
+
return false;
|
|
62
|
+
return parsed.simplify().toCoords() === answer;
|
|
63
|
+
}
|
|
64
|
+
catch (err) {
|
|
65
|
+
return handleVEAError(err);
|
|
66
|
+
}
|
|
42
67
|
};
|
|
43
68
|
export const basicNiceValuesSystemResolution = {
|
|
44
69
|
id: "basicNiceValuesSystemResolution",
|
|
@@ -47,10 +72,12 @@ export const basicNiceValuesSystemResolution = {
|
|
|
47
72
|
levels: ["2nde", "1reSpé"],
|
|
48
73
|
isSingleStep: true,
|
|
49
74
|
sections: ["Systèmes"],
|
|
50
|
-
generator: (nb) => getDistinctQuestions(
|
|
75
|
+
generator: (nb) => getDistinctQuestions(getBasicSystemResolutionQuestion, nb),
|
|
51
76
|
qcmTimer: 60,
|
|
52
77
|
freeTimer: 60,
|
|
53
78
|
getPropositions,
|
|
54
79
|
isAnswerValid,
|
|
55
80
|
subject: "Mathématiques",
|
|
81
|
+
getQuestionFromIdentifiers,
|
|
82
|
+
rebuildIdentifiers,
|
|
56
83
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
|
|
2
3
|
type Identifiers = {
|
|
3
|
-
|
|
4
|
-
isXAsked: boolean;
|
|
4
|
+
coeffsIds: NodeIdentifiers[][];
|
|
5
5
|
};
|
|
6
6
|
export declare const basicSystemResolution: Exercise<Identifiers>;
|
|
7
7
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basicSystemResolution.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/systems/basicSystemResolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"basicSystemResolution.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/systems/basicSystemResolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AASrC,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAKtE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,EAAE,EAAE,CAAC;CAIhC,CAAC;AA6EF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAgBvD,CAAC"}
|