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
|
@@ -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 },
|
|
@@ -18,9 +18,9 @@ export type ProgCalcOperationIdentifiers = {
|
|
|
18
18
|
export declare class ProgCalcOperation {
|
|
19
19
|
operationIds: ProgCalcOperationIdentifiers;
|
|
20
20
|
strFrench: 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;IAC3B,WAAW,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;CACvC;AAED,eAAO,MAAM,qBAAqB,EAAE,iCAAiC,EA2BpE,CAAC;AAEF,8BAAsB,4BAA4B;IAChD,MAAM,CAAC,qBAAqB,CAAC,WAAW,EAAE,iCAAiC;IAS3E,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,4BAA4B;
|
|
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;IAC3B,WAAW,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;CACvC;AAED,eAAO,MAAM,qBAAqB,EAAE,iCAAiC,EA2BpE,CAAC;AAEF,8BAAsB,4BAA4B;IAChD,MAAM,CAAC,qBAAqB,CAAC,WAAW,EAAE,iCAAiC;IAS3E,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,4BAA4B;CA8E3D;AAED,MAAM,MAAM,4BAA4B,GAAG;IACzC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,KAAK,CAAC,EAAE,eAAe,CAAC;CACzB,CAAC;AAEF,qBAAa,iBAAiB;IAC5B,YAAY,EAAE,4BAA4B,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,aAAa,GAAG,SAAS,CAAC;IACzD,mBAAmB,EAAE,4BAA4B,CAAC;gBAGhD,YAAY,EAAE,4BAA4B,EAC1C,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,aAAa,GAAG,SAAS,EACxD,mBAAmB,EAAE,4BAA4B;IAQnD,mBAAmB,IAAI,iBAAiB;IAMxC,aAAa,IAAI,4BAA4B;CAG9C;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,EAAE,4BAA4B,EAAE,CAAC;CAC9C,CAAC;AAEF,8BAAsB,mBAAmB;IACvC,MAAM,CAAC,MAAM,CACX,OAAO,EAAE,MAAM,EACf,oBAAoB,GAAE,OAAc,EACpC,uBAAuB,GAAE,iCAAiC,EAA0B;IAatF,MAAM,CAAC,mBAAmB,CACxB,OAAO,EAAE,MAAM,EACf,oBAAoB,EAAE,OAAO,EAC7B,uBAAuB,EAAE,iCAAiC,EAAE,EAC5D,iBAAiB,EAAE,iCAAiC,EAAE;IAyBxD,MAAM,CAAC,mBAAmB,CACxB,OAAO,GAAE,MAAU,EACnB,oBAAoB,GAAE,OAAc;IA6CtC,MAAM,CAAC,YAAY,CACjB,OAAO,EAAE,MAAM,EACf,kBAAkB,EAAE,aAAa,EACjC,QAAQ,GAAE,MAAU,EACpB,oBAAoB,GAAE,OAAc;IA4EtC,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,mBAAmB;CAMlD;AAED,qBAAa,QAAQ;IACnB,UAAU,EAAE,iBAAiB,EAAE,CAAC;gBAEpB,YAAY,EAAE,iBAAiB,EAAE;IAI7C,KAAK,CAAC,IAAI,EAAE,aAAa,GAAG,aAAa,GAAG,SAAS;IAYrD,qBAAqB,IAAI,MAAM,EAAE;IAIjC,kBAAkB,IAAI,QAAQ,GAAG,SAAS;IAO1C,MAAM,CAAC,YAAY,EAAE,YAAY,GAAG,aAAa;IAIjD,aAAa,IAAI,mBAAmB;CAOrC"}
|
|
@@ -47,7 +47,14 @@ export class ProgCalcOperationConstructor {
|
|
|
47
47
|
case "opposite":
|
|
48
48
|
return new ProgCalcOperation(opIds, `Prendre l'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;;;CAqP3B,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,
|