math-exercises 3.0.127 → 3.0.129
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 +3 -19
- package/lib/exercises/math/calcul/ordering/compareFracABWithFracAPlusCBPlusC.d.ts +4 -1
- package/lib/exercises/math/calcul/ordering/compareFracABWithFracAPlusCBPlusC.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/compareFracABWithFracAPlusCBPlusC.js +34 -11
- package/lib/exercises/math/calcul/ordering/compareFracAndDec.d.ts +2 -6
- package/lib/exercises/math/calcul/ordering/compareFracAndDec.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/compareFracAndDec.js +81 -192
- 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 +1 -5
- 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 +1 -2
- package/lib/exercises/math/conversion/minutesToHours.d.ts.map +1 -1
- package/lib/exercises/math/conversion/minutesToHours.js +6 -4
- package/lib/exercises/math/conversion/secondsToHours.d.ts.map +1 -1
- package/lib/exercises/math/conversion/secondsToHours.js +6 -4
- package/lib/exercises/math/dataRepresentations/barChartInterpreting.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/barChartInterpreting.js +5 -5
- 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/index.d.ts +6 -8
- package/lib/index.d.ts.map +1 -1
- 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 +7 -4
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recognizeArithmeticFromFirstTerms.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"recognizeArithmeticFromFirstTerms.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAmGF,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,WAAW,CAcnE,CAAC"}
|
|
@@ -76,9 +76,6 @@ const getPropositions = (_n, { answer, sequences, answerIndex }) => {
|
|
|
76
76
|
});
|
|
77
77
|
return shuffle(propositions);
|
|
78
78
|
};
|
|
79
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
80
|
-
return ans === answer;
|
|
81
|
-
};
|
|
82
79
|
export const recognizeArithmeticFromFirstTerms = {
|
|
83
80
|
id: "recognizeArithmeticFromFirstTerms",
|
|
84
81
|
label: "Reconnaître une suite arithmétique via ses premiers termes",
|
|
@@ -87,7 +84,6 @@ export const recognizeArithmeticFromFirstTerms = {
|
|
|
87
84
|
qcmTimer: 60,
|
|
88
85
|
freeTimer: 60,
|
|
89
86
|
getPropositions,
|
|
90
|
-
isAnswerValid,
|
|
91
87
|
answerType: "QCU",
|
|
92
88
|
subject: "Mathématiques",
|
|
93
89
|
hasHintAndCorrection: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recognizeArithmeticFromGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"recognizeArithmeticFromGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAiGF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAa9D,CAAC"}
|
|
@@ -85,9 +85,6 @@ const getPropositions = (n, { answer }) => {
|
|
|
85
85
|
tryToAddWrongProp(propositions, "Non", "raw");
|
|
86
86
|
return shuffleProps(propositions, n);
|
|
87
87
|
};
|
|
88
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
89
|
-
return ans === answer;
|
|
90
|
-
};
|
|
91
88
|
export const recognizeArithmeticFromGraph = {
|
|
92
89
|
id: "recognizeArithmeticFromGraph",
|
|
93
90
|
label: "Reconnaître graphiquement si une suite est arithmétique",
|
|
@@ -96,7 +93,6 @@ export const recognizeArithmeticFromGraph = {
|
|
|
96
93
|
qcmTimer: 60,
|
|
97
94
|
freeTimer: 60,
|
|
98
95
|
getPropositions,
|
|
99
|
-
isAnswerValid,
|
|
100
96
|
answerType: "QCU",
|
|
101
97
|
hasGeogebra: true,
|
|
102
98
|
subject: "Mathématiques",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometricVariations.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricVariations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"geometricVariations.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricVariations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAM7C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,eAAe,CAAC;IACnB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAiHF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAiBrD,CAAC"}
|
|
@@ -68,9 +68,6 @@ Ainsi, la suite $u_n = ${statement.toTex()}$ est ${answer.toLocaleLowerCase()}.
|
|
|
68
68
|
const getKeys = () => {
|
|
69
69
|
return [];
|
|
70
70
|
};
|
|
71
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
72
|
-
return ans === answer;
|
|
73
|
-
};
|
|
74
71
|
const getGeometricVariationsQuestion = () => {
|
|
75
72
|
const a = randfloat(0.1, 3, 2, [1]) * (coinFlip() ? 1 : -1);
|
|
76
73
|
const qLessThanOne = coinFlip();
|
|
@@ -113,7 +110,6 @@ export const geometricVariations = {
|
|
|
113
110
|
qcmTimer: 60,
|
|
114
111
|
freeTimer: 60,
|
|
115
112
|
getPropositions,
|
|
116
|
-
isAnswerValid,
|
|
117
113
|
subject: "Mathématiques",
|
|
118
114
|
getInstruction,
|
|
119
115
|
getHint,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isNumberInInterval.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sets/intervals/isNumberInInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"isNumberInInterval.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sets/intervals/isNumberInInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAM7C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,eAAe,CAAC;IACnB,QAAQ,EAAE,eAAe,CAAC;CAC3B,CAAC;AA+KF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAiBpD,CAAC"}
|
|
@@ -8,7 +8,6 @@ import { ClosureType } from "../../../../tree/nodes/sets/closure.js";
|
|
|
8
8
|
import { IntervalNode } from "../../../../tree/nodes/sets/intervalNode.js";
|
|
9
9
|
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
10
10
|
import { random } from "../../../../utils/alea/random.js";
|
|
11
|
-
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
12
11
|
const getPropositions = (n, { answer }) => {
|
|
13
12
|
const propositions = [];
|
|
14
13
|
addValidProp(propositions, answer, "tex");
|
|
@@ -91,14 +90,6 @@ ${result
|
|
|
91
90
|
const getKeys = () => {
|
|
92
91
|
return [];
|
|
93
92
|
};
|
|
94
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
95
|
-
try {
|
|
96
|
-
return ans === answer;
|
|
97
|
-
}
|
|
98
|
-
catch (err) {
|
|
99
|
-
return handleVEAError(err);
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
93
|
const getIsNumberInIntervalQuestion = () => {
|
|
103
94
|
const lowerBound = coinFlip()
|
|
104
95
|
? randint(-10, 10)
|
|
@@ -162,7 +153,6 @@ export const isNumberInInterval = {
|
|
|
162
153
|
qcmTimer: 60,
|
|
163
154
|
freeTimer: 60,
|
|
164
155
|
getPropositions,
|
|
165
|
-
isAnswerValid,
|
|
166
156
|
subject: "Mathématiques",
|
|
167
157
|
getInstruction,
|
|
168
158
|
getHint,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isNumberDecimal.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sets/isNumberDecimal.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"isNumberDecimal.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sets/isNumberDecimal.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAQ7C,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE;QACP,CAAC,EAAE,eAAe,CAAC;QACnB,SAAS,EAAE,OAAO,CAAC;KACpB,EAAE,CAAC;CACL,CAAC;AA4HF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAkBjD,CAAC"}
|
|
@@ -10,7 +10,6 @@ import { isFractionNode } from "../../../tree/nodes/operators/fractionNode.js";
|
|
|
10
10
|
import { coinFlip } from "../../../utils/alea/coinFlip.js";
|
|
11
11
|
import { random } from "../../../utils/alea/random.js";
|
|
12
12
|
import { doWhile } from "../../../utils/doWhile.js";
|
|
13
|
-
import { handleVEAError } from "../../../utils/errors/handleVEAError.js";
|
|
14
13
|
const getPropositions = (n, { options }) => {
|
|
15
14
|
const propositions = [];
|
|
16
15
|
for (const { a, isDecimal } of options) {
|
|
@@ -69,14 +68,6 @@ const getCorrection = (identifiers) => {
|
|
|
69
68
|
const getKeys = () => {
|
|
70
69
|
return [];
|
|
71
70
|
};
|
|
72
|
-
const isAnswerValid = () => {
|
|
73
|
-
try {
|
|
74
|
-
throw Error("VEA not implemented");
|
|
75
|
-
}
|
|
76
|
-
catch (err) {
|
|
77
|
-
return handleVEAError(err);
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
71
|
const generateNonDecimalNumber = () => {
|
|
81
72
|
const nonDecimals = [];
|
|
82
73
|
nonDecimals.push(RationalConstructor.randomPureRational().toTree());
|
|
@@ -130,7 +121,6 @@ export const isNumberdecimal = {
|
|
|
130
121
|
qcmTimer: 60,
|
|
131
122
|
freeTimer: 60,
|
|
132
123
|
getPropositions,
|
|
133
|
-
isAnswerValid,
|
|
134
124
|
subject: "Mathématiques",
|
|
135
125
|
getInstruction,
|
|
136
126
|
getHint,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nameOfNumberSets.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sets/nameOfNumberSets.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"nameOfNumberSets.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sets/nameOfNumberSets.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAKrC,KAAK,WAAW,GAAG;IACjB,uBAAuB,EAAE,OAAO,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAwIF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAgBlD,CAAC"}
|
|
@@ -2,7 +2,6 @@ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../exercis
|
|
|
2
2
|
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
4
4
|
import { coinFlip } from "../../../utils/alea/coinFlip.js";
|
|
5
|
-
import { handleVEAError } from "../../../utils/errors/handleVEAError.js";
|
|
6
5
|
const getPropositions = (n, { answer, isQuestionAboutNotation }) => {
|
|
7
6
|
const propositions = [];
|
|
8
7
|
if (isQuestionAboutNotation) {
|
|
@@ -82,14 +81,6 @@ const getInstruction = ({ isQuestionAboutNotation, caseNumber, }) => {
|
|
|
82
81
|
const getKeys = () => {
|
|
83
82
|
return ["naturals", "integers", "rationals", "decimals", "reals"];
|
|
84
83
|
};
|
|
85
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
86
|
-
try {
|
|
87
|
-
return ans === answer;
|
|
88
|
-
}
|
|
89
|
-
catch (err) {
|
|
90
|
-
return handleVEAError(err);
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
84
|
const getNameOfNumberSetsQuestion = () => {
|
|
94
85
|
const caseNumber = randint(0, 5);
|
|
95
86
|
const isQuestionAboutNotation = coinFlip();
|
|
@@ -117,7 +108,6 @@ export const nameOfNumberSets = {
|
|
|
117
108
|
maxAllowedQuestions: 5,
|
|
118
109
|
freeTimer: 60,
|
|
119
110
|
getPropositions,
|
|
120
|
-
isAnswerValid,
|
|
121
111
|
subject: "Mathématiques",
|
|
122
112
|
getInstruction,
|
|
123
113
|
getAnswer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atomicStructureOfNucleus.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalElements/atomicStructureOfNucleus.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AAKnF,KAAK,WAAW,GAAG;IAAE,UAAU,EAAE,WAAW,CAAA;CAAE,CAAC;AA0F/C,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"atomicStructureOfNucleus.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalElements/atomicStructureOfNucleus.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AAKnF,KAAK,WAAW,GAAG;IAAE,UAAU,EAAE,WAAW,CAAA;CAAE,CAAC;AA0F/C,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAY1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identifyRightElectronicConfiguration.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"identifyRightElectronicConfiguration.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AAKnF,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,WAAW,CAAC;CACzB,CAAC;AA2HF,eAAO,MAAM,oCAAoC,EAAE,QAAQ,CAAC,WAAW,CAiBtE,CAAC"}
|
|
@@ -94,9 +94,6 @@ const getPropositions = (n, { answer, atomSymbol }) => {
|
|
|
94
94
|
});
|
|
95
95
|
return shuffleProps(propositions, n);
|
|
96
96
|
};
|
|
97
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
98
|
-
return ans === answer;
|
|
99
|
-
};
|
|
100
97
|
export const identifyRightElectronicConfiguration = {
|
|
101
98
|
id: "identifyRightElectronicConfiguration",
|
|
102
99
|
label: "Identifier la bonne configuration électronique",
|
|
@@ -105,7 +102,6 @@ export const identifyRightElectronicConfiguration = {
|
|
|
105
102
|
qcmTimer: 60,
|
|
106
103
|
freeTimer: 60,
|
|
107
104
|
getPropositions,
|
|
108
|
-
isAnswerValid,
|
|
109
105
|
subject: "Chimie",
|
|
110
106
|
answerType: "QCU",
|
|
111
107
|
maxAllowedQuestions: 16,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identifyLimitingReagent.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalReactions/identifyLimitingReagent.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"identifyLimitingReagent.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalReactions/identifyLimitingReagent.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAIrC,KAAK,WAAW,GAAG;IACjB,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,sBAAsB,EAAE,MAAM,EAAE,CAAC;CAClC,CAAC;AAgGF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAYzD,CAAC"}
|
|
@@ -55,9 +55,6 @@ const getPropositions = (n, { answer }) => {
|
|
|
55
55
|
tryToAddWrongProp(propositions, "Le réactif B", "raw");
|
|
56
56
|
return shuffleProps(propositions, n);
|
|
57
57
|
};
|
|
58
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
59
|
-
return ans === answer;
|
|
60
|
-
};
|
|
61
58
|
export const identifyLimitingReagent = {
|
|
62
59
|
id: "identifyLimitingReagent",
|
|
63
60
|
label: "Identifier un réactif limitant",
|
|
@@ -66,7 +63,6 @@ export const identifyLimitingReagent = {
|
|
|
66
63
|
qcmTimer: 60,
|
|
67
64
|
freeTimer: 60,
|
|
68
65
|
getPropositions,
|
|
69
|
-
isAnswerValid,
|
|
70
66
|
subject: "Chimie",
|
|
71
67
|
answerType: "QCU",
|
|
72
68
|
getQuestionFromIdentifiers,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identifyStoichiometricMixture.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalReactions/identifyStoichiometricMixture.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"identifyStoichiometricMixture.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalReactions/identifyStoichiometricMixture.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,sBAAsB,EAAE,MAAM,EAAE,CAAC;IACjC,sBAAsB,EAAE,OAAO,CAAC;CACjC,CAAC;AAsGF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAY/D,CAAC"}
|
|
@@ -62,9 +62,6 @@ const getPropositions = (n, { answer }) => {
|
|
|
62
62
|
tryToAddWrongProp(propositions, "Non", "raw");
|
|
63
63
|
return shuffleProps(propositions, n);
|
|
64
64
|
};
|
|
65
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
66
|
-
return ans === answer;
|
|
67
|
-
};
|
|
68
65
|
export const identifyStoichiometricMixture = {
|
|
69
66
|
id: "identifyStoichiometricMixture",
|
|
70
67
|
label: "Identifier un mélange stœchiométrique",
|
|
@@ -73,7 +70,6 @@ export const identifyStoichiometricMixture = {
|
|
|
73
70
|
qcmTimer: 60,
|
|
74
71
|
freeTimer: 60,
|
|
75
72
|
getPropositions,
|
|
76
|
-
isAnswerValid,
|
|
77
73
|
subject: "Chimie",
|
|
78
74
|
answerType: "QCU",
|
|
79
75
|
getQuestionFromIdentifiers,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stoichiometricReaction.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalReactions/stoichiometricReaction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"stoichiometricReaction.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalReactions/stoichiometricReaction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IAEX,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAwEF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAYxD,CAAC"}
|
|
@@ -64,9 +64,6 @@ const getPropositions = (n, { answer }) => {
|
|
|
64
64
|
tryToAddWrongProp(propositions, "On ne peut pas savoir", "raw");
|
|
65
65
|
return shuffleProps(propositions, n);
|
|
66
66
|
};
|
|
67
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
68
|
-
return ans === answer;
|
|
69
|
-
};
|
|
70
67
|
export const stoichiometricReaction = {
|
|
71
68
|
id: "stoichiometricReaction",
|
|
72
69
|
label: "Déterminer si une réaction est stœchiométrique",
|
|
@@ -75,7 +72,6 @@ export const stoichiometricReaction = {
|
|
|
75
72
|
qcmTimer: 60,
|
|
76
73
|
freeTimer: 60,
|
|
77
74
|
getPropositions,
|
|
78
|
-
isAnswerValid,
|
|
79
75
|
answerType: "QCU",
|
|
80
76
|
subject: "Physique",
|
|
81
77
|
getQuestionFromIdentifiers,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ohmicConductorOrGenerator.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/electricity/ohmicConductorOrGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"ohmicConductorOrGenerator.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/electricity/ohmicConductorOrGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AA6FF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAe3D,CAAC"}
|
|
@@ -39,9 +39,6 @@ const getPropositions = (n, { answer }) => {
|
|
|
39
39
|
tryToAddWrongProp(propositions, "On ne peut pas savoir", "raw");
|
|
40
40
|
return shuffleProps(propositions, n);
|
|
41
41
|
};
|
|
42
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
43
|
-
return ans === answer;
|
|
44
|
-
};
|
|
45
42
|
const getGGBOptions = (identifiers) => {
|
|
46
43
|
const { type, end } = identifiers;
|
|
47
44
|
const points = [];
|
|
@@ -87,7 +84,6 @@ export const ohmicConductorOrGenerator = {
|
|
|
87
84
|
qcmTimer: 60,
|
|
88
85
|
freeTimer: 60,
|
|
89
86
|
getPropositions,
|
|
90
|
-
isAnswerValid,
|
|
91
87
|
answerType: "QCU",
|
|
92
88
|
maxAllowedQuestions: 10,
|
|
93
89
|
subject: "Physique",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moleculeNomenclature.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/moleculeNomenclature.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"moleculeNomenclature.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/moleculeNomenclature.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAKrC,KAAK,WAAW,GAAG;IACjB,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAmEF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CActD,CAAC"}
|
|
@@ -44,9 +44,6 @@ const getPropositions = (n, { answer }) => {
|
|
|
44
44
|
});
|
|
45
45
|
return shuffle(propositions);
|
|
46
46
|
};
|
|
47
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
48
|
-
return ans === answer;
|
|
49
|
-
};
|
|
50
47
|
export const moleculeNomenclature = {
|
|
51
48
|
id: "moleculeNomenclature",
|
|
52
49
|
connector: "\\iff",
|
|
@@ -57,7 +54,6 @@ export const moleculeNomenclature = {
|
|
|
57
54
|
qcmTimer: 60,
|
|
58
55
|
freeTimer: 60,
|
|
59
56
|
getPropositions,
|
|
60
|
-
isAnswerValid,
|
|
61
57
|
maxAllowedQuestions: 20,
|
|
62
58
|
getQuestionFromIdentifiers,
|
|
63
59
|
answerType: "QCU",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"motionReference.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/motionReference.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"motionReference.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/motionReference.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,WAAW,GAAG,QAAQ,CAAC;IAClC,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAsNF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAczD,CAAC"}
|
|
@@ -166,9 +166,6 @@ const getPropositions = (n, { answer }) => {
|
|
|
166
166
|
tryToAddWrongProp(propositions, "On ne peut pas savoir", "raw");
|
|
167
167
|
return shuffleProps(propositions, n);
|
|
168
168
|
};
|
|
169
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
170
|
-
return ans === answer;
|
|
171
|
-
};
|
|
172
169
|
export const MotionReferenceExercise = {
|
|
173
170
|
id: "motionReference",
|
|
174
171
|
label: "Déterminer le mouvement relatif entre deux objets",
|
|
@@ -178,7 +175,6 @@ export const MotionReferenceExercise = {
|
|
|
178
175
|
qcmTimer: 60,
|
|
179
176
|
freeTimer: 60,
|
|
180
177
|
getPropositions,
|
|
181
|
-
isAnswerValid,
|
|
182
178
|
subject: "Physique",
|
|
183
179
|
maxAllowedQuestions: 10,
|
|
184
180
|
hasHintAndCorrection: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeOfAcceleration.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/typeOfAcceleration.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"typeOfAcceleration.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/typeOfAcceleration.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;CAEd,CAAC;AAuFF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAapD,CAAC"}
|
|
@@ -79,9 +79,6 @@ const getPropositions = (n, { answer }) => {
|
|
|
79
79
|
tryToAddWrongProp(propositions, "On ne peut pas savoir", "raw");
|
|
80
80
|
return shuffleProps(propositions, n);
|
|
81
81
|
};
|
|
82
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
83
|
-
return ans === answer;
|
|
84
|
-
};
|
|
85
82
|
export const typeOfAcceleration = {
|
|
86
83
|
id: "typeOfAcceleration",
|
|
87
84
|
label: "Déterminer le type d'accélération du mouvement d'un objet",
|
|
@@ -90,7 +87,6 @@ export const typeOfAcceleration = {
|
|
|
90
87
|
qcmTimer: 60,
|
|
91
88
|
freeTimer: 60,
|
|
92
89
|
getPropositions,
|
|
93
|
-
isAnswerValid,
|
|
94
90
|
hasGeogebra: true,
|
|
95
91
|
answerType: "QCU",
|
|
96
92
|
subject: "Physique",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frequencyComparison.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/sound/frequencyComparison.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"frequencyComparison.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/sound/frequencyComparison.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAKrC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAoEF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAarD,CAAC"}
|
|
@@ -41,9 +41,6 @@ const getPropositions = (n, { answer, soundAsked }) => {
|
|
|
41
41
|
tryToAddWrongProp(propositions, `Aussi aigu que le son $${soundCompared}$`, "raw");
|
|
42
42
|
return shuffleProps(propositions, n);
|
|
43
43
|
};
|
|
44
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
45
|
-
return ans === answer;
|
|
46
|
-
};
|
|
47
44
|
export const frequencyComparison = {
|
|
48
45
|
id: "frequencyComparison",
|
|
49
46
|
label: "Comparer deux fréquences sonores",
|
|
@@ -52,7 +49,6 @@ export const frequencyComparison = {
|
|
|
52
49
|
qcmTimer: 60,
|
|
53
50
|
freeTimer: 60,
|
|
54
51
|
getPropositions,
|
|
55
|
-
isAnswerValid,
|
|
56
52
|
subject: "Physique",
|
|
57
53
|
answerType: "QCU",
|
|
58
54
|
pdfOptions: { shouldSpreadPropositions: true },
|
package/lib/index.d.ts
CHANGED
|
@@ -275,17 +275,13 @@ declare const mathExercises: (Exercise<{
|
|
|
275
275
|
a: number;
|
|
276
276
|
b: number;
|
|
277
277
|
}, object, string | number | boolean | string[] | number[] | boolean[]> | Exercise<{
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
b: number;
|
|
281
|
-
c: number;
|
|
282
|
-
dictFakeNameToQuestionParam: Record<string, {
|
|
283
|
-
fakeName: string;
|
|
278
|
+
questionParams: {
|
|
279
|
+
letter: string;
|
|
284
280
|
trueName: string;
|
|
285
281
|
tex: string;
|
|
286
282
|
nodeIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
287
283
|
explainTex: string;
|
|
288
|
-
}
|
|
284
|
+
}[];
|
|
289
285
|
items: {
|
|
290
286
|
tex: string;
|
|
291
287
|
isValidAnswer: boolean;
|
|
@@ -313,7 +309,9 @@ declare const mathExercises: (Exercise<{
|
|
|
313
309
|
}, object, string | number | boolean | string[] | number[] | boolean[]> | Exercise<{
|
|
314
310
|
nodeIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers[];
|
|
315
311
|
texAnswers: string[];
|
|
316
|
-
},
|
|
312
|
+
}, {
|
|
313
|
+
isFracOfSums: boolean;
|
|
314
|
+
}, string | number | boolean | string[] | number[] | boolean[]> | Exercise<{
|
|
317
315
|
a: number;
|
|
318
316
|
b: number;
|
|
319
317
|
isAdd: boolean;
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,aAAa,MAAM,2BAA2B,CAAC;AAE3D,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,QAAA,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,aAAa,MAAM,2BAA2B,CAAC;AAE3D,OAAO,4BAA4B,CAAC;AACpC,OAAO,E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string;
|
|
21
|
-
func: (node: AlgebraicNode) => AlgebraicNode;
|
|
21
|
+
func: (node: AlgebraicNode) => AlgebraicNode | undefined;
|
|
22
22
|
inverseOperationIds: ProgCalcOperationIdentifiers;
|
|
23
|
-
constructor(operationIds: ProgCalcOperationIdentifiers, strFrench: string, func: (node: AlgebraicNode) => AlgebraicNode, inverseOperationIds: ProgCalcOperationIdentifiers);
|
|
23
|
+
constructor(operationIds: ProgCalcOperationIdentifiers, strFrench: string, func: (node: AlgebraicNode) => AlgebraicNode | undefined, inverseOperationIds: ProgCalcOperationIdentifiers);
|
|
24
24
|
getInverseOperation(): ProgCalcOperation;
|
|
25
25
|
toIdentifiers(): ProgCalcOperationIdentifiers;
|
|
26
26
|
}
|
|
@@ -37,7 +37,7 @@ export declare abstract class ProgCalcConstructor {
|
|
|
37
37
|
export declare class ProgCalc {
|
|
38
38
|
operations: ProgCalcOperation[];
|
|
39
39
|
constructor(arrOperation: ProgCalcOperation[]);
|
|
40
|
-
apply(node: AlgebraicNode): AlgebraicNode;
|
|
40
|
+
apply(node: AlgebraicNode): AlgebraicNode | undefined;
|
|
41
41
|
getArrOfFrenchStrings(): string[];
|
|
42
42
|
getInverseProgCalc(): ProgCalc | undefined;
|
|
43
43
|
toTree(nodeVariable: VariableNode): AlgebraicNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progCalc.d.ts","sourceRoot":"","sources":["../../../src/math/progCalc/progCalc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAMlE,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAI1E,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAG7C,MAAM,MAAM,gBAAgB,GACxB,UAAU,GACV,SAAS,GACT,KAAK,GACL,UAAU,GACV,UAAU,GACV,QAAQ,CAAC;AAEb,MAAM,WAAW,iCAAiC;IAChD,QAAQ,EAAE,gBAAgB,CAAC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opposé`, (node) => opposite(node), { operator: "opposite" });
|
|
49
49
|
case "inverse":
|
|
50
|
-
return new ProgCalcOperation(opIds, `Prendre l'inverse`, (node) =>
|
|
50
|
+
return new ProgCalcOperation(opIds, `Prendre l'inverse`, (node) => {
|
|
51
|
+
if (node.simplify().evaluate() === 0) {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
return frac(1, node);
|
|
56
|
+
}
|
|
57
|
+
}, { operator: "inverse" });
|
|
51
58
|
case "add": {
|
|
52
59
|
const nodeParam = NodeConstructor.fromIdentifiers(opIds.param);
|
|
53
60
|
return new ProgCalcOperation(opIds, `Ajouter $ ${nodeParam.toTex()} $`, (nodeX) => add(nodeX, nodeParam), { operator: "subtract", param: opIds.param });
|
|
@@ -185,8 +192,8 @@ export class ProgCalcConstructor {
|
|
|
185
192
|
operation =
|
|
186
193
|
ProgCalcOperationConstructor.randomFromOpGenConfig(opGenConfig);
|
|
187
194
|
const nodeResult = operation.func(nodeCurrent);
|
|
188
|
-
const numberResult = nodeResult.evaluate();
|
|
189
|
-
const isValidResult = isInt(numberResult * Math.pow(10, nbDigits));
|
|
195
|
+
const numberResult = nodeResult && nodeResult.evaluate();
|
|
196
|
+
const isValidResult = numberResult && isInt(numberResult * Math.pow(10, nbDigits));
|
|
190
197
|
if (isValidResult) {
|
|
191
198
|
isOperationValid = true;
|
|
192
199
|
nodeCurrent = nodeResult;
|
|
@@ -216,6 +223,9 @@ export class ProgCalc {
|
|
|
216
223
|
for (let i = 0; i < this.operations.length; i++) {
|
|
217
224
|
const operation = this.operations[i];
|
|
218
225
|
nodeCurrent = operation.func(nodeCurrent);
|
|
226
|
+
if (nodeCurrent === undefined) {
|
|
227
|
+
return undefined;
|
|
228
|
+
}
|
|
219
229
|
}
|
|
220
230
|
return nodeCurrent;
|
|
221
231
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exoTest.d.ts","sourceRoot":"","sources":["../../src/tests/exoTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAIvD,eAAO,MAAM,OAAO,GAAI,KAAK,QAAQ,CAAC,MAAM,CAAC;;;;
|
|
1
|
+
{"version":3,"file":"exoTest.d.ts","sourceRoot":"","sources":["../../src/tests/exoTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAIvD,eAAO,MAAM,OAAO,GAAI,KAAK,QAAQ,CAAC,MAAM,CAAC;;;;CA0G5C,CAAC"}
|
package/lib/tests/exoTest.js
CHANGED
|
@@ -46,6 +46,13 @@ export const exoTest = (exo) => {
|
|
|
46
46
|
if (!exo.isAnswerTableValid)
|
|
47
47
|
throw new Error(`exo ${exo.id} has no isAnswerTableValid`);
|
|
48
48
|
}
|
|
49
|
+
if (exo.answerType === "QCU" || exo.answerType === "QCM") {
|
|
50
|
+
if (exo.isAnswerValid)
|
|
51
|
+
throw new Error(`exo ${exo.id} has isAnswerValid but has answer type ${exo.answerType}`);
|
|
52
|
+
// console.log(
|
|
53
|
+
// `exo ${exo.id} has isAnswerValid but has answer type ${exo.answerType}`,
|
|
54
|
+
// );
|
|
55
|
+
}
|
|
49
56
|
questions.forEach((question) => {
|
|
50
57
|
const times = questionTest(exo, question);
|
|
51
58
|
qcmTime = times.qcmTime;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"questionTest.d.ts","sourceRoot":"","sources":["../../src/tests/questionTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAKjE,eAAO,MAAM,YAAY,GACvB,KAAK,QAAQ,CAAC,MAAM,CAAC,EACrB,UAAU,QAAQ,CAAC,MAAM,CAAC;;;
|
|
1
|
+
{"version":3,"file":"questionTest.d.ts","sourceRoot":"","sources":["../../src/tests/questionTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAKjE,eAAO,MAAM,YAAY,GACvB,KAAK,QAAQ,CAAC,MAAM,CAAC,EACrB,UAAU,QAAQ,CAAC,MAAM,CAAC;;;CA2P3B,CAAC"}
|
|
@@ -146,6 +146,7 @@ export const questionTest = (exo, question) => {
|
|
|
146
146
|
exo.id +
|
|
147
147
|
" has answerFormat raw but answerType is not QCU or QCM");
|
|
148
148
|
}
|
|
149
|
+
const jsonIds = JSON.stringify(question.identifiers);
|
|
149
150
|
if (exo.answerType !== "QCM" &&
|
|
150
151
|
exo.answerType !== "QCU" &&
|
|
151
152
|
exo.answerType !== "GGB" &&
|
|
@@ -158,7 +159,7 @@ export const questionTest = (exo, question) => {
|
|
|
158
159
|
const before = Date.now();
|
|
159
160
|
console.log("will test vea : ", exo.id);
|
|
160
161
|
if (!exo.isAnswerValid(answer, { answer, ...question.identifiers })) {
|
|
161
|
-
throw new Error(`exo ${exo.id} has invalid VEA, ids ${
|
|
162
|
+
throw new Error(`exo ${exo.id} has invalid VEA, ids ${jsonIds}, answer ${question.answer}`);
|
|
162
163
|
}
|
|
163
164
|
const after = Date.now();
|
|
164
165
|
veaTime = after - before;
|
|
@@ -171,7 +172,7 @@ export const questionTest = (exo, question) => {
|
|
|
171
172
|
if (exo.answerType === "QCM" && !exo.isQCM)
|
|
172
173
|
throw new Error("exo " + exo.id + " has answerType QCM but not isQCM");
|
|
173
174
|
const before = Date.now();
|
|
174
|
-
console.log("will generate props : ", exo.id, "ids :",
|
|
175
|
+
console.log("will generate props : ", exo.id, "ids :", jsonIds);
|
|
175
176
|
const props = exo.getPropositions(4, {
|
|
176
177
|
answer: question.answer,
|
|
177
178
|
...question.identifiers,
|
|
@@ -190,10 +191,12 @@ export const questionTest = (exo, question) => {
|
|
|
190
191
|
throw new Error(`exo ${exo.id} has invalid props`);
|
|
191
192
|
}
|
|
192
193
|
props.forEach((prop) => {
|
|
194
|
+
if (prop.statement.includes("undefined"))
|
|
195
|
+
throw new Error(`exo ${exo.id} has invalid prop (undefined) : ${prop.statement}`);
|
|
193
196
|
if (prop.statement.match(dotDecimalPattern))
|
|
194
|
-
throw new Error(`exo ${exo.id} has invalid prop (dot) : ${prop}`);
|
|
197
|
+
throw new Error(`exo ${exo.id} has invalid prop (dot) : ${prop.statement}`);
|
|
195
198
|
if (prop.statement.includes("[object Object]"))
|
|
196
|
-
throw new Error(`exo ${exo.id} has invalid prop (objectObject) : ${prop}`);
|
|
199
|
+
throw new Error(`exo ${exo.id} has invalid prop (objectObject) : ${prop.statement}`);
|
|
197
200
|
if (!props.every((prop2) => prop2.id === prop.id || prop.statement !== prop2.statement))
|
|
198
201
|
throw new Error(`exo ${exo.id} has invalid prop (duplicate): ${prop.statement}`);
|
|
199
202
|
if (prop.format !== "raw") {
|