math-exercises 3.0.127 → 3.0.128
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/math/calcul/arithmetics/isMultipleOrDivisor.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/isMultipleOrDivisor.js +0 -10
- package/lib/exercises/math/calcul/mentalCaluls/mentalProgramSolve.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalProgramSolve.js +14 -4
- package/lib/exercises/math/calcul/operations/expressionNature.d.ts.map +1 -1
- package/lib/exercises/math/calcul/operations/expressionNature.js +0 -4
- package/lib/exercises/math/calcul/ordering/compareA10N.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/compareA10N.js +0 -1
- package/lib/exercises/math/calcul/ordering/compareABUsingQuotient.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/compareABUsingQuotient.js +1 -2
- package/lib/exercises/math/calcul/ordering/compareFracABWithFracAPlusCBPlusC.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/compareFracABWithFracAPlusCBPlusC.js +0 -1
- package/lib/exercises/math/calcul/ordering/compareFracAndDec.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/compareFracAndDec.js +0 -1
- package/lib/exercises/math/calcul/ordering/compareWithSquareRoots.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/compareWithSquareRoots.js +20 -11
- package/lib/exercises/math/calcul/ordering/decimalOrdering.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/decimalOrdering.js +0 -4
- package/lib/exercises/math/calcul/ordering/decimalOrderingNoRelatives.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/decimalOrderingNoRelatives.js +0 -4
- package/lib/exercises/math/calcul/ordering/integerOrdering.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/integerOrdering.js +0 -4
- package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.js +0 -1
- package/lib/exercises/math/calcul/proportionality/isTableProportional.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/isTableProportional.js +0 -4
- package/lib/exercises/math/calcul/proportionality/isTableProportionalNonInteger.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/isTableProportionalNonInteger.js +0 -4
- package/lib/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.d.ts.map +1 -1
- package/lib/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.js +0 -1
- package/lib/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.d.ts.map +1 -1
- package/lib/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.js +0 -1
- package/lib/exercises/math/calcul/rounding/getPhysicalOrderOfMagnitude.d.ts.map +1 -1
- package/lib/exercises/math/calcul/rounding/getPhysicalOrderOfMagnitude.js +28 -14
- package/lib/exercises/math/calcul/sign/signFromAx.d.ts.map +1 -1
- package/lib/exercises/math/calcul/sign/signFromAx.js +0 -10
- package/lib/exercises/math/calculLitteral/equation/equationFromProblem.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationFromProblem.js +6 -7
- package/lib/exercises/math/calculLitteral/inequations/isInequalityTrue.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/isInequalityTrue.js +0 -10
- package/lib/exercises/math/calculLitteral/ordering/compareAMinusB.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/ordering/compareAMinusB.js +38 -34
- package/lib/exercises/math/calculLitteral/ordering/compareFromPiMinusFrac.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/ordering/compareFromPiMinusFrac.js +0 -1
- package/lib/exercises/math/calculLitteral/simplifying/valuateExpression.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/simplifying/valuateExpression.js +0 -10
- package/lib/exercises/math/calculLitteral/writing/writeLitExpFromFrenchExp.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/writing/writeLitExpFromFrenchExp.js +0 -1
- package/lib/exercises/math/conversion/kmPerMinToKmPerHourConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/kmPerMinToKmPerHourConversion.js +0 -1
- package/lib/exercises/math/conversion/minutesToHours.d.ts.map +1 -1
- package/lib/exercises/math/conversion/minutesToHours.js +0 -1
- package/lib/exercises/math/conversion/secondsToHours.d.ts.map +1 -1
- package/lib/exercises/math/conversion/secondsToHours.js +0 -1
- package/lib/exercises/math/dataRepresentations/compareBoxPlot.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/compareBoxPlot.js +0 -1
- package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.d.ts.map +1 -1
- package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.js +0 -1
- package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.js +0 -4
- package/lib/exercises/math/functions/affines/affineAdjustmentComplete.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineAdjustmentComplete.js +0 -1
- package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindX.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindX.js +0 -1
- package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindY.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindY.js +0 -1
- package/lib/exercises/math/functions/affines/drawAffineFromProgCalc.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/recognizeAffineGraph.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/recognizeAffineGraph.js +0 -4
- package/lib/exercises/math/functions/basics/coordsOfPointOnCurveFindY.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/coordsOfPointOnCurveFindY.js +0 -1
- package/lib/exercises/math/functions/basics/isPointOnFunction.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/isPointOnFunction.js +0 -10
- package/lib/exercises/math/functions/basics/signOfFunction.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/signOfFunction.js +0 -10
- package/lib/exercises/math/functions/cube/isPointOnCubicFunction.d.ts.map +1 -1
- package/lib/exercises/math/functions/cube/isPointOnCubicFunction.js +0 -10
- package/lib/exercises/math/functions/exponentials/exponentialsVariations.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponentials/exponentialsVariations.js +0 -4
- package/lib/exercises/math/functions/inverse/compareInverseValues.d.ts.map +1 -1
- package/lib/exercises/math/functions/inverse/compareInverseValues.js +0 -1
- package/lib/exercises/math/functions/inverse/isPointOnReciprocalFunction.d.ts.map +1 -1
- package/lib/exercises/math/functions/inverse/isPointOnReciprocalFunction.js +0 -10
- package/lib/exercises/math/functions/parity/parityFromAlgebra.d.ts.map +1 -1
- package/lib/exercises/math/functions/parity/parityFromAlgebra.js +0 -4
- package/lib/exercises/math/functions/square/compareSquaredValues.d.ts.map +1 -1
- package/lib/exercises/math/functions/square/compareSquaredValues.js +0 -10
- package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.d.ts.map +1 -1
- package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.js +0 -4
- package/lib/exercises/math/geometry/euclidian/pythagoreOrThales.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidian/pythagoreOrThales.js +0 -4
- package/lib/exercises/math/geometry/lines/isPointOnCartesianLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/isPointOnCartesianLine.js +0 -4
- package/lib/exercises/math/geometry/lines/isPointOnLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/isPointOnLine.js +0 -4
- package/lib/exercises/math/geometry/lines/linesRelativePositions.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/linesRelativePositions.js +0 -4
- package/lib/exercises/math/geometry/parametric/pointFromParametricLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/parametric/pointFromParametricLine.js +0 -4
- package/lib/exercises/math/geometry/pythagore/isTriangleRight.d.ts.map +1 -1
- package/lib/exercises/math/geometry/pythagore/isTriangleRight.js +0 -4
- package/lib/exercises/math/geometry/quadrilaterals/parallelogramRectangle.d.ts.map +1 -1
- package/lib/exercises/math/geometry/quadrilaterals/parallelogramRectangle.js +0 -4
- package/lib/exercises/math/geometry/quadrilaterals/parallelogramRhombus.d.ts.map +1 -1
- package/lib/exercises/math/geometry/quadrilaterals/parallelogramRhombus.js +0 -4
- package/lib/exercises/math/geometry/quadrilaterals/quadrilateralRecognition.d.ts.map +1 -1
- package/lib/exercises/math/geometry/quadrilaterals/quadrilateralRecognition.js +0 -4
- package/lib/exercises/math/geometry/shapes/basicShapesRecognition.d.ts.map +1 -1
- package/lib/exercises/math/geometry/shapes/basicShapesRecognition.js +6 -7
- package/lib/exercises/math/geometry/vectors/colinearity/colinearityFromBasis.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/colinearity/colinearityFromBasis.js +0 -10
- package/lib/exercises/math/geometry/vectors/colinearity/colinearityFromPicture.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/colinearity/colinearityFromPicture.js +0 -10
- package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.js +0 -4
- package/lib/exercises/math/percent/evolutions/findRightCalculForPriceEvolution.d.ts.map +1 -1
- package/lib/exercises/math/percent/evolutions/findRightCalculForPriceEvolution.js +0 -4
- package/lib/exercises/math/probaStat/basicProbas/mostLeastProbable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/basicProbas/mostLeastProbable.js +0 -10
- package/lib/exercises/math/probaStat/checkEquiprobability.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/checkEquiprobability.js +0 -10
- package/lib/exercises/math/probaStat/conditionalProbaWriteFromFrench.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/conditionalProbaWriteFromFrench.js +0 -1
- package/lib/exercises/math/probaStat/events/describeEvent.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/events/describeEvent.js +0 -10
- package/lib/exercises/math/probaStat/events/eventNotation.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/events/eventNotation.js +0 -10
- package/lib/exercises/math/probaStat/stats1var/compareSeriesDispersion.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/compareSeriesDispersion.js +0 -4
- package/lib/exercises/math/probaStat/stats1var/getQuartileProportionQuestion.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/getQuartileProportionQuestion.js +0 -10
- package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.js +0 -4
- package/lib/exercises/math/python/pythonForLoopInstructionCompletion.d.ts.map +1 -1
- package/lib/exercises/math/python/pythonForLoopInstructionCompletion.js +0 -10
- package/lib/exercises/math/python/pythonIfStatementCompletion.d.ts.map +1 -1
- package/lib/exercises/math/python/pythonIfStatementCompletion.js +7 -8
- package/lib/exercises/math/python/pythonSimpleFunctionInstructionCompletion.d.ts.map +1 -1
- package/lib/exercises/math/python/pythonSimpleFunctionInstructionCompletion.js +0 -10
- package/lib/exercises/math/python/pythonWhileStatementCompletion.d.ts.map +1 -1
- package/lib/exercises/math/python/pythonWhileStatementCompletion.js +5 -6
- package/lib/exercises/math/python/pythonWhileStatementOperationCompletion.d.ts.map +1 -1
- package/lib/exercises/math/python/pythonWhileStatementOperationCompletion.js +5 -6
- package/lib/exercises/math/python/variableType.d.ts.map +1 -1
- package/lib/exercises/math/python/variableType.js +0 -10
- package/lib/exercises/math/sampling/isSamplingRepresentative.d.ts.map +1 -1
- package/lib/exercises/math/sampling/isSamplingRepresentative.js +0 -4
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.js +0 -4
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.js +0 -4
- package/lib/exercises/math/sequences/geometric/geometricVariations.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricVariations.js +0 -4
- package/lib/exercises/math/sets/intervals/isNumberInInterval.d.ts.map +1 -1
- package/lib/exercises/math/sets/intervals/isNumberInInterval.js +0 -10
- package/lib/exercises/math/sets/isNumberDecimal.d.ts.map +1 -1
- package/lib/exercises/math/sets/isNumberDecimal.js +0 -10
- package/lib/exercises/math/sets/nameOfNumberSets.d.ts.map +1 -1
- package/lib/exercises/math/sets/nameOfNumberSets.js +0 -10
- package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.js +0 -1
- package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.js +0 -4
- package/lib/exercises/pc/chemicalReactions/identifyLimitingReagent.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactions/identifyLimitingReagent.js +0 -4
- package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.js +0 -4
- package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.js +0 -4
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +0 -4
- package/lib/exercises/pc/moleculeNomenclature.d.ts.map +1 -1
- package/lib/exercises/pc/moleculeNomenclature.js +0 -4
- package/lib/exercises/pc/motion/motionReference.d.ts.map +1 -1
- package/lib/exercises/pc/motion/motionReference.js +0 -4
- package/lib/exercises/pc/motion/typeOfAcceleration.d.ts.map +1 -1
- package/lib/exercises/pc/motion/typeOfAcceleration.js +0 -4
- package/lib/exercises/pc/sound/frequencyComparison.d.ts.map +1 -1
- package/lib/exercises/pc/sound/frequencyComparison.js +0 -4
- package/lib/math/progCalc/progCalc.d.ts +3 -3
- package/lib/math/progCalc/progCalc.d.ts.map +1 -1
- package/lib/math/progCalc/progCalc.js +13 -3
- package/lib/tests/exoTest.d.ts.map +1 -1
- package/lib/tests/exoTest.js +7 -0
- package/lib/tests/questionTest.d.ts.map +1 -1
- package/lib/tests/questionTest.js +3 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isMultipleOrDivisor.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/isMultipleOrDivisor.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"isMultipleOrDivisor.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/isMultipleOrDivisor.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAK7C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,eAAe,CAAC;IACnB,CAAC,EAAE,eAAe,CAAC;CACpB,CAAC;AAyGF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAiBrD,CAAC"}
|
|
@@ -6,7 +6,6 @@ import { reifyAlgebraic, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
|
6
6
|
import { DivideNode } from "../../../../tree/nodes/operators/divideNode.js";
|
|
7
7
|
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
8
8
|
import { random } from "../../../../utils/alea/random.js";
|
|
9
|
-
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
10
9
|
function isMultiple(a, b) {
|
|
11
10
|
return a !== 0 && b % a === 0;
|
|
12
11
|
}
|
|
@@ -66,14 +65,6 @@ $$`;
|
|
|
66
65
|
const getKeys = () => {
|
|
67
66
|
return [];
|
|
68
67
|
};
|
|
69
|
-
const isAnswerValid = () => {
|
|
70
|
-
try {
|
|
71
|
-
throw Error("VEA not implemented");
|
|
72
|
-
}
|
|
73
|
-
catch (err) {
|
|
74
|
-
return handleVEAError(err);
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
68
|
const getIsMultipleOrDivisorQuestion = () => {
|
|
78
69
|
const isMultiple = coinFlip();
|
|
79
70
|
const a = randint(10, 100);
|
|
@@ -105,7 +96,6 @@ export const isMultipleOrDivisor = {
|
|
|
105
96
|
qcmTimer: 60,
|
|
106
97
|
freeTimer: 60,
|
|
107
98
|
getPropositions,
|
|
108
|
-
isAnswerValid,
|
|
109
99
|
subject: "Mathématiques",
|
|
110
100
|
getInstruction,
|
|
111
101
|
getHint,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mentalProgramSolve.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/mentalProgramSolve.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAG7C,OAAO,EAGL,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;AAgCzC,KAAK,WAAW,GAAG;IACjB,qBAAqB,EAAE,eAAe,CAAC;IACvC,WAAW,EAAE,mBAAmB,CAAC;CAClC,CAAC;
|
|
1
|
+
{"version":3,"file":"mentalProgramSolve.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/mentalProgramSolve.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAG7C,OAAO,EAGL,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;AAgCzC,KAAK,WAAW,GAAG;IACjB,qBAAqB,EAAE,eAAe,CAAC;IACvC,WAAW,EAAE,mBAAmB,CAAC;CAClC,CAAC;AAkNF,KAAK,OAAO,GAAG;IACb,UAAU,EAAE,QAAQ,GAAG,SAAS,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAiCF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAyB7D,CAAC"}
|
|
@@ -42,10 +42,16 @@ const getPropositions = (n, { answer, progCalcIds, nodeIdsStartingNumber }) => {
|
|
|
42
42
|
const progCalc = ProgCalcConstructor.fromIdentifiers(progCalcIds);
|
|
43
43
|
const nodeFinalNumber = progCalc.apply(nodeStartingNumber).simplify();
|
|
44
44
|
//applies progCalc to finalNumber
|
|
45
|
-
|
|
45
|
+
const node1 = progCalc.apply(nodeFinalNumber);
|
|
46
|
+
if (node1) {
|
|
47
|
+
tryToAddWrongProp(propositions, node1.simplify().toTex());
|
|
48
|
+
}
|
|
46
49
|
//applies progCalc operations in reverse to finalNumber
|
|
47
50
|
const progCalcReversed = new ProgCalc(progCalc.operations.toReversed());
|
|
48
|
-
|
|
51
|
+
const node2 = progCalcReversed.apply(nodeFinalNumber);
|
|
52
|
+
if (node2) {
|
|
53
|
+
tryToAddWrongProp(propositions, node2.simplify().toTex());
|
|
54
|
+
}
|
|
49
55
|
//stops at intermediary step (stops before goal)
|
|
50
56
|
const progCalcInverse = progCalc.getInverseProgCalc();
|
|
51
57
|
const inverseOperations = progCalcInverse.operations;
|
|
@@ -54,7 +60,12 @@ const getPropositions = (n, { answer, progCalcIds, nodeIdsStartingNumber }) => {
|
|
|
54
60
|
const nodePrevious = arrStepNodes[arrStepNodes.length - 1].simplify();
|
|
55
61
|
const operation = inverseOperations[i];
|
|
56
62
|
const nodeStep = operation.func(nodePrevious);
|
|
57
|
-
|
|
63
|
+
if (nodeStep) {
|
|
64
|
+
arrStepNodes.push(nodeStep);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
58
69
|
}
|
|
59
70
|
shuffle(arrStepNodes).forEach((nodeStep) => {
|
|
60
71
|
if (propositions.length < n) {
|
|
@@ -227,5 +238,4 @@ export const mentalProgramSolve = {
|
|
|
227
238
|
getAnswer,
|
|
228
239
|
getQuestionFromIdentifiers,
|
|
229
240
|
hasHintAndCorrection: true,
|
|
230
|
-
answerType: "QCU",
|
|
231
241
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expressionNature.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/operations/expressionNature.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"expressionNature.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/operations/expressionNature.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAO7C,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,eAAe,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAuM/E,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAclD,CAAC"}
|
|
@@ -173,9 +173,6 @@ const getPropositions = (n, { answer }) => {
|
|
|
173
173
|
tryToAddWrongProp(propositions, "un quotient", "raw");
|
|
174
174
|
return shuffleProps(propositions, n);
|
|
175
175
|
};
|
|
176
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
177
|
-
return ans === answer;
|
|
178
|
-
};
|
|
179
176
|
export const expressionNature = {
|
|
180
177
|
id: "expressionNature",
|
|
181
178
|
connector: "=",
|
|
@@ -185,7 +182,6 @@ export const expressionNature = {
|
|
|
185
182
|
qcmTimer: 60,
|
|
186
183
|
freeTimer: 60,
|
|
187
184
|
getPropositions,
|
|
188
|
-
isAnswerValid,
|
|
189
185
|
subject: "Mathématiques",
|
|
190
186
|
answerType: "QCU",
|
|
191
187
|
getQuestionFromIdentifiers,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compareA10N.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareA10N.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAmBrC,KAAK,IAAI,GAAG;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf,CAAC;AAwTF,KAAK,OAAO,GAAG;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA0CF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"compareA10N.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareA10N.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAmBrC,KAAK,IAAI,GAAG;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf,CAAC;AAwTF,KAAK,OAAO,GAAG;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA0CF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAetD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compareABUsingQuotient.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareABUsingQuotient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAK7C,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,eAAe,EAAE,CAAC;CACnC,CAAC;AA+IF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"compareABUsingQuotient.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareABUsingQuotient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAK7C,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,eAAe,EAAE,CAAC;CACnC,CAAC;AA+IF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAgBxD,CAAC"}
|
|
@@ -42,7 +42,7 @@ $$
|
|
|
42
42
|
const getAnswer = (identifiers) => {
|
|
43
43
|
const { orderedNodeIds } = identifiers;
|
|
44
44
|
const [A, B] = orderedNodeIds.map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds).toTex());
|
|
45
|
-
return `${B}
|
|
45
|
+
return `${B}>${A}`;
|
|
46
46
|
};
|
|
47
47
|
const isAnswerValid = (ans, { ...identifiers }) => {
|
|
48
48
|
const { orderedNodeIds } = identifiers;
|
|
@@ -118,6 +118,5 @@ export const compareABUsingQuotient = {
|
|
|
118
118
|
subject: "Mathématiques",
|
|
119
119
|
maxAllowedQuestions: 30,
|
|
120
120
|
getQuestionFromIdentifiers,
|
|
121
|
-
answerType: "QCU",
|
|
122
121
|
hasHintAndCorrection: true,
|
|
123
122
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compareFracABWithFracAPlusCBPlusC.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareFracABWithFracAPlusCBPlusC.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAY7C,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AA4LF,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"compareFracABWithFracAPlusCBPlusC.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareFracABWithFracAPlusCBPlusC.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAY7C,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AA4LF,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,WAAW,CAmBnE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compareFracAndDec.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareFracAndDec.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAY7C,KAAK,OAAO,GAAG;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,eAAe,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,2BAA2B,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC3D,KAAK,EAAE,OAAO,EAAE,CAAC;CAClB,CAAC;AAkYF,KAAK,OAAO,GAAG;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,yBAAyB,EAAE,OAAO,CAAC;CACpC,CAAC;AA+BF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"compareFracAndDec.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareFracAndDec.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAY7C,KAAK,OAAO,GAAG;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,eAAe,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,2BAA2B,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC3D,KAAK,EAAE,OAAO,EAAE,CAAC;CAClB,CAAC;AAkYF,KAAK,OAAO,GAAG;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,yBAAyB,EAAE,OAAO,CAAC;CACpC,CAAC;AA+BF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAgB5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compareWithSquareRoots.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareWithSquareRoots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"compareWithSquareRoots.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareWithSquareRoots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AA+KF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAexD,CAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
4
|
+
import { sqrt } from "../../../../tree/nodes/functions/sqrtNode.js";
|
|
5
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
6
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
4
7
|
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
5
8
|
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
6
9
|
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
@@ -45,16 +48,23 @@ $$
|
|
|
45
48
|
|
|
46
49
|
`;
|
|
47
50
|
};
|
|
51
|
+
const getAnswerNodes = (identifiers) => {
|
|
52
|
+
const { a, b, isAdd } = identifiers;
|
|
53
|
+
const addSub = isAdd ? add : substract;
|
|
54
|
+
const nodeWithA = addSub(b, sqrt(a));
|
|
55
|
+
const nodeWithAPlus1 = addSub(b, sqrt(add(a, 1)));
|
|
56
|
+
return isAdd ? [nodeWithA, nodeWithAPlus1] : [nodeWithAPlus1, nodeWithA];
|
|
57
|
+
};
|
|
48
58
|
const getAnswer = (identifiers) => {
|
|
49
59
|
const { a, b, isAdd } = identifiers;
|
|
50
|
-
return `${b}
|
|
60
|
+
return `${b}${isAdd ? "+" : "-"}\\sqrt{${a}}${isAdd ? "<" : ">"}${b}${isAdd ? "+" : "-"}\\sqrt{${a + 1}}`;
|
|
51
61
|
};
|
|
52
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
62
|
+
const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
53
63
|
function getOrderedNodesFromTex(tex, compSymbol) {
|
|
54
64
|
return tex
|
|
55
65
|
.split(compSymbol)
|
|
56
66
|
.map((str) => parseAlgebraic(str))
|
|
57
|
-
.toSorted(() => (compSymbol === "<" ?
|
|
67
|
+
.toSorted(() => (compSymbol === "<" ? +1 : -1));
|
|
58
68
|
}
|
|
59
69
|
try {
|
|
60
70
|
const compSymbol = ans.includes("<")
|
|
@@ -64,9 +74,9 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
64
74
|
: undefined;
|
|
65
75
|
if (compSymbol) {
|
|
66
76
|
const [ansNode1, ansNode2] = getOrderedNodesFromTex(ans, compSymbol);
|
|
67
|
-
const [answerNode1, answerNode2] =
|
|
68
|
-
return (ansNode1.simplify().
|
|
69
|
-
ansNode2.simplify().
|
|
77
|
+
const [answerNode1, answerNode2] = getAnswerNodes(identifiers);
|
|
78
|
+
return (substract(ansNode1, answerNode1).simplify().evaluate() === 0 &&
|
|
79
|
+
substract(ansNode2, answerNode2).simplify().evaluate() === 0);
|
|
70
80
|
}
|
|
71
81
|
else {
|
|
72
82
|
return false;
|
|
@@ -79,8 +89,8 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
79
89
|
const getPropositions = (nbProps, { answer, ...identifiers }) => {
|
|
80
90
|
const { a, b, isAdd } = identifiers;
|
|
81
91
|
const propositions = [];
|
|
82
|
-
addValidProp(propositions, `${b}
|
|
83
|
-
tryToAddWrongProp(propositions, `${b}
|
|
92
|
+
addValidProp(propositions, `${b}${isAdd ? "+" : "-"}\\sqrt{${a}}${isAdd ? "<" : ">"}${b}${isAdd ? "+" : "-"}\\sqrt{${a + 1}}`, "tex");
|
|
93
|
+
tryToAddWrongProp(propositions, `${b}${isAdd ? "+" : "-"}\\sqrt{${a}}${!isAdd ? "<" : ">"}${b}${isAdd ? "+" : "-"}\\sqrt{${a + 1}}`, "tex");
|
|
84
94
|
return shuffleProps(propositions, nbProps);
|
|
85
95
|
};
|
|
86
96
|
const getKeys = (identifiers) => {
|
|
@@ -89,8 +99,8 @@ const getKeys = (identifiers) => {
|
|
|
89
99
|
"inf",
|
|
90
100
|
"sup",
|
|
91
101
|
...[
|
|
92
|
-
`${b}
|
|
93
|
-
`${b}
|
|
102
|
+
`${b}${isAdd ? "+" : "-"}\\sqrt{${a}}`,
|
|
103
|
+
`${b}${isAdd ? "+" : "-"}\\sqrt{${a + 1}}`,
|
|
94
104
|
].map((tex) => {
|
|
95
105
|
return {
|
|
96
106
|
id: "custom",
|
|
@@ -135,6 +145,5 @@ export const compareWithSquareRoots = {
|
|
|
135
145
|
subject: "Mathématiques",
|
|
136
146
|
maxAllowedQuestions: 30,
|
|
137
147
|
getQuestionFromIdentifiers,
|
|
138
|
-
answerType: "QCU",
|
|
139
148
|
hasHintAndCorrection: true,
|
|
140
149
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decimalOrdering.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/decimalOrdering.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"decimalOrdering.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/decimalOrdering.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAmF1D,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAajD,CAAC"}
|
|
@@ -76,9 +76,6 @@ const getPropositions = (n, { answer }) => {
|
|
|
76
76
|
tryToAddWrongProp(propositions, "=");
|
|
77
77
|
return shuffleProps(propositions, n);
|
|
78
78
|
};
|
|
79
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
80
|
-
return ans === answer;
|
|
81
|
-
};
|
|
82
79
|
export const decimalOrdering = {
|
|
83
80
|
id: "decimalOrdering",
|
|
84
81
|
connector: "\\iff",
|
|
@@ -88,7 +85,6 @@ export const decimalOrdering = {
|
|
|
88
85
|
qcmTimer: 60,
|
|
89
86
|
freeTimer: 60,
|
|
90
87
|
getPropositions,
|
|
91
|
-
isAnswerValid,
|
|
92
88
|
subject: "Mathématiques",
|
|
93
89
|
answerType: "QCU",
|
|
94
90
|
getQuestionFromIdentifiers,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decimalOrderingNoRelatives.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/decimalOrderingNoRelatives.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"decimalOrderingNoRelatives.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/decimalOrderingNoRelatives.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAmF1D,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAa5D,CAAC"}
|
|
@@ -72,9 +72,6 @@ const getPropositions = (n, { answer }) => {
|
|
|
72
72
|
tryToAddWrongProp(propositions, "=");
|
|
73
73
|
return shuffleProps(propositions, n);
|
|
74
74
|
};
|
|
75
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
76
|
-
return ans === answer;
|
|
77
|
-
};
|
|
78
75
|
export const decimalOrderingNoRelatives = {
|
|
79
76
|
id: "decimalOrderingNoRelatives",
|
|
80
77
|
connector: "\\iff",
|
|
@@ -84,7 +81,6 @@ export const decimalOrderingNoRelatives = {
|
|
|
84
81
|
qcmTimer: 60,
|
|
85
82
|
freeTimer: 60,
|
|
86
83
|
getPropositions,
|
|
87
|
-
isAnswerValid,
|
|
88
84
|
subject: "Mathématiques",
|
|
89
85
|
answerType: "QCU",
|
|
90
86
|
getQuestionFromIdentifiers,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integerOrdering.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/integerOrdering.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"integerOrdering.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/integerOrdering.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAgEF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAajD,CAAC"}
|
|
@@ -58,9 +58,6 @@ const getPropositions = (n, { answer }) => {
|
|
|
58
58
|
tryToAddWrongProp(propositions, "=");
|
|
59
59
|
return shuffleProps(propositions, n);
|
|
60
60
|
};
|
|
61
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
62
|
-
return ans === answer;
|
|
63
|
-
};
|
|
64
61
|
export const integerOrdering = {
|
|
65
62
|
id: "integerOrdering",
|
|
66
63
|
connector: "\\iff",
|
|
@@ -70,7 +67,6 @@ export const integerOrdering = {
|
|
|
70
67
|
qcmTimer: 60,
|
|
71
68
|
freeTimer: 60,
|
|
72
69
|
getPropositions,
|
|
73
|
-
isAnswerValid,
|
|
74
70
|
answerType: "QCU",
|
|
75
71
|
subject: "Mathématiques",
|
|
76
72
|
getQuestionFromIdentifiers,
|
package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findCoeffInProportionalTableNonIntegers.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAS7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AA+HF,KAAK,OAAO,GAAG;IACb,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B,CAAC;AAoBF,eAAO,MAAM,uCAAuC,EAAE,QAAQ,CAC5D,WAAW,EACX,OAAO,
|
|
1
|
+
{"version":3,"file":"findCoeffInProportionalTableNonIntegers.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAS7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AA+HF,KAAK,OAAO,GAAG;IACb,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B,CAAC;AAoBF,eAAO,MAAM,uCAAuC,EAAE,QAAQ,CAC5D,WAAW,EACX,OAAO,CAsBR,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isTableProportional.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/isTableProportional.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"isTableProportional.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/isTableProportional.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAgG5D,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAcrD,CAAC"}
|
|
@@ -86,9 +86,6 @@ const getPropositions = (n, { answer }) => {
|
|
|
86
86
|
tryToAddWrongProp(propositions, "On ne peut pas savoir", "raw");
|
|
87
87
|
return shuffleProps(propositions, n);
|
|
88
88
|
};
|
|
89
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
90
|
-
return ans === answer;
|
|
91
|
-
};
|
|
92
89
|
export const isTableProportional = {
|
|
93
90
|
id: "isVTableProportional",
|
|
94
91
|
label: "Reconnaître un tableau de proportionnalité",
|
|
@@ -97,7 +94,6 @@ export const isTableProportional = {
|
|
|
97
94
|
qcmTimer: 60,
|
|
98
95
|
freeTimer: 60,
|
|
99
96
|
getPropositions,
|
|
100
|
-
isAnswerValid,
|
|
101
97
|
answerType: "QCU",
|
|
102
98
|
subject: "Mathématiques",
|
|
103
99
|
hasHintAndCorrection: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isTableProportionalNonInteger.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/isTableProportionalNonInteger.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"isTableProportionalNonInteger.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/isTableProportionalNonInteger.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAS7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAkCF,KAAK,OAAO,GAAG;IACb,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B,CAAC;AAmGF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAoBxE,CAAC"}
|
|
@@ -37,9 +37,6 @@ ${mdTable([xTexs.map((v) => dollarize(v)), yTexs.map((v) => dollarize(v))])}
|
|
|
37
37
|
const getKeys = () => {
|
|
38
38
|
return [];
|
|
39
39
|
};
|
|
40
|
-
const isAnswerValid = () => {
|
|
41
|
-
throw Error("VEA not implemented");
|
|
42
|
-
};
|
|
43
40
|
// ["Entier", "Décimal", "Fraction"],
|
|
44
41
|
// ["Entières", "Décimales", "Fractions"],
|
|
45
42
|
const getIsTableProportionalNonIntegerQuestion = (opts) => {
|
|
@@ -128,7 +125,6 @@ export const isTableProportionalNonInteger = {
|
|
|
128
125
|
qcmTimer: 60,
|
|
129
126
|
freeTimer: 60,
|
|
130
127
|
getPropositions,
|
|
131
|
-
isAnswerValid,
|
|
132
128
|
subject: "Mathématiques",
|
|
133
129
|
// getHint,
|
|
134
130
|
// getCorrection,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"estimateAroundPow10NTimesAroundPow10N.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+EF,eAAO,MAAM,qCAAqC,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"estimateAroundPow10NTimesAroundPow10N.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+EF,eAAO,MAAM,qCAAqC,EAAE,QAAQ,CAAC,WAAW,CAmBvE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"estimatePow10NPlusPow10MinusN.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAwFF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"estimatePow10NPlusPow10MinusN.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAwFF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAmB/D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPhysicalOrderOfMagnitude.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/getPhysicalOrderOfMagnitude.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"getPhysicalOrderOfMagnitude.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/getPhysicalOrderOfMagnitude.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAwHrC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAqGF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAsB7D,CAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { addValidProp, shuffleProps, tryToAddWrongProp, propWhile, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
4
|
-
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
5
4
|
import { doWhile } from "../../../../utils/doWhile.js";
|
|
6
|
-
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
7
5
|
const physicalFacts = [
|
|
8
6
|
{
|
|
9
7
|
question: "du diamètre d'un atome d'hydrogène",
|
|
@@ -132,7 +130,7 @@ const getPropositions = (n, { answer, factIndex }) => {
|
|
|
132
130
|
};
|
|
133
131
|
const getAnswer = ({ factIndex }) => {
|
|
134
132
|
const item = physicalFacts[factIndex];
|
|
135
|
-
const power = Math.
|
|
133
|
+
const power = Math.round(Math.log10(item.value));
|
|
136
134
|
return `10^{${power}}\\ ${item.unit}`;
|
|
137
135
|
};
|
|
138
136
|
const getInstruction = ({ factIndex }) => {
|
|
@@ -151,16 +149,33 @@ On cherche la puissance de $10$ la plus proche : c'est $10^{${power}}$.
|
|
|
151
149
|
Un ordre de grandeur ${item.question} est donc $10^{${power}}\\ ${item.unit}$.`;
|
|
152
150
|
};
|
|
153
151
|
const getKeys = () => [];
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
152
|
+
// const getKeys: GetKeys<Identifiers> = ({ factIndex }) => {
|
|
153
|
+
// const item = physicalFacts[factIndex];
|
|
154
|
+
// return [
|
|
155
|
+
// {
|
|
156
|
+
// id: "custom",
|
|
157
|
+
// label: item.unit,
|
|
158
|
+
// labelType: "tex",
|
|
159
|
+
// mathfieldInstructions: {
|
|
160
|
+
// method: "write",
|
|
161
|
+
// content: `\\ ${item.unit}`,
|
|
162
|
+
// },
|
|
163
|
+
// },
|
|
164
|
+
// ] as KeyProps[];
|
|
165
|
+
// };
|
|
166
|
+
// const isAnswerValid: VEA<Identifiers> = (ans, { answer, factIndex }) => {
|
|
167
|
+
// const item = physicalFacts[factIndex];
|
|
168
|
+
// if (!ans.includes(item.unit.replaceAll("textrm", "text"))) {
|
|
169
|
+
// return false;
|
|
170
|
+
// }
|
|
171
|
+
// try {
|
|
172
|
+
// const ansNode = parseAlgebraic(ans.split("\\")[0]);
|
|
173
|
+
// const answerNode = parseAlgebraic(answer.split("\\")[0]);
|
|
174
|
+
// return substract(ansNode, answerNode).simplify().evaluate() === 0;
|
|
175
|
+
// } catch (err) {
|
|
176
|
+
// return handleVEAError(err);
|
|
177
|
+
// }
|
|
178
|
+
// };
|
|
164
179
|
const getGetPhysicalOrderOfMagnitudeQuestion = () => {
|
|
165
180
|
const factIndex = Math.floor(Math.random() * physicalFacts.length);
|
|
166
181
|
const identifiers = { factIndex };
|
|
@@ -185,7 +200,6 @@ export const getPhysicalOrderOfMagnitude = {
|
|
|
185
200
|
qcmTimer: 60,
|
|
186
201
|
freeTimer: 60,
|
|
187
202
|
getPropositions,
|
|
188
|
-
isAnswerValid,
|
|
189
203
|
subject: "Mathématiques",
|
|
190
204
|
getInstruction,
|
|
191
205
|
getHint,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signFromAx.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/sign/signFromAx.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"signFromAx.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/sign/signFromAx.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAsGF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,WAAW,CAiB5C,CAAC"}
|
|
@@ -4,7 +4,6 @@ import { randint } from "../../../../math/utils/random/randint.js";
|
|
|
4
4
|
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
5
5
|
import { monom } from "../../../../tree/nodes/polynomials/monomNode.js";
|
|
6
6
|
import { probaLawFlip } from "../../../../utils/alea/probaLawFlip.js";
|
|
7
|
-
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
8
7
|
//-x pos/nég/nul
|
|
9
8
|
//ax pos/nég/nul avec a>0 donné ou <0
|
|
10
9
|
const getPropositions = (n, { answer }) => {
|
|
@@ -63,14 +62,6 @@ const getCorrection = (identifiers) => {
|
|
|
63
62
|
const getKeys = () => {
|
|
64
63
|
return [];
|
|
65
64
|
};
|
|
66
|
-
const isAnswerValid = () => {
|
|
67
|
-
try {
|
|
68
|
-
throw Error("VEA not implemented");
|
|
69
|
-
}
|
|
70
|
-
catch (err) {
|
|
71
|
-
return handleVEAError(err);
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
65
|
const getSignFromAxQuestion = () => {
|
|
75
66
|
const identifiers = {
|
|
76
67
|
a: randint(-9, 10, [0, 1]),
|
|
@@ -102,7 +93,6 @@ export const signFromAx = {
|
|
|
102
93
|
qcmTimer: 60,
|
|
103
94
|
freeTimer: 60,
|
|
104
95
|
getPropositions,
|
|
105
|
-
isAnswerValid,
|
|
106
96
|
subject: "Mathématiques",
|
|
107
97
|
getInstruction,
|
|
108
98
|
getHint,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equationFromProblem.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationFromProblem.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"equationFromProblem.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationFromProblem.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAKlE,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAetE,KAAK,WAAW,GAAG;IACjB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;IACzE,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,YAAY,EAAE,eAAe,CAAC;CAC/B,CAAC;AA6qBF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAcrD,CAAC"}
|
|
@@ -10,7 +10,6 @@ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
|
10
10
|
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
11
11
|
import { random, randomMany } from "../../../../utils/alea/random.js";
|
|
12
12
|
import { isOperatorNode, OperatorIds, } from "../../../../tree/nodes/operators/operatorNode.js";
|
|
13
|
-
import { parseLatex } from "../../../../tree/parsers/latexParser.js";
|
|
14
13
|
import { mdTable } from "../../../../utils/markdown/mdTable.js";
|
|
15
14
|
import { alignTex } from "../../../../utils/latex/alignTex.js";
|
|
16
15
|
class ProblemConstructor {
|
|
@@ -433,11 +432,11 @@ const getPropositions = (n, { answer, ...identifiers }) => {
|
|
|
433
432
|
}
|
|
434
433
|
return shuffleProps(propositions, n);
|
|
435
434
|
};
|
|
436
|
-
const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
};
|
|
435
|
+
// const isAnswerValid: VEA<Identifiers> = (ans, { answer, ...identifiers }) => {
|
|
436
|
+
// const answerNode = getAnswerNode(identifiers); //!TODO: this call crashes but it's a mystery
|
|
437
|
+
// const ansNode = parseLatex(ans);
|
|
438
|
+
// return substract(ansNode, answerNode).evaluate() === 0;
|
|
439
|
+
// };
|
|
441
440
|
export const equationFromProblem = {
|
|
442
441
|
id: "equationFromProblem",
|
|
443
442
|
label: "Traduire un problème en une équation mathématique",
|
|
@@ -446,7 +445,7 @@ export const equationFromProblem = {
|
|
|
446
445
|
qcmTimer: 60,
|
|
447
446
|
freeTimer: 60,
|
|
448
447
|
getPropositions,
|
|
449
|
-
isAnswerValid,
|
|
448
|
+
// isAnswerValid,
|
|
450
449
|
subject: "Mathématiques",
|
|
451
450
|
getQuestionFromIdentifiers,
|
|
452
451
|
answerType: "QCU",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isInequalityTrue.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/inequations/isInequalityTrue.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"isInequalityTrue.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/inequations/isInequalityTrue.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAE7C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,EAAE,eAAe,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAyJF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAiBlD,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
4
|
-
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
5
4
|
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
6
5
|
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
7
6
|
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
@@ -106,14 +105,6 @@ Puisque $${leftSimTex} ${isTrue ? sign : reverseSign(sign)} ${rightSimTex}$, l'i
|
|
|
106
105
|
const getKeys = () => {
|
|
107
106
|
return [];
|
|
108
107
|
};
|
|
109
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
110
|
-
try {
|
|
111
|
-
return ans === answer;
|
|
112
|
-
}
|
|
113
|
-
catch (err) {
|
|
114
|
-
return handleVEAError(err);
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
108
|
const getIsInequalityTrueQuestion = () => {
|
|
118
109
|
const a = randint(-10, 10, [0]);
|
|
119
110
|
const b = randint(-10, 10, [0]);
|
|
@@ -156,7 +147,6 @@ export const isInequalityTrue = {
|
|
|
156
147
|
qcmTimer: 60,
|
|
157
148
|
freeTimer: 60,
|
|
158
149
|
getPropositions,
|
|
159
|
-
isAnswerValid,
|
|
160
150
|
subject: "Mathématiques",
|
|
161
151
|
getInstruction,
|
|
162
152
|
getHint,
|