math-exercises 1.3.16 → 1.3.18
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/README.md +73 -73
- package/lib/exercises/calcul/addAndSub.d.ts +6 -6
- package/lib/exercises/calcul/addAndSub.js +39 -39
- package/lib/exercises/calcul/addAndSubWithoutRelatives.d.ts +7 -0
- package/lib/exercises/calcul/addAndSubWithoutRelatives.d.ts.map +1 -0
- package/lib/exercises/calcul/addAndSubWithoutRelatives.js +49 -0
- package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.d.ts +3 -3
- package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.js +35 -35
- package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.d.ts +3 -3
- package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.js +32 -32
- package/lib/exercises/calcul/fractions/fractionAndIntegerSum.d.ts +3 -3
- package/lib/exercises/calcul/fractions/fractionAndIntegerSum.js +32 -32
- package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.d.ts +1 -0
- package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.d.ts.map +1 -0
- package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.js +53 -0
- package/lib/exercises/calcul/fractions/fractionsDivision.d.ts +3 -3
- package/lib/exercises/calcul/fractions/fractionsDivision.js +29 -29
- package/lib/exercises/calcul/fractions/fractionsProduct.d.ts +3 -3
- package/lib/exercises/calcul/fractions/fractionsProduct.js +28 -28
- package/lib/exercises/calcul/fractions/fractionsSum.d.ts +3 -3
- package/lib/exercises/calcul/fractions/fractionsSum.js +28 -28
- package/lib/exercises/calcul/fractions/simplifyFraction.d.ts +3 -3
- package/lib/exercises/calcul/fractions/simplifyFraction.js +24 -24
- package/lib/exercises/calcul/operations/operationsPriorities.d.ts +10 -10
- package/lib/exercises/calcul/operations/operationsPriorities.js +98 -98
- package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.d.ts +10 -0
- package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.d.ts.map +1 -1
- package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.js +179 -111
- package/lib/exercises/calcul/rounding/rounding.d.ts +19 -19
- package/lib/exercises/calcul/rounding/rounding.js +85 -85
- package/lib/exercises/calculLitteral/distributivity/allIdentities.d.ts +3 -3
- package/lib/exercises/calculLitteral/distributivity/allIdentities.js +27 -27
- package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.d.ts +3 -3
- package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.js +30 -30
- package/lib/exercises/calculLitteral/distributivity/firstIdentity.d.ts +3 -3
- package/lib/exercises/calculLitteral/distributivity/firstIdentity.js +31 -31
- package/lib/exercises/calculLitteral/distributivity/secondIdentity.d.ts +3 -3
- package/lib/exercises/calculLitteral/distributivity/secondIdentity.js +32 -32
- package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.d.ts +3 -3
- package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.js +32 -32
- package/lib/exercises/calculLitteral/distributivity/thirdIdentity.d.ts +3 -3
- package/lib/exercises/calculLitteral/distributivity/thirdIdentity.js +31 -31
- package/lib/exercises/calculLitteral/equation/equationSimpleSquare.d.ts +4 -0
- package/lib/exercises/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -0
- package/lib/exercises/calculLitteral/equation/equationSimpleSquare.js +46 -0
- package/lib/exercises/calculLitteral/equation/equationType1Exercise.d.ts +6 -6
- package/lib/exercises/calculLitteral/equation/equationType1Exercise.js +37 -37
- package/lib/exercises/calculLitteral/equation/equationType2Exercise.d.ts +6 -6
- package/lib/exercises/calculLitteral/equation/equationType2Exercise.js +40 -40
- package/lib/exercises/calculLitteral/equation/equationType3Exercise.d.ts +6 -6
- package/lib/exercises/calculLitteral/equation/equationType3Exercise.js +41 -41
- package/lib/exercises/calculLitteral/equation/equationType4Exercise.d.ts +6 -6
- package/lib/exercises/calculLitteral/equation/equationType4Exercise.js +43 -43
- package/lib/exercises/calculLitteral/equation/firstDegreeEquation.d.ts +4 -0
- package/lib/exercises/calculLitteral/equation/firstDegreeEquation.d.ts.map +1 -0
- package/lib/exercises/calculLitteral/equation/firstDegreeEquation.js +38 -0
- package/lib/exercises/calculLitteral/equation/firstDegreeGeneralEquation.d.ts +4 -0
- package/lib/exercises/calculLitteral/equation/firstDegreeGeneralEquation.d.ts.map +1 -0
- package/lib/exercises/calculLitteral/equation/firstDegreeGeneralEquation.js +41 -0
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.d.ts +3 -3
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.js +32 -32
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.d.ts +3 -3
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.js +33 -33
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.d.ts +3 -3
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.js +32 -32
- package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.d.ts +6 -6
- package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.js +38 -38
- package/lib/exercises/derivation/derivative/affineDerivative.d.ts +3 -3
- package/lib/exercises/derivation/derivative/affineDerivative.js +27 -27
- package/lib/exercises/derivation/derivative/secondDegreeDerivative.js +28 -28
- package/lib/exercises/derivation/derivative/thirdDegreeDerivative.d.ts +4 -0
- package/lib/exercises/derivation/derivative/thirdDegreeDerivative.d.ts.map +1 -0
- package/lib/exercises/derivation/derivative/thirdDegreeDerivative.js +31 -0
- package/lib/exercises/derivation/derivative/usualderivative.d.ts +4 -0
- package/lib/exercises/derivation/derivative/usualderivative.d.ts.map +1 -0
- package/lib/exercises/derivation/derivative/usualderivative.js +67 -0
- package/lib/exercises/exercise.d.ts +16 -16
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/exercise.js +7 -7
- package/lib/exercises/exercises.d.ts +1 -1
- package/lib/exercises/exercises.d.ts.map +1 -1
- package/lib/exercises/exercises.js +152 -113
- package/lib/exercises/geometry/cartesian/midpoint.d.ts +3 -3
- package/lib/exercises/geometry/cartesian/midpoint.js +29 -29
- package/lib/exercises/geometry/vectors/scalarProductViaCoords.d.ts +3 -3
- package/lib/exercises/geometry/vectors/scalarProductViaCoords.js +28 -28
- package/lib/exercises/geometry/vectors/scalarProductViaNorms.js +27 -27
- package/lib/exercises/percent/applyPercent.d.ts +4 -0
- package/lib/exercises/percent/applyPercent.d.ts.map +1 -0
- package/lib/exercises/percent/applyPercent.js +41 -0
- package/lib/exercises/percent/averageEvolutionRate.d.ts +4 -0
- package/lib/exercises/percent/averageEvolutionRate.d.ts.map +1 -0
- package/lib/exercises/percent/averageEvolutionRate.js +28 -0
- package/lib/exercises/percent/globalPercent.d.ts +4 -0
- package/lib/exercises/percent/globalPercent.d.ts.map +1 -0
- package/lib/exercises/percent/globalPercent.js +44 -0
- package/lib/exercises/percent/reciprocalPercentage.d.ts +4 -0
- package/lib/exercises/percent/reciprocalPercentage.d.ts.map +1 -0
- package/lib/exercises/percent/reciprocalPercentage.js +35 -0
- package/lib/exercises/powers/powersDivision.d.ts +7 -7
- package/lib/exercises/powers/powersDivision.js +44 -44
- package/lib/exercises/powers/powersOfTenToDecimal.d.ts +6 -6
- package/lib/exercises/powers/powersOfTenToDecimal.js +32 -32
- package/lib/exercises/powers/powersPower.d.ts +7 -7
- package/lib/exercises/powers/powersPower.js +43 -43
- package/lib/exercises/powers/powersProduct.d.ts +7 -7
- package/lib/exercises/powers/powersProduct.js +44 -44
- package/lib/exercises/powers/scientificToDecimal.d.ts +6 -6
- package/lib/exercises/powers/scientificToDecimal.js +37 -37
- package/lib/exercises/proba/conditionalProbability.d.ts +4 -0
- package/lib/exercises/proba/conditionalProbability.d.ts.map +1 -0
- package/lib/exercises/proba/conditionalProbability.js +72 -0
- package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts +4 -0
- package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts.map +1 -0
- package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +29 -0
- package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts +4 -0
- package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts.map +1 -0
- package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.js +29 -0
- package/lib/exercises/sequences/arithmetic/arithmeticFindReason.d.ts +4 -0
- package/lib/exercises/sequences/arithmetic/arithmeticFindReason.d.ts.map +1 -0
- package/lib/exercises/sequences/arithmetic/arithmeticFindReason.js +29 -0
- package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.d.ts +4 -0
- package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.d.ts.map +1 -0
- package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.js +28 -0
- package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.d.ts +4 -0
- package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.d.ts.map +1 -0
- package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.js +28 -0
- package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.d.ts +4 -0
- package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.d.ts.map +1 -0
- package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.js +39 -0
- package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.d.ts +3 -3
- package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.js +34 -34
- package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.d.ts +3 -3
- package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.js +33 -33
- package/lib/exercises/sequences/geometric/geometricFindReason.d.ts +3 -3
- package/lib/exercises/sequences/geometric/geometricFindReason.js +29 -29
- package/lib/exercises/sequences/geometric/geometricReasonUsage.d.ts +3 -3
- package/lib/exercises/sequences/geometric/geometricReasonUsage.js +28 -28
- package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts +7 -7
- package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.js +28 -28
- package/lib/exercises/squareRoots/simpifySquareRoot.d.ts +3 -3
- package/lib/exercises/squareRoots/simpifySquareRoot.js +27 -27
- package/lib/exercises/trigonometry/mainRemarkableValues.d.ts +3 -3
- package/lib/exercises/trigonometry/mainRemarkableValues.js +28 -28
- package/lib/exercises/trigonometry/remarkableValues.d.ts +3 -3
- package/lib/exercises/trigonometry/remarkableValues.js +28 -28
- package/lib/exercises/utils/getDistinctQuestions.d.ts +2 -2
- package/lib/exercises/utils/getDistinctQuestions.js +15 -15
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +6 -6
- package/lib/math/geometry/point.d.ts +12 -12
- package/lib/math/geometry/point.js +27 -27
- package/lib/math/geometry/vector.d.ts +15 -15
- package/lib/math/geometry/vector.js +31 -31
- package/lib/math/numbers/decimals/decimal.d.ts +24 -24
- package/lib/math/numbers/decimals/decimal.js +140 -140
- package/lib/math/numbers/epsilon.d.ts +1 -1
- package/lib/math/numbers/epsilon.js +10 -10
- package/lib/math/numbers/integer/integer.d.ts +14 -14
- package/lib/math/numbers/integer/integer.js +68 -68
- package/lib/math/numbers/integer/power.d.ts +13 -13
- package/lib/math/numbers/integer/power.js +52 -52
- package/lib/math/numbers/nombre.d.ts +13 -13
- package/lib/math/numbers/nombre.js +10 -10
- package/lib/math/numbers/rationals/rational.d.ts +25 -25
- package/lib/math/numbers/rationals/rational.js +113 -113
- package/lib/math/numbers/reals/real.d.ts +9 -9
- package/lib/math/numbers/reals/real.js +16 -16
- package/lib/math/numbers/reals/squareRoot.d.ts +18 -18
- package/lib/math/numbers/reals/squareRoot.js +63 -63
- package/lib/math/polynomials/affine.d.ts +15 -15
- package/lib/math/polynomials/affine.js +42 -42
- package/lib/math/polynomials/polynomial.d.ts +25 -25
- package/lib/math/polynomials/polynomial.d.ts.map +1 -1
- package/lib/math/polynomials/polynomial.js +131 -129
- package/lib/math/sequences/arithmeticSequence.js +1 -1
- package/lib/math/sequences/geometricSequence.d.ts +3 -3
- package/lib/math/sequences/geometricSequence.js +8 -8
- package/lib/math/sequences/sequence.d.ts +22 -22
- package/lib/math/sequences/sequence.js +21 -21
- package/lib/math/sets/discreteSet.d.ts +10 -10
- package/lib/math/sets/discreteSet.js +28 -28
- package/lib/math/sets/emptySet.js +6 -6
- package/lib/math/sets/intervals/intervals.d.ts +26 -26
- package/lib/math/sets/intervals/intervals.js +104 -104
- package/lib/math/sets/mathSet.d.ts +7 -7
- package/lib/math/sets/mathSet.js +10 -10
- package/lib/math/sets/mathSetInterface.d.ts +5 -5
- package/lib/math/sets/mathSetInterface.js +2 -2
- package/lib/math/trigonometry/remarkableValue.d.ts +10 -10
- package/lib/math/trigonometry/remarkableValue.js +29 -29
- package/lib/math/trigonometry/remarkableValues.d.ts +2 -2
- package/lib/math/trigonometry/remarkableValues.js +51 -51
- package/lib/math/utils/arithmetic/coprimesOf.d.ts +1 -1
- package/lib/math/utils/arithmetic/coprimesOf.js +13 -13
- package/lib/math/utils/arithmetic/dividersOf.d.ts +1 -1
- package/lib/math/utils/arithmetic/dividersOf.js +12 -12
- package/lib/math/utils/arithmetic/gcd.d.ts +1 -1
- package/lib/math/utils/arithmetic/gcd.js +7 -7
- package/lib/math/utils/arithmetic/isSquare.d.ts +1 -1
- package/lib/math/utils/arithmetic/isSquare.js +7 -7
- package/lib/math/utils/arithmetic/lcd.d.ts +1 -1
- package/lib/math/utils/arithmetic/lcd.js +12 -12
- package/lib/math/utils/arithmetic/nonCoprimesOf.d.ts +1 -1
- package/lib/math/utils/arithmetic/nonCoprimesOf.js +13 -13
- package/lib/math/utils/arithmetic/nonDividersOf.d.ts +1 -1
- package/lib/math/utils/arithmetic/nonDividersOf.js +14 -14
- package/lib/math/utils/arithmetic/primeFactors.d.ts +5 -5
- package/lib/math/utils/arithmetic/primeFactors.js +22 -22
- package/lib/math/utils/decimals/decimalPartLengthOf.d.ts +1 -1
- package/lib/math/utils/decimals/decimalPartLengthOf.js +14 -14
- package/lib/math/utils/random/randTupleInt.d.ts +13 -13
- package/lib/math/utils/random/randTupleInt.js +30 -30
- package/lib/math/utils/random/randint.d.ts +4 -4
- package/lib/math/utils/random/randint.js +18 -18
- package/lib/math/utils/round.d.ts +1 -1
- package/lib/math/utils/round.js +8 -8
- package/lib/server.d.ts +1 -1
- package/lib/server.js +33 -34
- package/lib/tree/nodes/functions/cosNode.d.ts +9 -9
- package/lib/tree/nodes/functions/cosNode.js +21 -21
- package/lib/tree/nodes/functions/functionNode.d.ts +14 -14
- package/lib/tree/nodes/functions/functionNode.js +20 -20
- package/lib/tree/nodes/functions/oppositeNode.d.ts +7 -7
- package/lib/tree/nodes/functions/oppositeNode.js +26 -26
- package/lib/tree/nodes/functions/sinNode.js +1 -1
- package/lib/tree/nodes/functions/sqrtNode.d.ts +8 -8
- package/lib/tree/nodes/functions/sqrtNode.js +18 -18
- package/lib/tree/nodes/node.d.ts +12 -12
- package/lib/tree/nodes/node.js +11 -11
- package/lib/tree/nodes/numbers/constantNode.d.ts +9 -9
- package/lib/tree/nodes/numbers/constantNode.js +18 -18
- package/lib/tree/nodes/numbers/numberNode.d.ts +10 -10
- package/lib/tree/nodes/numbers/numberNode.js +19 -19
- package/lib/tree/nodes/numbers/piNode.d.ts +2 -2
- package/lib/tree/nodes/numbers/piNode.js +5 -5
- package/lib/tree/nodes/operators/addNode.d.ts +7 -7
- package/lib/tree/nodes/operators/addNode.js +19 -19
- package/lib/tree/nodes/operators/divideNode.d.ts +11 -11
- package/lib/tree/nodes/operators/divideNode.js +34 -34
- package/lib/tree/nodes/operators/equalNode.d.ts +7 -7
- package/lib/tree/nodes/operators/equalNode.js +16 -16
- package/lib/tree/nodes/operators/fractionNode.d.ts +11 -11
- package/lib/tree/nodes/operators/fractionNode.js +20 -20
- package/lib/tree/nodes/operators/multiplyNode.d.ts +7 -7
- package/lib/tree/nodes/operators/multiplyNode.js +43 -43
- package/lib/tree/nodes/operators/operatorNode.d.ts +21 -21
- package/lib/tree/nodes/operators/operatorNode.js +35 -35
- package/lib/tree/nodes/operators/powerNode.d.ts +7 -7
- package/lib/tree/nodes/operators/powerNode.js +33 -33
- package/lib/tree/nodes/operators/substractNode.d.ts +7 -7
- package/lib/tree/nodes/operators/substractNode.js +24 -24
- package/lib/tree/nodes/variables/variableNode.d.ts +8 -8
- package/lib/tree/nodes/variables/variableNode.js +19 -19
- package/lib/tree/parsers/derivateParser.js +62 -62
- package/lib/tree/parsers/simplify.d.ts +2 -2
- package/lib/tree/parsers/simplify.js +52 -52
- package/lib/utils/arrayEqual.d.ts +1 -1
- package/lib/utils/arrayEqual.js +13 -13
- package/lib/utils/coinFlip.d.ts +1 -1
- package/lib/utils/coinFlip.js +7 -7
- package/lib/utils/random.d.ts +1 -1
- package/lib/utils/random.js +7 -7
- package/lib/utils/shuffle.d.ts +1 -1
- package/lib/utils/shuffle.js +15 -15
- package/package.json +49 -50
- package/lib/exercises/calcul/operationsPriorities.js +0 -88
- package/lib/exercises/derivation/derivative/thridDegreeDerivative.d.ts +0 -1
- package/lib/exercises/derivation/derivative/thridDegreeDerivative.d.ts.map +0 -1
- package/lib/exercises/derivation/derivative/thridDegreeDerivative.js +0 -1
- package/lib/geometry/point.js +0 -27
- package/lib/geometry/vector.js +0 -31
- package/lib/mathutils/arithmetic/coprimesOf.js +0 -13
- package/lib/mathutils/arithmetic/dividersOf.js +0 -12
- package/lib/mathutils/arithmetic/gcd.js +0 -7
- package/lib/mathutils/arithmetic/isSquare.js +0 -7
- package/lib/mathutils/arithmetic/lcd.js +0 -12
- package/lib/mathutils/arithmetic/nonCoprimesOf.js +0 -13
- package/lib/mathutils/arithmetic/nonDividersOf.js +0 -14
- package/lib/mathutils/arithmetic/primeFactors.js +0 -22
- package/lib/mathutils/decimals/decimalPartLengthOf.js +0 -14
- package/lib/mathutils/random/randTupleInt.js +0 -30
- package/lib/mathutils/random/randint.js +0 -18
- package/lib/mathutils/round.js +0 -8
- package/lib/numbers/decimals/decimal.js +0 -140
- package/lib/numbers/epsilon.js +0 -10
- package/lib/numbers/integer/integer.js +0 -68
- package/lib/numbers/integer/power.js +0 -52
- package/lib/numbers/nombre.js +0 -10
- package/lib/numbers/rationals/rational.js +0 -113
- package/lib/numbers/reals/real.js +0 -16
- package/lib/numbers/reals/squareRoot.js +0 -63
- package/lib/polynomials/affine.js +0 -42
- package/lib/polynomials/polynomial.js +0 -125
- package/lib/sets/discreteSet.js +0 -28
- package/lib/sets/emptySet.js +0 -6
- package/lib/sets/intervals/intervals.js +0 -108
- package/lib/sets/intervals/union.js +0 -1
- package/lib/sets/mathSet.js +0 -10
- package/lib/sets/mathSetInterface.js +0 -2
- package/lib/tree/parsers/latexParser.js +0 -110
- package/lib/utils/coin.js +0 -7
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getMidpointQuestion = exports.midpoint = void 0;
|
|
4
|
-
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
-
const point_1 = require("../../../math/geometry/point");
|
|
6
|
-
const randTupleInt_1 = require("../../../math/utils/random/randTupleInt");
|
|
7
|
-
const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
|
|
8
|
-
exports.midpoint = {
|
|
9
|
-
id: 'midpoint',
|
|
10
|
-
connector: '=',
|
|
11
|
-
instruction: '',
|
|
12
|
-
label: 'Coordonnées du milieu',
|
|
13
|
-
levels: ['3', '2', '1'],
|
|
14
|
-
isSingleStep: false,
|
|
15
|
-
section: 'Géométrie cartésienne',
|
|
16
|
-
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getMidpointQuestion, nb),
|
|
17
|
-
};
|
|
18
|
-
function getMidpointQuestion() {
|
|
19
|
-
const [coords1, coords2] = (0, randTupleInt_1.distinctRandTupleInt)(2, 2, { from: -9, to: 10 });
|
|
20
|
-
const A = new point_1.Point('A', new numberNode_1.NumberNode(coords1[0]), new numberNode_1.NumberNode(coords1[1]));
|
|
21
|
-
const B = new point_1.Point('B', new numberNode_1.NumberNode(coords2[0]), new numberNode_1.NumberNode(coords2[1]));
|
|
22
|
-
const question = {
|
|
23
|
-
instruction: `Soit $${A.toTexWithCoords()}$ et $${B.toTexWithCoords()}$. Quelles sont les coordonnées du milieu $I$ de $[AB]$ ?`,
|
|
24
|
-
startStatement: 'I',
|
|
25
|
-
answer: A.midpoint(B).toTexWithCoords(),
|
|
26
|
-
};
|
|
27
|
-
return question;
|
|
28
|
-
}
|
|
29
|
-
exports.getMidpointQuestion = getMidpointQuestion;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMidpointQuestion = exports.midpoint = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const point_1 = require("../../../math/geometry/point");
|
|
6
|
+
const randTupleInt_1 = require("../../../math/utils/random/randTupleInt");
|
|
7
|
+
const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
|
|
8
|
+
exports.midpoint = {
|
|
9
|
+
id: 'midpoint',
|
|
10
|
+
connector: '=',
|
|
11
|
+
instruction: '',
|
|
12
|
+
label: 'Coordonnées du milieu',
|
|
13
|
+
levels: ['3', '2', '1'],
|
|
14
|
+
isSingleStep: false,
|
|
15
|
+
section: 'Géométrie cartésienne',
|
|
16
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getMidpointQuestion, nb),
|
|
17
|
+
};
|
|
18
|
+
function getMidpointQuestion() {
|
|
19
|
+
const [coords1, coords2] = (0, randTupleInt_1.distinctRandTupleInt)(2, 2, { from: -9, to: 10 });
|
|
20
|
+
const A = new point_1.Point('A', new numberNode_1.NumberNode(coords1[0]), new numberNode_1.NumberNode(coords1[1]));
|
|
21
|
+
const B = new point_1.Point('B', new numberNode_1.NumberNode(coords2[0]), new numberNode_1.NumberNode(coords2[1]));
|
|
22
|
+
const question = {
|
|
23
|
+
instruction: `Soit $${A.toTexWithCoords()}$ et $${B.toTexWithCoords()}$. Quelles sont les coordonnées du milieu $I$ de $[AB]$ ?`,
|
|
24
|
+
startStatement: 'I',
|
|
25
|
+
answer: A.midpoint(B).toTexWithCoords(),
|
|
26
|
+
};
|
|
27
|
+
return question;
|
|
28
|
+
}
|
|
29
|
+
exports.getMidpointQuestion = getMidpointQuestion;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Exercise, Question } from '../../../exercises/exercise';
|
|
2
|
-
export declare const scalarProductViaCoords: Exercise;
|
|
3
|
-
export declare function getScalarProductViaCoordsQuestion(): Question;
|
|
1
|
+
import { Exercise, Question } from '../../../exercises/exercise';
|
|
2
|
+
export declare const scalarProductViaCoords: Exercise;
|
|
3
|
+
export declare function getScalarProductViaCoordsQuestion(): Question;
|
|
4
4
|
//# sourceMappingURL=scalarProductViaCoords.d.ts.map
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getScalarProductViaCoordsQuestion = exports.scalarProductViaCoords = void 0;
|
|
4
|
-
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
-
const vector_1 = require("../../../math/geometry/vector");
|
|
6
|
-
const randTupleInt_1 = require("../../../math/utils/random/randTupleInt");
|
|
7
|
-
const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
|
|
8
|
-
exports.scalarProductViaCoords = {
|
|
9
|
-
id: 'scalarProductViaCoords',
|
|
10
|
-
connector: '=',
|
|
11
|
-
instruction: '',
|
|
12
|
-
isSingleStep: false,
|
|
13
|
-
label: "Calculer un produit scalaire à l'aide des coordonnées",
|
|
14
|
-
levels: ['1, 0'],
|
|
15
|
-
section: 'Vecteurs',
|
|
16
|
-
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getScalarProductViaCoordsQuestion, nb),
|
|
17
|
-
};
|
|
18
|
-
function getScalarProductViaCoordsQuestion() {
|
|
19
|
-
const [coords1, coords2] = (0, randTupleInt_1.distinctRandTupleInt)(2, 2, { from: -9, to: 10 });
|
|
20
|
-
const u = new vector_1.Vector('u', new numberNode_1.NumberNode(coords1[0]), new numberNode_1.NumberNode(coords1[1]));
|
|
21
|
-
const v = new vector_1.Vector('v', new numberNode_1.NumberNode(coords2[0]), new numberNode_1.NumberNode(coords2[1]));
|
|
22
|
-
return {
|
|
23
|
-
instruction: `Soit $${u.toTexWithCoords()}$ et $${v.toTexWithCoords()}$. Calculer $${u.toTex()}\\cdot ${v.toTex()}$.`,
|
|
24
|
-
startStatement: `${u.toTex()}\\cdot ${v.toTex()}`,
|
|
25
|
-
answer: u.scalarProduct(v).toTex(),
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
exports.getScalarProductViaCoordsQuestion = getScalarProductViaCoordsQuestion;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getScalarProductViaCoordsQuestion = exports.scalarProductViaCoords = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const vector_1 = require("../../../math/geometry/vector");
|
|
6
|
+
const randTupleInt_1 = require("../../../math/utils/random/randTupleInt");
|
|
7
|
+
const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
|
|
8
|
+
exports.scalarProductViaCoords = {
|
|
9
|
+
id: 'scalarProductViaCoords',
|
|
10
|
+
connector: '=',
|
|
11
|
+
instruction: '',
|
|
12
|
+
isSingleStep: false,
|
|
13
|
+
label: "Calculer un produit scalaire à l'aide des coordonnées",
|
|
14
|
+
levels: ['1, 0'],
|
|
15
|
+
section: 'Vecteurs',
|
|
16
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getScalarProductViaCoordsQuestion, nb),
|
|
17
|
+
};
|
|
18
|
+
function getScalarProductViaCoordsQuestion() {
|
|
19
|
+
const [coords1, coords2] = (0, randTupleInt_1.distinctRandTupleInt)(2, 2, { from: -9, to: 10 });
|
|
20
|
+
const u = new vector_1.Vector('u', new numberNode_1.NumberNode(coords1[0]), new numberNode_1.NumberNode(coords1[1]));
|
|
21
|
+
const v = new vector_1.Vector('v', new numberNode_1.NumberNode(coords2[0]), new numberNode_1.NumberNode(coords2[1]));
|
|
22
|
+
return {
|
|
23
|
+
instruction: `Soit $${u.toTexWithCoords()}$ et $${v.toTexWithCoords()}$. Calculer $${u.toTex()}\\cdot ${v.toTex()}$.`,
|
|
24
|
+
startStatement: `${u.toTex()}\\cdot ${v.toTex()}`,
|
|
25
|
+
answer: u.scalarProduct(v).toTex(),
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
exports.getScalarProductViaCoordsQuestion = getScalarProductViaCoordsQuestion;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// import { Vector } from "../../../geometry/vector";
|
|
3
|
-
// import { distinctRandTupleInt } from "../../../mathutils/random/randTupleInt";
|
|
4
|
-
// import { NumberNode } from "../../../tree/nodes/numbers/numberNode";
|
|
5
|
-
// import { latexParser } from "../../../tree/parsers/latexParser";
|
|
6
|
-
// import { Exercise, Question } from "../../exercise";
|
|
7
|
-
// import { getDistinctQuestions } from "../../utils/getDistinctQuestions";
|
|
8
|
-
// export const scalarProductViaNorms : Exercise = {
|
|
9
|
-
// id: 'scalarProductViaNorms',
|
|
10
|
-
// connector: "=",
|
|
11
|
-
// instruction: "",
|
|
12
|
-
// isSingleStep: false,
|
|
13
|
-
// label: "Calculer un produit scalaire à l'aide des normes.",
|
|
14
|
-
// levels: ["1, 0"],
|
|
15
|
-
// section: "vectors",
|
|
16
|
-
// generator: (nb: number) => getDistinctQuestions(getScalarProductViaNormsQuestion, nb)
|
|
17
|
-
// }
|
|
18
|
-
// export function getScalarProductViaNormsQuestion(): Question {
|
|
19
|
-
// const [coords1, coords2] = distinctRandTupleInt(2, 2, {from: -9, to: 10})
|
|
20
|
-
// const u = new Vector("u", new NumberNode(coords1[0]), new NumberNode(coords1[1]))
|
|
21
|
-
// const v = new Vector("v", new NumberNode(coords2[0]), new NumberNode(coords2[1]))
|
|
22
|
-
// return {
|
|
23
|
-
// instruction: `Soit ${u.toTexWithCoords()} et ${v.toTexWithCoords()}. Calculer ${u.toTex()}\\cdot ${v.toTex()}.`,
|
|
24
|
-
// startStatement: `${u.toTex()}\\cdot ${v.toTex()}`,
|
|
25
|
-
// answer: latexParser(u.scalarProduct(v)),
|
|
26
|
-
// }
|
|
27
|
-
// }
|
|
1
|
+
"use strict";
|
|
2
|
+
// import { Vector } from "../../../geometry/vector";
|
|
3
|
+
// import { distinctRandTupleInt } from "../../../mathutils/random/randTupleInt";
|
|
4
|
+
// import { NumberNode } from "../../../tree/nodes/numbers/numberNode";
|
|
5
|
+
// import { latexParser } from "../../../tree/parsers/latexParser";
|
|
6
|
+
// import { Exercise, Question } from "../../exercise";
|
|
7
|
+
// import { getDistinctQuestions } from "../../utils/getDistinctQuestions";
|
|
8
|
+
// export const scalarProductViaNorms : Exercise = {
|
|
9
|
+
// id: 'scalarProductViaNorms',
|
|
10
|
+
// connector: "=",
|
|
11
|
+
// instruction: "",
|
|
12
|
+
// isSingleStep: false,
|
|
13
|
+
// label: "Calculer un produit scalaire à l'aide des normes.",
|
|
14
|
+
// levels: ["1, 0"],
|
|
15
|
+
// section: "vectors",
|
|
16
|
+
// generator: (nb: number) => getDistinctQuestions(getScalarProductViaNormsQuestion, nb)
|
|
17
|
+
// }
|
|
18
|
+
// export function getScalarProductViaNormsQuestion(): Question {
|
|
19
|
+
// const [coords1, coords2] = distinctRandTupleInt(2, 2, {from: -9, to: 10})
|
|
20
|
+
// const u = new Vector("u", new NumberNode(coords1[0]), new NumberNode(coords1[1]))
|
|
21
|
+
// const v = new Vector("v", new NumberNode(coords2[0]), new NumberNode(coords2[1]))
|
|
22
|
+
// return {
|
|
23
|
+
// instruction: `Soit ${u.toTexWithCoords()} et ${v.toTexWithCoords()}. Calculer ${u.toTex()}\\cdot ${v.toTex()}.`,
|
|
24
|
+
// startStatement: `${u.toTex()}\\cdot ${v.toTex()}`,
|
|
25
|
+
// answer: latexParser(u.scalarProduct(v)),
|
|
26
|
+
// }
|
|
27
|
+
// }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applyPercent.d.ts","sourceRoot":"","sources":["../../../src/exercises/percent/applyPercent.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGjD,eAAO,MAAM,YAAY,EAAE,QAS1B,CAAC;AAEF,wBAAgB,uBAAuB,IAAI,QAAQ,CA0BlD"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getApplyPercentQuestion = exports.applyPercent = void 0;
|
|
4
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
5
|
+
const round_1 = require("../../math/utils/round");
|
|
6
|
+
const coinFlip_1 = require("../../utils/coinFlip");
|
|
7
|
+
const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
|
|
8
|
+
exports.applyPercent = {
|
|
9
|
+
id: 'applyPercent',
|
|
10
|
+
connector: '=',
|
|
11
|
+
instruction: "",
|
|
12
|
+
label: "Appliquer un pourcentage d'augmentation ou de diminution.",
|
|
13
|
+
levels: ['4', '3', '2'],
|
|
14
|
+
section: 'Pourcentages',
|
|
15
|
+
isSingleStep: false,
|
|
16
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getApplyPercentQuestion, nb),
|
|
17
|
+
};
|
|
18
|
+
function getApplyPercentQuestion() {
|
|
19
|
+
const randNbr = (0, randint_1.randint)(1, 500);
|
|
20
|
+
const randPercent = (0, randint_1.randint)(1, 100);
|
|
21
|
+
const flip = (0, coinFlip_1.coinFlip)();
|
|
22
|
+
let instruction = "";
|
|
23
|
+
let answer = "";
|
|
24
|
+
let ans = 0;
|
|
25
|
+
if (flip) {
|
|
26
|
+
ans = randNbr * (1 + randPercent / 100);
|
|
27
|
+
ans = (0, round_1.round)(ans, 2);
|
|
28
|
+
instruction = `Appliquer une augmentation de $${randPercent}\\%$ à $${randNbr}$ :`;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
ans = randNbr * (1 - randPercent / 100);
|
|
32
|
+
ans = (0, round_1.round)(ans, 2);
|
|
33
|
+
instruction = `Appliquer une diminution de $${randPercent}\\%$ à $${randNbr}$ :`;
|
|
34
|
+
}
|
|
35
|
+
const question = {
|
|
36
|
+
instruction,
|
|
37
|
+
answer: ans.toString(),
|
|
38
|
+
};
|
|
39
|
+
return question;
|
|
40
|
+
}
|
|
41
|
+
exports.getApplyPercentQuestion = getApplyPercentQuestion;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"averageEvolutionRate.d.ts","sourceRoot":"","sources":["../../../src/exercises/percent/averageEvolutionRate.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGjD,eAAO,MAAM,oBAAoB,EAAE,QASlC,CAAC;AAEF,wBAAgB,uBAAuB,IAAI,QAAQ,CAelD"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAverageEvolutionRate = exports.averageEvolutionRate = void 0;
|
|
4
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
5
|
+
const round_1 = require("../../math/utils/round");
|
|
6
|
+
const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
|
|
7
|
+
exports.averageEvolutionRate = {
|
|
8
|
+
id: 'averageEvolutionRate',
|
|
9
|
+
connector: '=',
|
|
10
|
+
instruction: "",
|
|
11
|
+
label: "Calculer un taux d'évolution moyen",
|
|
12
|
+
levels: ['4', '3', '2'],
|
|
13
|
+
section: 'Pourcentages',
|
|
14
|
+
isSingleStep: false,
|
|
15
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getAverageEvolutionRate, nb),
|
|
16
|
+
};
|
|
17
|
+
function getAverageEvolutionRate() {
|
|
18
|
+
const rate = (0, randint_1.randint)(1, 100);
|
|
19
|
+
const nbMois = (0, randint_1.randint)(2, 13);
|
|
20
|
+
const instruction = `un prix augmente de $${rate}\\%$ en $${nbMois}$ mois. Quel est le taux d'évolution moyen par mois ?`;
|
|
21
|
+
const answer = `${(0, round_1.round)((Math.pow(1 + rate / 100, 1 / nbMois) - 1) * 100, 2)}\\%`;
|
|
22
|
+
const question = {
|
|
23
|
+
instruction,
|
|
24
|
+
answer,
|
|
25
|
+
};
|
|
26
|
+
return question;
|
|
27
|
+
}
|
|
28
|
+
exports.getAverageEvolutionRate = getAverageEvolutionRate;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globalPercent.d.ts","sourceRoot":"","sources":["../../../src/exercises/percent/globalPercent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGjD,eAAO,MAAM,aAAa,EAAE,QAS3B,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,CAmCnD"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getGlobalPercentQuestion = exports.globalPercent = void 0;
|
|
4
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
5
|
+
const mathjs_1 = require("mathjs");
|
|
6
|
+
const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
|
|
7
|
+
exports.globalPercent = {
|
|
8
|
+
id: 'globalPercent',
|
|
9
|
+
connector: '=',
|
|
10
|
+
instruction: "",
|
|
11
|
+
label: "Calculer un taux d'évolution global à partir de taux d'évolution successifs",
|
|
12
|
+
levels: ['4', '3', '2'],
|
|
13
|
+
section: 'Pourcentages',
|
|
14
|
+
isSingleStep: false,
|
|
15
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getGlobalPercentQuestion, nb),
|
|
16
|
+
};
|
|
17
|
+
function getGlobalPercentQuestion() {
|
|
18
|
+
const tab = ["hausse", "baisse"];
|
|
19
|
+
let ans = 1;
|
|
20
|
+
let instruction = "Le prix d'un article subit une ";
|
|
21
|
+
const indice = (0, randint_1.randint)(2, 4);
|
|
22
|
+
for (let i = 0; i < indice; i++) {
|
|
23
|
+
const randPercent = (0, randint_1.randint)(1, 50);
|
|
24
|
+
let a = (0, randint_1.randint)(0, 2);
|
|
25
|
+
instruction += `${tab[a]} de $${randPercent}\\%$`;
|
|
26
|
+
if (i + 1 < indice)
|
|
27
|
+
instruction += ', puis une ';
|
|
28
|
+
if (a == 0)
|
|
29
|
+
ans *= 1 + randPercent / 100;
|
|
30
|
+
else
|
|
31
|
+
ans *= 1 - randPercent / 100;
|
|
32
|
+
}
|
|
33
|
+
ans = (0, mathjs_1.round)((ans - 1) * 100, 2);
|
|
34
|
+
instruction += ". \nDéterminer le taux d'évolution global du prix de cet article.";
|
|
35
|
+
const answer = `${ans} \\%`;
|
|
36
|
+
//const startStatement = "Le prix de l'article a subi une hausse globale de";
|
|
37
|
+
const question = {
|
|
38
|
+
instruction,
|
|
39
|
+
//startStatement,
|
|
40
|
+
answer,
|
|
41
|
+
};
|
|
42
|
+
return question;
|
|
43
|
+
}
|
|
44
|
+
exports.getGlobalPercentQuestion = getGlobalPercentQuestion;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reciprocalPercentage.d.ts","sourceRoot":"","sources":["../../../src/exercises/percent/reciprocalPercentage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGjD,eAAO,MAAM,oBAAoB,EAAE,QASlC,CAAC;AAEF,wBAAgB,+BAA+B,IAAI,QAAQ,CAsB1D"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getReciprocalPercentageQuestion = exports.reciprocalPercentage = void 0;
|
|
4
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
5
|
+
const mathjs_1 = require("mathjs");
|
|
6
|
+
const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
|
|
7
|
+
exports.reciprocalPercentage = {
|
|
8
|
+
id: 'reciprocalPercentage',
|
|
9
|
+
connector: '=',
|
|
10
|
+
instruction: "",
|
|
11
|
+
label: "Calculer un taux d'évolution réciproque",
|
|
12
|
+
levels: ['4', '3', '2'],
|
|
13
|
+
section: 'Pourcentages',
|
|
14
|
+
isSingleStep: false,
|
|
15
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getReciprocalPercentageQuestion, nb),
|
|
16
|
+
};
|
|
17
|
+
function getReciprocalPercentageQuestion() {
|
|
18
|
+
const randPercent = (0, randint_1.randint)(1, 50);
|
|
19
|
+
const tab = ["hausse", "baisse"];
|
|
20
|
+
let ans = 0;
|
|
21
|
+
let a = (0, randint_1.randint)(0, 2);
|
|
22
|
+
let instruction = `Le prix d'un article subit une ${tab[a]} de $${randPercent}\\%$. Quelle évolution devra-t-il subir pour revenir à son prix initial ?`;
|
|
23
|
+
if (a == 1)
|
|
24
|
+
ans = (1 - 1 / (1 + randPercent / 100)) * 100;
|
|
25
|
+
else
|
|
26
|
+
ans = (1 - 1 / (1 - randPercent / 100)) * 100;
|
|
27
|
+
ans = (0, mathjs_1.round)(ans, 2);
|
|
28
|
+
const answer = `${ans} \\%`;
|
|
29
|
+
const question = {
|
|
30
|
+
instruction,
|
|
31
|
+
answer,
|
|
32
|
+
};
|
|
33
|
+
return question;
|
|
34
|
+
}
|
|
35
|
+
exports.getReciprocalPercentageQuestion = getReciprocalPercentageQuestion;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* a^b/a^c
|
|
3
|
-
*/
|
|
4
|
-
import { Exercise, Question } from '../exercise';
|
|
5
|
-
export declare const powersDivision: Exercise;
|
|
6
|
-
export declare const powersOfTenDivision: Exercise;
|
|
7
|
-
export declare function getPowersDivisionQuestion(useOnlyPowersOfTen?: boolean): Question;
|
|
1
|
+
/**
|
|
2
|
+
* a^b/a^c
|
|
3
|
+
*/
|
|
4
|
+
import { Exercise, Question } from '../exercise';
|
|
5
|
+
export declare const powersDivision: Exercise;
|
|
6
|
+
export declare const powersOfTenDivision: Exercise;
|
|
7
|
+
export declare function getPowersDivisionQuestion(useOnlyPowersOfTen?: boolean): Question;
|
|
8
8
|
//# sourceMappingURL=powersDivision.d.ts.map
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* a^b/a^c
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getPowersDivisionQuestion = exports.powersOfTenDivision = exports.powersDivision = void 0;
|
|
7
|
-
const power_1 = require("../../math/numbers/integer/power");
|
|
8
|
-
const randint_1 = require("../../math/utils/random/randint");
|
|
9
|
-
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
10
|
-
const fractionNode_1 = require("../../tree/nodes/operators/fractionNode");
|
|
11
|
-
const powerNode_1 = require("../../tree/nodes/operators/powerNode");
|
|
12
|
-
const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
|
|
13
|
-
exports.powersDivision = {
|
|
14
|
-
id: 'powersDivision',
|
|
15
|
-
connector: '=',
|
|
16
|
-
instruction: 'Calculer :',
|
|
17
|
-
label: 'Division de puissances',
|
|
18
|
-
levels: ['4', '3', '2', '1'],
|
|
19
|
-
section: 'Puissances',
|
|
20
|
-
isSingleStep: true,
|
|
21
|
-
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getPowersDivisionQuestion, nb),
|
|
22
|
-
};
|
|
23
|
-
exports.powersOfTenDivision = {
|
|
24
|
-
id: 'powersOfTenDivision',
|
|
25
|
-
connector: '=',
|
|
26
|
-
instruction: 'Calculer :',
|
|
27
|
-
label: 'Division de puissances de 10',
|
|
28
|
-
levels: ['4', '3', '2', '1'],
|
|
29
|
-
section: 'Puissances',
|
|
30
|
-
isSingleStep: true,
|
|
31
|
-
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(() => getPowersDivisionQuestion(true), nb),
|
|
32
|
-
};
|
|
33
|
-
function getPowersDivisionQuestion(useOnlyPowersOfTen = false) {
|
|
34
|
-
const a = useOnlyPowersOfTen ? 10 : (0, randint_1.randint)(-11, 11, [0]);
|
|
35
|
-
const [b, c] = [1, 2].map((el) => (0, randint_1.randint)(-11, 11));
|
|
36
|
-
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)));
|
|
37
|
-
const answerTree = new power_1.Power(a, b - c).simplify();
|
|
38
|
-
const question = {
|
|
39
|
-
startStatement: statement.toTex(),
|
|
40
|
-
answer: answerTree.toTex(),
|
|
41
|
-
};
|
|
42
|
-
return question;
|
|
43
|
-
}
|
|
44
|
-
exports.getPowersDivisionQuestion = getPowersDivisionQuestion;
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* a^b/a^c
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getPowersDivisionQuestion = exports.powersOfTenDivision = exports.powersDivision = void 0;
|
|
7
|
+
const power_1 = require("../../math/numbers/integer/power");
|
|
8
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
9
|
+
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
10
|
+
const fractionNode_1 = require("../../tree/nodes/operators/fractionNode");
|
|
11
|
+
const powerNode_1 = require("../../tree/nodes/operators/powerNode");
|
|
12
|
+
const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
|
|
13
|
+
exports.powersDivision = {
|
|
14
|
+
id: 'powersDivision',
|
|
15
|
+
connector: '=',
|
|
16
|
+
instruction: 'Calculer :',
|
|
17
|
+
label: 'Division de puissances',
|
|
18
|
+
levels: ['4', '3', '2', '1'],
|
|
19
|
+
section: 'Puissances',
|
|
20
|
+
isSingleStep: true,
|
|
21
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getPowersDivisionQuestion, nb),
|
|
22
|
+
};
|
|
23
|
+
exports.powersOfTenDivision = {
|
|
24
|
+
id: 'powersOfTenDivision',
|
|
25
|
+
connector: '=',
|
|
26
|
+
instruction: 'Calculer :',
|
|
27
|
+
label: 'Division de puissances de 10',
|
|
28
|
+
levels: ['4', '3', '2', '1'],
|
|
29
|
+
section: 'Puissances',
|
|
30
|
+
isSingleStep: true,
|
|
31
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(() => getPowersDivisionQuestion(true), nb),
|
|
32
|
+
};
|
|
33
|
+
function getPowersDivisionQuestion(useOnlyPowersOfTen = false) {
|
|
34
|
+
const a = useOnlyPowersOfTen ? 10 : (0, randint_1.randint)(-11, 11, [0]);
|
|
35
|
+
const [b, c] = [1, 2].map((el) => (0, randint_1.randint)(-11, 11));
|
|
36
|
+
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)));
|
|
37
|
+
const answerTree = new power_1.Power(a, b - c).simplify();
|
|
38
|
+
const question = {
|
|
39
|
+
startStatement: statement.toTex(),
|
|
40
|
+
answer: answerTree.toTex(),
|
|
41
|
+
};
|
|
42
|
+
return question;
|
|
43
|
+
}
|
|
44
|
+
exports.getPowersDivisionQuestion = getPowersDivisionQuestion;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 10^(-x) into 0,0...1
|
|
3
|
-
*/
|
|
4
|
-
import { Exercise, Question } from '../exercise';
|
|
5
|
-
export declare const powersOfTenToDecimal: Exercise;
|
|
6
|
-
export declare function getPowersOfTenDivisionQuestion(): Question;
|
|
1
|
+
/**
|
|
2
|
+
* 10^(-x) into 0,0...1
|
|
3
|
+
*/
|
|
4
|
+
import { Exercise, Question } from '../exercise';
|
|
5
|
+
export declare const powersOfTenToDecimal: Exercise;
|
|
6
|
+
export declare function getPowersOfTenDivisionQuestion(): Question;
|
|
7
7
|
//# sourceMappingURL=powersOfTenToDecimal.d.ts.map
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* 10^(-x) into 0,0...1
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getPowersOfTenDivisionQuestion = exports.powersOfTenToDecimal = void 0;
|
|
7
|
-
const power_1 = require("../../math/numbers/integer/power");
|
|
8
|
-
const randint_1 = require("../../math/utils/random/randint");
|
|
9
|
-
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
10
|
-
const powerNode_1 = require("../../tree/nodes/operators/powerNode");
|
|
11
|
-
const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
|
|
12
|
-
exports.powersOfTenToDecimal = {
|
|
13
|
-
id: 'powersOfTenToDecimal',
|
|
14
|
-
connector: '=',
|
|
15
|
-
instruction: "Donner l'écriture décimale de :",
|
|
16
|
-
label: "Ecriture décimale d'une puissance de 10",
|
|
17
|
-
levels: ['5', '4', '3', '2'],
|
|
18
|
-
section: 'Puissances',
|
|
19
|
-
isSingleStep: true,
|
|
20
|
-
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getPowersOfTenDivisionQuestion, nb),
|
|
21
|
-
};
|
|
22
|
-
function getPowersOfTenDivisionQuestion() {
|
|
23
|
-
const randPower = (0, randint_1.randint)(-6, 8);
|
|
24
|
-
const statement = new powerNode_1.PowerNode(new numberNode_1.NumberNode(10), new numberNode_1.NumberNode(randPower));
|
|
25
|
-
const answerTree = new power_1.Power(10, randPower).toDecimalWriting().toTree();
|
|
26
|
-
const question = {
|
|
27
|
-
startStatement: statement.toTex(),
|
|
28
|
-
answer: answerTree.toTex(),
|
|
29
|
-
};
|
|
30
|
-
return question;
|
|
31
|
-
}
|
|
32
|
-
exports.getPowersOfTenDivisionQuestion = getPowersOfTenDivisionQuestion;
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* 10^(-x) into 0,0...1
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getPowersOfTenDivisionQuestion = exports.powersOfTenToDecimal = void 0;
|
|
7
|
+
const power_1 = require("../../math/numbers/integer/power");
|
|
8
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
9
|
+
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
10
|
+
const powerNode_1 = require("../../tree/nodes/operators/powerNode");
|
|
11
|
+
const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
|
|
12
|
+
exports.powersOfTenToDecimal = {
|
|
13
|
+
id: 'powersOfTenToDecimal',
|
|
14
|
+
connector: '=',
|
|
15
|
+
instruction: "Donner l'écriture décimale de :",
|
|
16
|
+
label: "Ecriture décimale d'une puissance de 10",
|
|
17
|
+
levels: ['5', '4', '3', '2'],
|
|
18
|
+
section: 'Puissances',
|
|
19
|
+
isSingleStep: true,
|
|
20
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getPowersOfTenDivisionQuestion, nb),
|
|
21
|
+
};
|
|
22
|
+
function getPowersOfTenDivisionQuestion() {
|
|
23
|
+
const randPower = (0, randint_1.randint)(-6, 8);
|
|
24
|
+
const statement = new powerNode_1.PowerNode(new numberNode_1.NumberNode(10), new numberNode_1.NumberNode(randPower));
|
|
25
|
+
const answerTree = new power_1.Power(10, randPower).toDecimalWriting().toTree();
|
|
26
|
+
const question = {
|
|
27
|
+
startStatement: statement.toTex(),
|
|
28
|
+
answer: answerTree.toTex(),
|
|
29
|
+
};
|
|
30
|
+
return question;
|
|
31
|
+
}
|
|
32
|
+
exports.getPowersOfTenDivisionQuestion = getPowersOfTenDivisionQuestion;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* (a^b)^c
|
|
3
|
-
*/
|
|
4
|
-
import { Exercise, Question } from '../exercise';
|
|
5
|
-
export declare const powersOfTenPower: Exercise;
|
|
6
|
-
export declare const powersPower: Exercise;
|
|
7
|
-
export declare function getPowersPowerQuestion(useOnlyPowersOfTen?: boolean): Question;
|
|
1
|
+
/**
|
|
2
|
+
* (a^b)^c
|
|
3
|
+
*/
|
|
4
|
+
import { Exercise, Question } from '../exercise';
|
|
5
|
+
export declare const powersOfTenPower: Exercise;
|
|
6
|
+
export declare const powersPower: Exercise;
|
|
7
|
+
export declare function getPowersPowerQuestion(useOnlyPowersOfTen?: boolean): Question;
|
|
8
8
|
//# sourceMappingURL=powersPower.d.ts.map
|