math-exercises 2.2.9 → 2.2.11
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/exercise.d.ts +2 -1
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.js +24 -7
- package/lib/exercises/math/calcul/decimals/index.d.ts +3 -0
- package/lib/exercises/math/calcul/decimals/index.d.ts.map +1 -0
- package/lib/exercises/math/calcul/decimals/index.js +18 -0
- package/lib/exercises/math/calcul/decimals/multiplyDecimalByNegativeTens.d.ts +8 -0
- package/lib/exercises/math/calcul/decimals/multiplyDecimalByNegativeTens.d.ts.map +1 -0
- package/lib/exercises/math/calcul/decimals/multiplyDecimalByNegativeTens.js +53 -0
- package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.d.ts +9 -0
- package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.d.ts.map +1 -0
- package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.js +63 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +33 -1
- package/lib/exercises/math/calcul/index.d.ts +2 -0
- package/lib/exercises/math/calcul/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/index.js +2 -0
- package/lib/exercises/math/calcul/operations/expressionNature.d.ts +8 -0
- package/lib/exercises/math/calcul/operations/expressionNature.d.ts.map +1 -1
- package/lib/exercises/math/calcul/operations/expressionNature.js +180 -80
- package/lib/exercises/math/calcul/operations/index.d.ts +3 -0
- package/lib/exercises/math/calcul/operations/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/operations/index.js +3 -0
- package/lib/exercises/math/calcul/operations/operationsPriorities.d.ts +1 -1
- package/lib/exercises/math/calcul/operations/operationsPriorities.d.ts.map +1 -1
- package/lib/exercises/math/calcul/operations/operationsPriorities.js +20 -5
- package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.d.ts +8 -0
- package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.d.ts.map +1 -0
- package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.js +111 -0
- package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesisNoRelatives.d.ts +8 -0
- package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesisNoRelatives.d.ts.map +1 -0
- package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesisNoRelatives.js +127 -0
- package/lib/exercises/math/calcul/operations/operationsPrioritiesWithoutRelative.d.ts.map +1 -1
- package/lib/exercises/math/calcul/operations/operationsPrioritiesWithoutRelative.js +18 -1
- package/lib/exercises/math/calcul/ordering/decimalOrdering.d.ts +9 -0
- package/lib/exercises/math/calcul/ordering/decimalOrdering.d.ts.map +1 -0
- package/lib/exercises/math/calcul/ordering/decimalOrdering.js +77 -0
- package/lib/exercises/math/calcul/ordering/framing.d.ts +10 -0
- package/lib/exercises/math/calcul/ordering/framing.d.ts.map +1 -0
- package/lib/exercises/math/calcul/ordering/framing.js +143 -0
- package/lib/exercises/math/calcul/ordering/index.d.ts +4 -0
- package/lib/exercises/math/calcul/ordering/index.d.ts.map +1 -0
- package/lib/exercises/math/calcul/ordering/index.js +19 -0
- package/lib/exercises/math/calcul/ordering/integerOrdering.d.ts +8 -0
- package/lib/exercises/math/calcul/ordering/integerOrdering.d.ts.map +1 -0
- package/lib/exercises/math/calcul/ordering/integerOrdering.js +61 -0
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/powerFunctionDerivative.js +1 -1
- package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.js +1 -1
- package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/graphicInequation.js +9 -6
- package/lib/exercises/math/functions/basics/twoFunctionsInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +15 -4
- package/lib/exercises/math/functions/trinoms/canonicalFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/directionVector.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/directionVectorEquation.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/placeAPoint.js +0 -4
- package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.js +2 -3
- package/lib/exercises/math/geometry/vectors/vectorCoordinatesFromTwoPoints.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/vectorCoordinatesFromTwoPoints.js +17 -0
- package/lib/exercises/math/geometry/volumes/volumeOfCube.d.ts.map +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfCube.js +7 -1
- package/lib/exercises/math/index.d.ts +0 -1
- package/lib/exercises/math/index.d.ts.map +1 -1
- package/lib/exercises/math/index.js +0 -1
- package/lib/exercises/math/limits/rationalFracForbiddenValueLimit.d.ts.map +1 -1
- package/lib/exercises/math/percent/htToTTC.d.ts +8 -0
- package/lib/exercises/math/percent/htToTTC.d.ts.map +1 -0
- package/lib/exercises/math/percent/htToTTC.js +50 -0
- package/lib/exercises/math/percent/index.d.ts +2 -0
- package/lib/exercises/math/percent/index.d.ts.map +1 -1
- package/lib/exercises/math/percent/index.js +2 -0
- package/lib/exercises/math/percent/ttcToHT.d.ts +8 -0
- package/lib/exercises/math/percent/ttcToHT.d.ts.map +1 -0
- package/lib/exercises/math/percent/ttcToHT.js +50 -0
- package/lib/exercises/math/powers/powersDivision.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersDivision.js +35 -2
- package/lib/exercises/math/probaStat/calculateProbaOfBinomialDistribution.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/calculateProbaOfBinomialDistribution.js +21 -0
- package/lib/exercises/math/probaStat/probaFromTableWithContext.js +1 -1
- package/lib/exercises/math/probaStat/stats1var/averageList.d.ts +7 -0
- package/lib/exercises/math/probaStat/stats1var/averageList.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/stats1var/averageList.js +52 -0
- package/lib/exercises/math/probaStat/stats1var/etendueList.d.ts +7 -0
- package/lib/exercises/math/probaStat/stats1var/etendueList.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/stats1var/etendueList.js +49 -0
- package/lib/exercises/math/probaStat/stats1var/index.d.ts +2 -0
- package/lib/exercises/math/probaStat/stats1var/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/index.js +2 -0
- package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +2 -11
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.js +42 -0
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.js +7 -2
- package/lib/exercises/math/sequences/geometric/geometricFindTerm.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindTerm.js +42 -0
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.d.ts +10 -0
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.js +56 -0
- package/lib/exercises/math/sequences/geometric/index.d.ts +1 -0
- package/lib/exercises/math/sequences/geometric/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/index.js +1 -0
- package/lib/exercises/math/sequences/index.d.ts +2 -0
- package/lib/exercises/math/sequences/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/index.js +2 -0
- package/lib/exercises/math/sequences/sequenceEvaluation.d.ts +10 -0
- package/lib/exercises/math/sequences/sequenceEvaluation.d.ts.map +1 -0
- package/lib/exercises/math/sequences/sequenceEvaluation.js +143 -0
- package/lib/exercises/math/sequences/sequencePlot.d.ts +9 -0
- package/lib/exercises/math/sequences/sequencePlot.d.ts.map +1 -0
- package/lib/exercises/math/sequences/sequencePlot.js +94 -0
- package/lib/exercises/math/sets/intervals/intervalsIntersection.d.ts.map +1 -1
- package/lib/exercises/math/sets/intervals/intervalsIntersection.js +19 -1
- package/lib/exercises/math/sets/intervals/intervalsUnion.js +1 -1
- package/lib/exercises/math/trigonometry/arcValue.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/arcValue.js +23 -0
- package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.js +1 -1
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +1 -1
- package/lib/exercises/pc/motion/typeOfAcceleration.js +1 -1
- package/lib/exercises/pc/motion/typeOfMovement.js +1 -1
- package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.js +1 -1
- package/lib/index.d.ts +54 -10
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/point.d.ts +11 -0
- package/lib/math/geometry/point.d.ts.map +1 -1
- package/lib/math/geometry/point.js +8 -0
- package/lib/math/numbers/decimals/decimal.d.ts +2 -0
- package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
- package/lib/math/numbers/decimals/decimal.js +18 -0
- package/lib/math/numbers/reals/extendedRingElement.d.ts +3 -1
- package/lib/math/numbers/reals/extendedRingElement.d.ts.map +1 -1
- package/lib/math/numbers/reals/real.d.ts +1 -1
- package/lib/math/polynomials/trinom.d.ts +1 -1
- package/lib/math/sets/intervals/intervals.d.ts +3 -1
- package/lib/math/sets/intervals/intervals.d.ts.map +1 -1
- package/lib/math/sets/intervals/intervals.js +9 -5
- package/lib/math/sets/mathSet.d.ts +2 -2
- package/lib/math/sets/mathSet.d.ts.map +1 -1
- package/lib/math/sets/mathSetInterface.d.ts +1 -1
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +13 -2
- package/lib/server.d.ts.map +1 -1
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- package/lib/tree/nodes/algebraicNode.js +0 -3
- package/lib/tree/nodes/complex/complexNode.d.ts +10 -1
- package/lib/tree/nodes/complex/complexNode.d.ts.map +1 -1
- package/lib/tree/nodes/complex/complexNode.js +7 -0
- package/lib/tree/nodes/equations/equalNode.d.ts +10 -1
- package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equalNode.js +7 -0
- package/lib/tree/nodes/equations/equationSolutionNode.d.ts +10 -1
- package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equationSolutionNode.js +6 -0
- package/lib/tree/nodes/equations/multiEqualNode.d.ts +7 -1
- package/lib/tree/nodes/equations/multiEqualNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/multiEqualNode.js +6 -0
- package/lib/tree/nodes/functions/absNode.d.ts +7 -1
- package/lib/tree/nodes/functions/absNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/absNode.js +6 -0
- package/lib/tree/nodes/functions/arcSinNode.d.ts +7 -1
- package/lib/tree/nodes/functions/arcSinNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/arcSinNode.js +8 -1
- package/lib/tree/nodes/functions/arccosNode.d.ts +7 -1
- package/lib/tree/nodes/functions/arccosNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/arccosNode.js +8 -1
- package/lib/tree/nodes/functions/arctanNode.d.ts +7 -1
- package/lib/tree/nodes/functions/arctanNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/arctanNode.js +8 -1
- package/lib/tree/nodes/functions/cosNode.d.ts +7 -1
- package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/cosNode.js +8 -1
- package/lib/tree/nodes/functions/expNode.d.ts +7 -1
- package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/expNode.js +6 -0
- package/lib/tree/nodes/functions/integralNode.d.ts +19 -2
- package/lib/tree/nodes/functions/integralNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/integralNode.js +20 -0
- package/lib/tree/nodes/functions/log10Node.d.ts +7 -1
- package/lib/tree/nodes/functions/log10Node.d.ts.map +1 -1
- package/lib/tree/nodes/functions/log10Node.js +6 -0
- package/lib/tree/nodes/functions/logNode.d.ts +7 -1
- package/lib/tree/nodes/functions/logNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/logNode.js +6 -0
- package/lib/tree/nodes/functions/oppositeNode.d.ts +7 -1
- package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/oppositeNode.js +6 -0
- package/lib/tree/nodes/functions/sinNode.d.ts +7 -1
- package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sinNode.js +8 -1
- package/lib/tree/nodes/functions/sqrtNode.d.ts +7 -1
- package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sqrtNode.js +6 -0
- package/lib/tree/nodes/functions/tanNode.d.ts +7 -1
- package/lib/tree/nodes/functions/tanNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/tanNode.js +8 -1
- package/lib/tree/nodes/geometry/degree.d.ts +5 -1
- package/lib/tree/nodes/geometry/degree.d.ts.map +1 -1
- package/lib/tree/nodes/geometry/degree.js +6 -0
- package/lib/tree/nodes/geometry/lengthNode.d.ts +5 -1
- package/lib/tree/nodes/geometry/lengthNode.d.ts.map +1 -1
- package/lib/tree/nodes/geometry/lengthNode.js +6 -0
- package/lib/tree/nodes/geometry/pointNode.d.ts +14 -1
- package/lib/tree/nodes/geometry/pointNode.d.ts.map +1 -1
- package/lib/tree/nodes/geometry/pointNode.js +6 -0
- package/lib/tree/nodes/geometry/vectorNode.d.ts +5 -1
- package/lib/tree/nodes/geometry/vectorNode.d.ts.map +1 -1
- package/lib/tree/nodes/geometry/vectorNode.js +6 -0
- package/lib/tree/nodes/hasVariableNode.d.ts +3 -0
- package/lib/tree/nodes/hasVariableNode.d.ts.map +1 -0
- package/lib/tree/nodes/hasVariableNode.js +16 -0
- package/lib/tree/nodes/inequations/inequationNode.d.ts +8 -1
- package/lib/tree/nodes/inequations/inequationNode.d.ts.map +1 -1
- package/lib/tree/nodes/inequations/inequationNode.js +7 -0
- package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts +19 -1
- package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts.map +1 -1
- package/lib/tree/nodes/inequations/inequationSolutionNode.js +7 -1
- package/lib/tree/nodes/node.d.ts +52 -8
- package/lib/tree/nodes/node.d.ts.map +1 -1
- package/lib/tree/nodes/node.js +49 -21
- package/lib/tree/nodes/nodeConstructor.d.ts +7 -0
- package/lib/tree/nodes/nodeConstructor.d.ts.map +1 -0
- package/lib/tree/nodes/nodeConstructor.js +170 -0
- package/lib/tree/nodes/numbers/constantNode.d.ts +7 -1
- package/lib/tree/nodes/numbers/constantNode.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/constantNode.js +9 -1
- package/lib/tree/nodes/numbers/numberNode.d.ts +5 -1
- package/lib/tree/nodes/numbers/numberNode.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/numberNode.js +6 -0
- package/lib/tree/nodes/numbers/percentNode.d.ts +5 -1
- package/lib/tree/nodes/numbers/percentNode.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/percentNode.js +6 -0
- package/lib/tree/nodes/operators/addNode.d.ts +10 -1
- package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/addNode.js +16 -6
- package/lib/tree/nodes/operators/divideNode.d.ts +11 -1
- package/lib/tree/nodes/operators/divideNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/divideNode.js +12 -0
- package/lib/tree/nodes/operators/fractionNode.d.ts +10 -1
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +7 -0
- package/lib/tree/nodes/operators/limitNode.d.ts +11 -1
- package/lib/tree/nodes/operators/limitNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/limitNode.js +8 -0
- package/lib/tree/nodes/operators/multiplyNode.d.ts +10 -1
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +7 -0
- package/lib/tree/nodes/operators/powerNode.d.ts +10 -1
- package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/powerNode.js +7 -0
- package/lib/tree/nodes/operators/substractNode.d.ts +11 -1
- package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/substractNode.js +12 -0
- package/lib/tree/nodes/sets/belongsNode.d.ts +10 -1
- package/lib/tree/nodes/sets/belongsNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/belongsNode.js +7 -0
- package/lib/tree/nodes/sets/closure.d.ts +2 -0
- package/lib/tree/nodes/sets/closure.d.ts.map +1 -1
- package/lib/tree/nodes/sets/closure.js +20 -0
- package/lib/tree/nodes/sets/discreteSetNode.d.ts +10 -2
- package/lib/tree/nodes/sets/discreteSetNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/discreteSetNode.js +13 -3
- package/lib/tree/nodes/sets/intervalNode.d.ts +14 -2
- package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/intervalNode.js +22 -1
- package/lib/tree/nodes/sets/setNode.d.ts +1 -0
- package/lib/tree/nodes/sets/setNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/unionIntervalNode.d.ts +7 -1
- package/lib/tree/nodes/sets/unionIntervalNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/unionIntervalNode.js +7 -1
- package/lib/tree/nodes/variables/variableNode.d.ts +5 -1
- package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -1
- package/lib/tree/nodes/variables/variableNode.js +6 -0
- package/lib/tree/utilities/operatorComposition.js +4 -2
- package/lib/types/keyProps.d.ts +13 -0
- package/lib/types/keyProps.d.ts.map +1 -0
- package/lib/types/keyProps.js +2 -0
- package/lib/utils/alignTex.js +11 -9
- package/lib/utils/diceFlip.d.ts.map +1 -1
- package/lib/utils/diceFlip.js +2 -6
- package/package.json +1 -1
|
@@ -4,6 +4,8 @@ exports.vectorCoordinatesFromTwoPoints = void 0;
|
|
|
4
4
|
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const randint_1 = require("../../../../math/utils/random/randint");
|
|
7
|
+
const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
|
|
8
|
+
const alignTex_1 = require("../../../../utils/alignTex");
|
|
7
9
|
const randomLetter_1 = require("../../../../utils/randomLetter");
|
|
8
10
|
const getVectorCoordinatesFromTwoPointsQuestion = () => {
|
|
9
11
|
const A = [(0, randint_1.randint)(-9, 9), (0, randint_1.randint)(-9, 9)];
|
|
@@ -19,6 +21,20 @@ const getVectorCoordinatesFromTwoPointsQuestion = () => {
|
|
|
19
21
|
instruction: `Soit $${startLetter}\\left(${A[0]};${A[1]}\\right)$ et $${endLetter}\\left(${B[0]};${B[1]}\\right)$. Quelles sont les coordonnées du vecteur $\\overrightarrow{${startLetter}${endLetter}}$ ?`,
|
|
20
22
|
keys: ["semicolon"],
|
|
21
23
|
answerFormat: "tex",
|
|
24
|
+
hint: `Si $A(x_A;y_A)$ et $B(x_B;y_B)$ sont deux points, alors le vecteur $\\overrightarrow{AB}$ a pour coordonnées :
|
|
25
|
+
|
|
26
|
+
$\\overrightarrow{AB} \\begin{pmatrix} x_B - x_A \\\\ y_B - y_A \\end{pmatrix}$`,
|
|
27
|
+
correction: `On a :
|
|
28
|
+
|
|
29
|
+
$${(0, alignTex_1.alignTex)([
|
|
30
|
+
[
|
|
31
|
+
`\\overrightarrow{${startLetter}${endLetter}} \\begin{pmatrix}
|
|
32
|
+
${new substractNode_1.SubstractNode(B[0].toTree(), A[0].toTree()).toTex()}
|
|
33
|
+
\\\\ ${new substractNode_1.SubstractNode(B[1].toTree(), A[1].toTree()).toTex()}\\end{pmatrix} `,
|
|
34
|
+
"=",
|
|
35
|
+
`\\begin{pmatrix}${B[0] - A[0]} \\\\ ${B[1] - A[1]}\\end{pmatrix}`,
|
|
36
|
+
],
|
|
37
|
+
])}$`,
|
|
22
38
|
identifiers: { A, B },
|
|
23
39
|
};
|
|
24
40
|
return question;
|
|
@@ -50,4 +66,5 @@ exports.vectorCoordinatesFromTwoPoints = {
|
|
|
50
66
|
getPropositions,
|
|
51
67
|
isAnswerValid,
|
|
52
68
|
subject: "Mathématiques",
|
|
69
|
+
hasHintAndCorrection: true,
|
|
53
70
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"volumeOfCube.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfCube.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;
|
|
1
|
+
{"version":3,"file":"volumeOfCube.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfCube.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAoEF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAgB9C,CAAC"}
|
|
@@ -22,13 +22,18 @@ const getVolumeOfCubeQuestion = () => {
|
|
|
22
22
|
hideAxes: true,
|
|
23
23
|
hideGrid: true,
|
|
24
24
|
});
|
|
25
|
+
const answer = Math.pow(cubeSide, 3) + "";
|
|
25
26
|
const question = {
|
|
26
|
-
answer
|
|
27
|
+
answer,
|
|
27
28
|
instruction: `$ABCDEFGH$ est un cube d'arête $${cubeSide}$. Calculer son volume.`,
|
|
28
29
|
keys: [],
|
|
29
30
|
answerFormat: "tex",
|
|
30
31
|
commands: ggb.commands,
|
|
31
32
|
options: ggb.getOptions(),
|
|
33
|
+
hint: "Le volume d'un cube est donné par $V = a^3$, où $a$ est l'arête du cube.",
|
|
34
|
+
correction: `Le volume d'un cube est donné par $V = a^3$, où $a$ est l'arête du cube. Ici, le volume de $ABCDEFGH$ est donc :
|
|
35
|
+
|
|
36
|
+
$V = ${cubeSide}^3 = ${answer}.$`,
|
|
32
37
|
coords: [0, cubeSide + 1, 0, cubeSide + 1, 0, cubeSide + 1],
|
|
33
38
|
identifiers: { cubeSide },
|
|
34
39
|
};
|
|
@@ -67,4 +72,5 @@ exports.volumeOfCube = {
|
|
|
67
72
|
isAnswerValid,
|
|
68
73
|
hasGeogebra: true,
|
|
69
74
|
subject: "Mathématiques",
|
|
75
|
+
hasHintAndCorrection: true,
|
|
70
76
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exercises/math/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exercises/math/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rationalFracForbiddenValueLimit.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/limits/rationalFracForbiddenValueLimit.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"rationalFracForbiddenValueLimit.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/limits/rationalFracForbiddenValueLimit.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IAEtB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAyEF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAcjE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"htToTTC.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/htToTTC.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAgCF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,WAAW,CAazC,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.htToTTC = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
7
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
8
|
+
const round_1 = require("../../../math/utils/round");
|
|
9
|
+
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
10
|
+
const random_1 = require("../../../utils/random");
|
|
11
|
+
const getHtToTtcQuestion = () => {
|
|
12
|
+
const TVA = (0, random_1.random)([20, 5.5]);
|
|
13
|
+
const ht = (0, coinFlip_1.coinFlip)() ? (0, randint_1.randint)(50, 1000) : (0, randfloat_1.randfloat)(20, 200, 2);
|
|
14
|
+
const answer = (0, round_1.round)(ht * (1 + TVA / 100), 2).frenchify();
|
|
15
|
+
const question = {
|
|
16
|
+
answer,
|
|
17
|
+
instruction: `Un object coûte $${ht.frenchify()}€$ en HT. Quel est son prix TTC, sachant que la TVA est de $${TVA.frenchify()}\\%$ ? (arrondir au centième)`,
|
|
18
|
+
keys: [],
|
|
19
|
+
answerFormat: "tex",
|
|
20
|
+
identifiers: { TVA, ht },
|
|
21
|
+
};
|
|
22
|
+
return question;
|
|
23
|
+
};
|
|
24
|
+
const getPropositions = (n, { answer, TVA, ht }) => {
|
|
25
|
+
const propositions = [];
|
|
26
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
27
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)((ht * TVA) / 100, 2).frenchify());
|
|
28
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(ht + TVA / 100, 2).frenchify());
|
|
29
|
+
while (propositions.length < n) {
|
|
30
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, randfloat_1.randfloat)(50, 400, 2).frenchify());
|
|
31
|
+
}
|
|
32
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
33
|
+
};
|
|
34
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
35
|
+
return ans === answer;
|
|
36
|
+
};
|
|
37
|
+
exports.htToTTC = {
|
|
38
|
+
id: "htToTTC",
|
|
39
|
+
connector: "=",
|
|
40
|
+
label: "Passer d'un prix HT à un prix TTC",
|
|
41
|
+
levels: [],
|
|
42
|
+
isSingleStep: true,
|
|
43
|
+
sections: [],
|
|
44
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getHtToTtcQuestion, nb),
|
|
45
|
+
qcmTimer: 60,
|
|
46
|
+
freeTimer: 60,
|
|
47
|
+
getPropositions,
|
|
48
|
+
isAnswerValid,
|
|
49
|
+
subject: "Mathématiques",
|
|
50
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
|
|
@@ -24,3 +24,5 @@ __exportStar(require("./valuePercent"), exports);
|
|
|
24
24
|
__exportStar(require("./findProportion"), exports);
|
|
25
25
|
__exportStar(require("./isTableProportional"), exports);
|
|
26
26
|
__exportStar(require("./cmToEvolution"), exports);
|
|
27
|
+
__exportStar(require("./htToTTC"), exports);
|
|
28
|
+
__exportStar(require("./ttcToHT"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ttcToHT.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/ttcToHT.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAuCF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,WAAW,CAazC,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ttcToHT = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
7
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
8
|
+
const round_1 = require("../../../math/utils/round");
|
|
9
|
+
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
10
|
+
const random_1 = require("../../../utils/random");
|
|
11
|
+
const getTtcToHtQuestion = () => {
|
|
12
|
+
const TVA = (0, random_1.random)([20, 5.5]);
|
|
13
|
+
const TTC = (0, coinFlip_1.coinFlip)() ? (0, randint_1.randint)(50, 1000) : (0, randfloat_1.randfloat)(20, 200, 2);
|
|
14
|
+
const answer = (0, round_1.round)(TTC / (1 + TVA / 100), 2).frenchify();
|
|
15
|
+
const question = {
|
|
16
|
+
answer,
|
|
17
|
+
instruction: `Un object coûte $${TTC.frenchify()}€$ en TTC. Quel est son prix HT, sachant que la TVA est de $${TVA.frenchify()}\\%$ ? (arrondir au centième)`,
|
|
18
|
+
keys: [],
|
|
19
|
+
answerFormat: "tex",
|
|
20
|
+
identifiers: { TTC, TVA },
|
|
21
|
+
};
|
|
22
|
+
return question;
|
|
23
|
+
};
|
|
24
|
+
const getPropositions = (n, { answer, TTC, TVA }) => {
|
|
25
|
+
const propositions = [];
|
|
26
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
27
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(TTC * (1 + TVA / 100), 2).frenchify());
|
|
28
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(TTC - (1 + TVA / 100) * TTC, 2).frenchify());
|
|
29
|
+
while (propositions.length < n) {
|
|
30
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, randfloat_1.randfloat)(50, 400, 2).frenchify());
|
|
31
|
+
}
|
|
32
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
33
|
+
};
|
|
34
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
35
|
+
return ans === answer;
|
|
36
|
+
};
|
|
37
|
+
exports.ttcToHT = {
|
|
38
|
+
id: "ttcToHT",
|
|
39
|
+
connector: "=",
|
|
40
|
+
label: "Passer d'un prix TTC à un prix HT",
|
|
41
|
+
levels: [],
|
|
42
|
+
isSingleStep: true,
|
|
43
|
+
sections: [],
|
|
44
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getTtcToHtQuestion, nb),
|
|
45
|
+
qcmTimer: 60,
|
|
46
|
+
freeTimer: 60,
|
|
47
|
+
getPropositions,
|
|
48
|
+
isAnswerValid,
|
|
49
|
+
subject: "Mathématiques",
|
|
50
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"powersDivision.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersDivision.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"powersDivision.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersDivision.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAuFF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CA6BhD,CAAC;AACF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAkBrD,CAAC"}
|
|
@@ -9,6 +9,8 @@ const randint_1 = require("../../../math/utils/random/randint");
|
|
|
9
9
|
const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
|
|
10
10
|
const fractionNode_1 = require("../../../tree/nodes/operators/fractionNode");
|
|
11
11
|
const powerNode_1 = require("../../../tree/nodes/operators/powerNode");
|
|
12
|
+
const substractNode_1 = require("../../../tree/nodes/operators/substractNode");
|
|
13
|
+
const alignTex_1 = require("../../../utils/alignTex");
|
|
12
14
|
const shuffle_1 = require("../../../utils/shuffle");
|
|
13
15
|
const exercise_1 = require("../../exercise");
|
|
14
16
|
const getDistinctQuestions_1 = require("../../utils/getDistinctQuestions");
|
|
@@ -18,11 +20,40 @@ const getPowersDivisionQuestion = (opts) => {
|
|
|
18
20
|
const statement = new fractionNode_1.FractionNode(new powerNode_1.PowerNode(new numberNode_1.NumberNode(a), new numberNode_1.NumberNode(b)), new powerNode_1.PowerNode(new numberNode_1.NumberNode(a), new numberNode_1.NumberNode(c)));
|
|
19
21
|
const answerTree = new power_1.Power(a, b - c).simplify();
|
|
20
22
|
const answer = answerTree.toTex();
|
|
23
|
+
const statementTex = statement.toTex();
|
|
21
24
|
const question = {
|
|
22
|
-
instruction: `Simplifier : $${
|
|
23
|
-
startStatement:
|
|
25
|
+
instruction: `Simplifier : $${statementTex}$`,
|
|
26
|
+
startStatement: statementTex,
|
|
24
27
|
answer,
|
|
25
28
|
keys: [],
|
|
29
|
+
hint: `${opts?.useOnlyPowersOfTen
|
|
30
|
+
? `Pour diviser deux puissances de $10$, on utilise la propriété :
|
|
31
|
+
|
|
32
|
+
$\\frac{10^a}{10^b} = 10^{a-b}$`
|
|
33
|
+
: `Pour diviser deux puissances d'un même nombre $x$, on utilise la propriété :
|
|
34
|
+
|
|
35
|
+
$\\frac{x^a}{x^b} = x^{a-b}$`}`,
|
|
36
|
+
correction: `${opts?.useOnlyPowersOfTen
|
|
37
|
+
? `On utilise la propriété : $\\frac{10^a}{10^b} = 10^{a-b}$. On a alors :
|
|
38
|
+
|
|
39
|
+
${(0, alignTex_1.alignTex)([
|
|
40
|
+
[
|
|
41
|
+
statementTex,
|
|
42
|
+
"=",
|
|
43
|
+
`10^{${new substractNode_1.SubstractNode(b.toTree(), c.toTree()).toTex()}}`,
|
|
44
|
+
],
|
|
45
|
+
["", "=", answer],
|
|
46
|
+
])}`
|
|
47
|
+
: `On utilise la propriété : $\\frac{x^a}{x^b} = x^{a-b}$. On a alors :
|
|
48
|
+
|
|
49
|
+
${(0, alignTex_1.alignTex)([
|
|
50
|
+
[
|
|
51
|
+
statementTex,
|
|
52
|
+
"=",
|
|
53
|
+
`${a.toTree().toTex()}^{${new substractNode_1.SubstractNode(b.toTree(), c.toTree()).toTex()}}`,
|
|
54
|
+
],
|
|
55
|
+
["", "=", answer],
|
|
56
|
+
])}`} `,
|
|
26
57
|
answerFormat: "tex",
|
|
27
58
|
identifiers: { a, b, c },
|
|
28
59
|
};
|
|
@@ -72,6 +103,7 @@ exports.powersDivision = {
|
|
|
72
103
|
getPropositions,
|
|
73
104
|
isAnswerValid,
|
|
74
105
|
subject: "Mathématiques",
|
|
106
|
+
hasHintAndCorrection: true,
|
|
75
107
|
};
|
|
76
108
|
exports.powersOfTenDivision = {
|
|
77
109
|
id: "powersOfTenDivision",
|
|
@@ -86,4 +118,5 @@ exports.powersOfTenDivision = {
|
|
|
86
118
|
getPropositions,
|
|
87
119
|
isAnswerValid,
|
|
88
120
|
subject: "Mathématiques",
|
|
121
|
+
hasHintAndCorrection: true,
|
|
89
122
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calculateProbaOfBinomialDistribution.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/calculateProbaOfBinomialDistribution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"calculateProbaOfBinomialDistribution.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/calculateProbaOfBinomialDistribution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqHF,eAAO,MAAM,oCAAoC,EAAE,QAAQ,CAAC,WAAW,CActE,CAAC"}
|
|
@@ -8,6 +8,9 @@ const combination_1 = require("../../../math/utils/combinatorics/combination");
|
|
|
8
8
|
const randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
9
9
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
10
10
|
const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
|
|
11
|
+
const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
|
|
12
|
+
const powerNode_1 = require("../../../tree/nodes/operators/powerNode");
|
|
13
|
+
const alignTex_1 = require("../../../utils/alignTex");
|
|
11
14
|
const getCalculateProbaOfBinomialDistributionQuestion = () => {
|
|
12
15
|
const exercise = generateExercise();
|
|
13
16
|
const p = new rational_1.Rational(exercise.a, exercise.b);
|
|
@@ -20,6 +23,23 @@ const getCalculateProbaOfBinomialDistributionQuestion = () => {
|
|
|
20
23
|
.toTex()}$. Donner une valeur arrondie au centième de $P(X=${exercise.k}).$`,
|
|
21
24
|
keys: [],
|
|
22
25
|
answerFormat: "tex",
|
|
26
|
+
hint: `Si $X$ est une variable aléatoire qui suit une loi binomiale de paramètres $n$ et $p$, alors on a :
|
|
27
|
+
|
|
28
|
+
$P(X=k) = \\binom{n}{k} p^k (1-p)^{n-k}$`,
|
|
29
|
+
correction: `Si $X$ est une variable aléatoire qui suit une loi binomiale de paramètres $n$ et $p$, alors on a :
|
|
30
|
+
|
|
31
|
+
$P(X=k) = \\binom{n}{k} p^k (1-p)^{n-k}$
|
|
32
|
+
|
|
33
|
+
Ici, on a donc :
|
|
34
|
+
|
|
35
|
+
${(0, alignTex_1.alignTex)([
|
|
36
|
+
[
|
|
37
|
+
`P(X=${exercise.k})`,
|
|
38
|
+
"=",
|
|
39
|
+
`\\binom{${exercise.n}}{${exercise.k}} ${new multiplyNode_1.MultiplyNode(new powerNode_1.PowerNode(p.toTree(), exercise.k.toTree()), new powerNode_1.PowerNode(new rational_1.Rational(exercise.b - exercise.a, exercise.b).toTree(), (exercise.n - exercise.k).toTree())).toTex()}`,
|
|
40
|
+
],
|
|
41
|
+
["", "\\approx", correctAns.toTex()],
|
|
42
|
+
])}`,
|
|
23
43
|
identifiers: { exerciseVars: exercise },
|
|
24
44
|
};
|
|
25
45
|
return question;
|
|
@@ -82,4 +102,5 @@ exports.calculateProbaOfBinomialDistribution = {
|
|
|
82
102
|
getPropositions,
|
|
83
103
|
isAnswerValid,
|
|
84
104
|
subject: "Mathématiques",
|
|
105
|
+
hasHintAndCorrection: true,
|
|
85
106
|
};
|
|
@@ -67,7 +67,7 @@ const getProbaFromTableWithContextQuestion = () => {
|
|
|
67
67
|
answer,
|
|
68
68
|
instruction: `Le tableau suivant donne le nombre de filles et de garçons portant des lunettes dans un lycée :
|
|
69
69
|
|
|
70
|
-
| | Porte des lunettes
|
|
70
|
+
| | Porte des lunettes | Ne porte pas de lunettes |
|
|
71
71
|
|-------|:----------------------:|----------------------------|
|
|
72
72
|
|Filles |${aCapB} |${aCapBBarre}|
|
|
73
73
|
|Garçons |${aBarreCapB} |${aBarreCapBBarre} |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"averageList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/averageList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA4CF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAa7C,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.averageList = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const randfloat_1 = require("../../../../math/utils/random/randfloat");
|
|
7
|
+
const randint_1 = require("../../../../math/utils/random/randint");
|
|
8
|
+
const round_1 = require("../../../../math/utils/round");
|
|
9
|
+
const average_1 = require("../../../../utils/average");
|
|
10
|
+
const getAverageListQuestion = () => {
|
|
11
|
+
let randomValues = [];
|
|
12
|
+
const length = (0, randint_1.randint)(6, 10);
|
|
13
|
+
for (let i = 0; i < length; i++)
|
|
14
|
+
randomValues.push((0, randint_1.randint)(1, 20));
|
|
15
|
+
const sortedValues = randomValues.sort((a, b) => a - b);
|
|
16
|
+
const answer = (0, round_1.round)((0, average_1.average)(sortedValues), 2).frenchify();
|
|
17
|
+
const question = {
|
|
18
|
+
answer,
|
|
19
|
+
instruction: `On considère la liste suivante : $${randomValues.join(";\\ ")}.$
|
|
20
|
+
$\\\\$Calculer la moyenne de cette liste de valeurs (arrondir au centième).`,
|
|
21
|
+
keys: [],
|
|
22
|
+
answerFormat: "tex",
|
|
23
|
+
identifiers: { sortedValues },
|
|
24
|
+
};
|
|
25
|
+
return question;
|
|
26
|
+
};
|
|
27
|
+
const getPropositions = (n, { answer, sortedValues }) => {
|
|
28
|
+
const propositions = [];
|
|
29
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
30
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, sortedValues.reduce((acc, curr) => acc + curr) + "");
|
|
31
|
+
while (propositions.length < n) {
|
|
32
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, randfloat_1.randfloat)(3, 20, 2).frenchify());
|
|
33
|
+
}
|
|
34
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
35
|
+
};
|
|
36
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
37
|
+
return ans === answer;
|
|
38
|
+
};
|
|
39
|
+
exports.averageList = {
|
|
40
|
+
id: "averageList",
|
|
41
|
+
connector: "=",
|
|
42
|
+
label: "Calcul de la moyenne d'une liste de valeurs",
|
|
43
|
+
levels: [],
|
|
44
|
+
isSingleStep: true,
|
|
45
|
+
sections: [],
|
|
46
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getAverageListQuestion, nb),
|
|
47
|
+
qcmTimer: 60,
|
|
48
|
+
freeTimer: 60,
|
|
49
|
+
getPropositions,
|
|
50
|
+
isAnswerValid,
|
|
51
|
+
subject: "Mathématiques",
|
|
52
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"etendueList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/etendueList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAIlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA2CF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAa7C,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.etendueList = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const randint_1 = require("../../../../math/utils/random/randint");
|
|
7
|
+
const getEtendueListQuestion = () => {
|
|
8
|
+
let randomValues = [];
|
|
9
|
+
const length = (0, randint_1.randint)(6, 10);
|
|
10
|
+
for (let i = 0; i < length; i++)
|
|
11
|
+
randomValues.push((0, randint_1.randint)(1, 20));
|
|
12
|
+
const sortedValues = randomValues.sort((a, b) => a - b);
|
|
13
|
+
const answer = (sortedValues[sortedValues.length - 1] - sortedValues[0]).frenchify();
|
|
14
|
+
const question = {
|
|
15
|
+
answer,
|
|
16
|
+
instruction: `On considère la liste suivante : $${randomValues.join(";\\ ")}.$
|
|
17
|
+
$\\\\$Calculer l'étendue de cette liste de valeurs.`,
|
|
18
|
+
keys: [],
|
|
19
|
+
answerFormat: "tex",
|
|
20
|
+
identifiers: { sortedValues },
|
|
21
|
+
};
|
|
22
|
+
return question;
|
|
23
|
+
};
|
|
24
|
+
const getPropositions = (n, { answer, sortedValues }) => {
|
|
25
|
+
const propositions = [];
|
|
26
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
27
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, sortedValues[sortedValues.length - 1] + "");
|
|
28
|
+
while (propositions.length < n) {
|
|
29
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, randint_1.randint)(5, 20) + "");
|
|
30
|
+
}
|
|
31
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
32
|
+
};
|
|
33
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
34
|
+
return ans === answer;
|
|
35
|
+
};
|
|
36
|
+
exports.etendueList = {
|
|
37
|
+
id: "etendueList",
|
|
38
|
+
connector: "=",
|
|
39
|
+
label: "Calcul de l'étendue d'une liste de valeurs",
|
|
40
|
+
levels: [],
|
|
41
|
+
isSingleStep: true,
|
|
42
|
+
sections: [],
|
|
43
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getEtendueListQuestion, nb),
|
|
44
|
+
qcmTimer: 60,
|
|
45
|
+
freeTimer: 60,
|
|
46
|
+
getPropositions,
|
|
47
|
+
isAnswerValid,
|
|
48
|
+
subject: "Mathématiques",
|
|
49
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mCAAmC,CAAC;AAClD,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mCAAmC,CAAC;AAClD,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
|
|
@@ -20,3 +20,5 @@ __exportStar(require("./median"), exports);
|
|
|
20
20
|
__exportStar(require("./medianList"), exports);
|
|
21
21
|
__exportStar(require("./quartiles"), exports);
|
|
22
22
|
__exportStar(require("./quartilesList"), exports);
|
|
23
|
+
__exportStar(require("./averageList"), exports);
|
|
24
|
+
__exportStar(require("./etendueList"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marginalAndConditionalFrequency.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,QAAQ,EAQT,MAAM,mBAAmB,CAAC;AAG3B,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;
|
|
1
|
+
{"version":3,"file":"marginalAndConditionalFrequency.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,QAAQ,EAQT,MAAM,mBAAmB,CAAC;AAG3B,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAkIF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAcjE,CAAC"}
|
|
@@ -8,15 +8,6 @@ const exercise_1 = require("../../../exercise");
|
|
|
8
8
|
const getDistinctQuestions_1 = require("../../../utils/getDistinctQuestions");
|
|
9
9
|
const getAnswer = (rand, x1, x2, x3, x4) => {
|
|
10
10
|
const x = x1 + x2 + x3 + x4;
|
|
11
|
-
const total = x1 + x2 + x3 + x4;
|
|
12
|
-
const totalA = x1 + x3;
|
|
13
|
-
const totalB = x2 + x4;
|
|
14
|
-
const totalC = x1 + x2;
|
|
15
|
-
const totalD = x3 + x4;
|
|
16
|
-
const A_C = x1;
|
|
17
|
-
const A_D = x3;
|
|
18
|
-
const B_C = x2;
|
|
19
|
-
const B_D = x4;
|
|
20
11
|
let freqString;
|
|
21
12
|
let frequence;
|
|
22
13
|
let answer;
|
|
@@ -112,8 +103,8 @@ const getPropositions = (n, { answer, rand, x1, x2, x3, x4 }) => {
|
|
|
112
103
|
const propositions = [];
|
|
113
104
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
114
105
|
while (propositions.length < n) {
|
|
115
|
-
const
|
|
116
|
-
const { answer: answerTree } = getAnswer(
|
|
106
|
+
const fakeRand = (0, randint_1.randint)(0, 12);
|
|
107
|
+
const { answer: answerTree } = getAnswer(fakeRand, x1, x2, x3, x4);
|
|
117
108
|
(0, exercise_1.tryToAddWrongProp)(propositions, answerTree.toTex());
|
|
118
109
|
}
|
|
119
110
|
return (0, shuffle_1.shuffle)(propositions);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arithmeticFindTerm.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticFindTerm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"arithmeticFindTerm.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticFindTerm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAyFF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAgBpD,CAAC"}
|
|
@@ -4,6 +4,11 @@ exports.arithmeticFindTerm = void 0;
|
|
|
4
4
|
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const randint_1 = require("../../../../math/utils/random/randint");
|
|
7
|
+
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
8
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
9
|
+
const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
|
|
10
|
+
const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
|
|
11
|
+
const alignTex_1 = require("../../../../utils/alignTex");
|
|
7
12
|
const random_1 = require("../../../../utils/random");
|
|
8
13
|
const getArithmeticFindTermQuestion = () => {
|
|
9
14
|
const firstRank = (0, random_1.random)([0, 1]);
|
|
@@ -17,6 +22,42 @@ const getArithmeticFindTermQuestion = () => {
|
|
|
17
22
|
keys: [],
|
|
18
23
|
answerFormat: "tex",
|
|
19
24
|
identifiers: { firstRank, askedRank, firstTerm, reason },
|
|
25
|
+
hint: `Le terme général d'une suite arithmétique est :
|
|
26
|
+
|
|
27
|
+
${!firstRank
|
|
28
|
+
? `$u_n = u_0 + r\\times n$, où $u_0$`
|
|
29
|
+
: `$u_n = u_1 + r \\times (n-1)$, où $u_1$`} est le premier terme et $r$ la raison.`,
|
|
30
|
+
correction: `Le terme général de la suite $u$ est :
|
|
31
|
+
|
|
32
|
+
${!firstRank
|
|
33
|
+
? (0, alignTex_1.alignTex)([
|
|
34
|
+
[`u_n`, "=", `u_0 + r\\times n`],
|
|
35
|
+
[
|
|
36
|
+
"",
|
|
37
|
+
"=",
|
|
38
|
+
new addNode_1.AddNode(firstTerm.toTree(), new multiplyNode_1.MultiplyNode(reason.toTree(), new variableNode_1.VariableNode("n"))).toTex(),
|
|
39
|
+
],
|
|
40
|
+
])
|
|
41
|
+
: (0, alignTex_1.alignTex)([
|
|
42
|
+
[`u_n`, "=", `u_1 + r \\times (n-1)`],
|
|
43
|
+
[
|
|
44
|
+
"",
|
|
45
|
+
"=",
|
|
46
|
+
new addNode_1.AddNode(firstTerm.toTree(), new multiplyNode_1.MultiplyNode(reason.toTree(), new substractNode_1.SubstractNode(new variableNode_1.VariableNode("n"), (1).toTree()))).toTex(),
|
|
47
|
+
],
|
|
48
|
+
])}
|
|
49
|
+
|
|
50
|
+
Il suffit alors de remplacer $n$ par $${askedRank}$ dans la formule :
|
|
51
|
+
|
|
52
|
+
${(0, alignTex_1.alignTex)([
|
|
53
|
+
[
|
|
54
|
+
`u_{${askedRank}}`,
|
|
55
|
+
"=",
|
|
56
|
+
`${new addNode_1.AddNode(firstTerm.toTree(), new multiplyNode_1.MultiplyNode(reason.toTree(), (askedRank - firstRank).toTree())).toTex()}`,
|
|
57
|
+
],
|
|
58
|
+
["", "=", `${answer}`],
|
|
59
|
+
])}
|
|
60
|
+
`,
|
|
20
61
|
};
|
|
21
62
|
return question;
|
|
22
63
|
};
|
|
@@ -45,4 +86,5 @@ exports.arithmeticFindTerm = {
|
|
|
45
86
|
getPropositions,
|
|
46
87
|
isAnswerValid,
|
|
47
88
|
subject: "Mathématiques",
|
|
89
|
+
hasHintAndCorrection: true,
|
|
48
90
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recognizeArithmeticFromFirstTerms.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;
|
|
1
|
+
{"version":3,"file":"recognizeArithmeticFromFirstTerms.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AA0EF,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,WAAW,CAenE,CAAC"}
|