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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { KeyId } from "../types/keyIds";
|
|
2
|
+
import { KeyProps } from "../types/keyProps";
|
|
2
3
|
export declare const addValidProp: (props: Proposition[], statement: string, format?: "tex" | "raw") => void;
|
|
3
4
|
export declare const addWrongProp: (props: Proposition[], statement: string, format?: "tex" | "raw") => void;
|
|
4
5
|
export declare const tryToAddWrongProp: (props: Proposition[], statement: string, format?: "tex" | "raw") => void;
|
|
@@ -18,7 +19,7 @@ export interface Question<TIdentifiers = {}> {
|
|
|
18
19
|
answer?: string;
|
|
19
20
|
answerFormat?: "tex" | "raw";
|
|
20
21
|
ggbAnswer?: string[];
|
|
21
|
-
keys?: KeyId[];
|
|
22
|
+
keys?: (KeyId | KeyProps)[];
|
|
22
23
|
commands?: string[];
|
|
23
24
|
coords?: number[];
|
|
24
25
|
options?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIhD,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,iBAAiB,UACrB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAUtB,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,WAAW,EAAE,KAAK,MAAM,kBAE3D,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAElC,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC;CACvB,CAAC;AACF,MAAM,WAAW,QAAQ,CAAC,YAAY,GAAG,EAAE;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,KAAK,GA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B,eAAe,GACf,gBAAgB,GAChB,UAAU,CAAC;AAEf,MAAM,MAAM,SAAS,GACjB,mBAAmB,GACnB,sBAAsB,GACtB,QAAQ,GACR,kBAAkB,GAClB,WAAW,GACX,SAAS,GACT,cAAc,GACd,+CAA+C,GAC/C,OAAO,GACP,KAAK,GACL,wBAAwB,GACxB,SAAS,GACT,KAAK,GACL,aAAa,GACb,4BAA4B,GAC5B,oBAAoB,GACpB,WAAW,GACX,iBAAiB,GACjB,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commonDivisorsList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/commonDivisorsList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"commonDivisorsList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/commonDivisorsList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA2EF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAcpD,CAAC"}
|
|
@@ -17,12 +17,25 @@ const getCommonDivisorsListQuestion = () => {
|
|
|
17
17
|
const res = [];
|
|
18
18
|
divisorsA.forEach((n) => divisorsB.includes(n) && res.push(n));
|
|
19
19
|
res.sort((a, b) => a - b);
|
|
20
|
-
const answer = res.join("
|
|
20
|
+
const answer = res.join(";");
|
|
21
21
|
const question = {
|
|
22
22
|
answer,
|
|
23
|
-
instruction: `Donner la liste des diviseurs communs à $${a}$ et $${b}$ (séparer les valeurs par des virgules).`,
|
|
24
|
-
keys: [],
|
|
23
|
+
instruction: `Donner la liste des diviseurs communs à $${a}$ et $${b}$ (séparer les valeurs par des point-virgules).`,
|
|
24
|
+
keys: ["semicolon"],
|
|
25
25
|
answerFormat: "tex",
|
|
26
|
+
hint: `Détermine la liste des diviseurs de chaque nombre, puis identifie ceux qu'ils ont en commun.`,
|
|
27
|
+
correction: `Les diviseurs de $${a}$ sont :
|
|
28
|
+
|
|
29
|
+
$${divisorsA.join(";")}$
|
|
30
|
+
|
|
31
|
+
Les diviseurs de $${b}$ sont :
|
|
32
|
+
|
|
33
|
+
$${divisorsB.join(";")}$
|
|
34
|
+
|
|
35
|
+
Les diviseurs communs à $${a}$ et $${b}$ sont donc :
|
|
36
|
+
|
|
37
|
+
$${answer}$
|
|
38
|
+
`,
|
|
26
39
|
identifiers: { a, b },
|
|
27
40
|
};
|
|
28
41
|
return question;
|
|
@@ -30,7 +43,7 @@ const getCommonDivisorsListQuestion = () => {
|
|
|
30
43
|
const getPropositions = (n, { answer, a, b }) => {
|
|
31
44
|
const propositions = [];
|
|
32
45
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
33
|
-
const values = answer.split("
|
|
46
|
+
const values = answer.split(";").map((v) => Number(v));
|
|
34
47
|
const max = Math.max(a, b);
|
|
35
48
|
while (propositions.length < n) {
|
|
36
49
|
const newValue = (0, doWhile_1.doWhile)(() => (0, randint_1.randint)(2, max), (x) => values.includes(max));
|
|
@@ -39,16 +52,19 @@ const getPropositions = (n, { answer, a, b }) => {
|
|
|
39
52
|
willRemove
|
|
40
53
|
? copy.splice((0, randint_1.randint)(0, values.length), 1)
|
|
41
54
|
: copy.splice(0, 0, newValue);
|
|
42
|
-
(0, exercise_1.tryToAddWrongProp)(propositions, willRemove ? copy.join("
|
|
55
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, willRemove ? copy.join(";") : copy.sort((a, b) => a - b).join(";"));
|
|
43
56
|
}
|
|
44
57
|
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
45
58
|
};
|
|
46
59
|
const isAnswerValid = (ans, { answer }) => {
|
|
47
|
-
let values = ans
|
|
60
|
+
let values = ans
|
|
61
|
+
.replaceAll(",", ";")
|
|
62
|
+
.split(";")
|
|
63
|
+
.map((v) => Number(v));
|
|
48
64
|
if (values.some((v) => isNaN(v)))
|
|
49
65
|
return false;
|
|
50
66
|
values.sort((a, b) => a - b);
|
|
51
|
-
return values.join("
|
|
67
|
+
return values.join(";") === answer;
|
|
52
68
|
};
|
|
53
69
|
exports.commonDivisorsList = {
|
|
54
70
|
id: "commonDivisorsList",
|
|
@@ -62,4 +78,5 @@ exports.commonDivisorsList = {
|
|
|
62
78
|
getPropositions,
|
|
63
79
|
isAnswerValid,
|
|
64
80
|
subject: "Mathématiques",
|
|
81
|
+
hasHintAndCorrection: true,
|
|
65
82
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/decimals/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./multiplyDecimalByTens"), exports);
|
|
18
|
+
__exportStar(require("./multiplyDecimalByNegativeTens"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
dec: number;
|
|
4
|
+
pow: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const multiplyDecimalByNegativeTens: Exercise<Identifiers>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=multiplyDecimalByNegativeTens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multiplyDecimalByNegativeTens.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/decimals/multiplyDecimalByNegativeTens.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAgDF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAc/D,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.multiplyDecimalByNegativeTens = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const decimal_1 = require("../../../../math/numbers/decimals/decimal");
|
|
7
|
+
const randint_1 = require("../../../../math/utils/random/randint");
|
|
8
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
9
|
+
const getMultiplyDecimalByNegativeTensQuestion = () => {
|
|
10
|
+
const dec = decimal_1.DecimalConstructor.random(-200, 200, (0, randint_1.randint)(1, 5));
|
|
11
|
+
const pow = -(0, randint_1.randint)(1, 4);
|
|
12
|
+
const factor = Math.pow(10, pow);
|
|
13
|
+
const answer = dec.multiplyByPowerOfTen(pow).toTree().toTex();
|
|
14
|
+
const statement = new multiplyNode_1.MultiplyNode(dec.toTree(), factor.toTree());
|
|
15
|
+
const question = {
|
|
16
|
+
answer,
|
|
17
|
+
instruction: `Calculer : $${statement.toTex()}$`,
|
|
18
|
+
keys: [],
|
|
19
|
+
answerFormat: "tex",
|
|
20
|
+
identifiers: { dec: dec.value, pow },
|
|
21
|
+
};
|
|
22
|
+
return question;
|
|
23
|
+
};
|
|
24
|
+
const getPropositions = (n, { answer, dec, pow }) => {
|
|
25
|
+
const propositions = [];
|
|
26
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
27
|
+
const decimal = new decimal_1.Decimal(dec);
|
|
28
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, decimal.multiplyByPowerOfTen(-pow).toTree().toTex());
|
|
29
|
+
while (propositions.length < n) {
|
|
30
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, decimal
|
|
31
|
+
.multiplyByPowerOfTen((0, randint_1.randint)(-5, 5, [pow, -pow]))
|
|
32
|
+
.toTree()
|
|
33
|
+
.toTex());
|
|
34
|
+
}
|
|
35
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
36
|
+
};
|
|
37
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
38
|
+
return ans === answer;
|
|
39
|
+
};
|
|
40
|
+
exports.multiplyDecimalByNegativeTens = {
|
|
41
|
+
id: "multiplyDecimalByNegativeTens",
|
|
42
|
+
connector: "=",
|
|
43
|
+
label: "Multiplier un décimal par $0,1$, par $0,01$ ou par $0,001$",
|
|
44
|
+
levels: [],
|
|
45
|
+
isSingleStep: true,
|
|
46
|
+
sections: [],
|
|
47
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getMultiplyDecimalByNegativeTensQuestion, nb),
|
|
48
|
+
qcmTimer: 60,
|
|
49
|
+
freeTimer: 60,
|
|
50
|
+
getPropositions,
|
|
51
|
+
isAnswerValid,
|
|
52
|
+
subject: "Mathématiques",
|
|
53
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
dec: number;
|
|
4
|
+
pow: number;
|
|
5
|
+
isDivide: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const multiplyDecimalByTens: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=multiplyDecimalByTens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multiplyDecimalByTens.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/decimals/multiplyDecimalByTens.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAsDF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAcvD,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.multiplyDecimalByTens = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const decimal_1 = require("../../../../math/numbers/decimals/decimal");
|
|
7
|
+
const randint_1 = require("../../../../math/utils/random/randint");
|
|
8
|
+
const divideNode_1 = require("../../../../tree/nodes/operators/divideNode");
|
|
9
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
10
|
+
const coinFlip_1 = require("../../../../utils/coinFlip");
|
|
11
|
+
const getMultiplyDecimalByTensQuestion = () => {
|
|
12
|
+
const dec = decimal_1.DecimalConstructor.random(-200, 200, (0, randint_1.randint)(1, 5));
|
|
13
|
+
const pow = (0, randint_1.randint)(1, 4);
|
|
14
|
+
const factor = Math.pow(10, pow);
|
|
15
|
+
const isDivide = (0, coinFlip_1.coinFlip)();
|
|
16
|
+
const answer = dec
|
|
17
|
+
.multiplyByPowerOfTen(isDivide ? -pow : pow)
|
|
18
|
+
.toTree()
|
|
19
|
+
.toTex();
|
|
20
|
+
const statement = new (isDivide ? divideNode_1.DivideNode : multiplyNode_1.MultiplyNode)(dec.toTree(), factor.toTree());
|
|
21
|
+
const question = {
|
|
22
|
+
answer,
|
|
23
|
+
instruction: `Calculer : $${statement.toTex()}$`,
|
|
24
|
+
keys: [],
|
|
25
|
+
answerFormat: "tex",
|
|
26
|
+
identifiers: { dec: dec.value, pow, isDivide },
|
|
27
|
+
};
|
|
28
|
+
return question;
|
|
29
|
+
};
|
|
30
|
+
const getPropositions = (n, { answer, dec, isDivide, pow }) => {
|
|
31
|
+
const propositions = [];
|
|
32
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
33
|
+
const decimal = new decimal_1.Decimal(dec);
|
|
34
|
+
const opposite = decimal
|
|
35
|
+
.multiplyByPowerOfTen(isDivide ? pow : -pow)
|
|
36
|
+
.toTree()
|
|
37
|
+
.toTex();
|
|
38
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, opposite);
|
|
39
|
+
while (propositions.length < n) {
|
|
40
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, decimal
|
|
41
|
+
.multiplyByPowerOfTen((0, randint_1.randint)(-5, 5, [pow, -pow]))
|
|
42
|
+
.toTree()
|
|
43
|
+
.toTex());
|
|
44
|
+
}
|
|
45
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
46
|
+
};
|
|
47
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
48
|
+
return ans === answer;
|
|
49
|
+
};
|
|
50
|
+
exports.multiplyDecimalByTens = {
|
|
51
|
+
id: "multiplyDecimalByTens",
|
|
52
|
+
connector: "=",
|
|
53
|
+
label: "Multiplier/diviser un décimal par une puissance de 10",
|
|
54
|
+
levels: [],
|
|
55
|
+
isSingleStep: true,
|
|
56
|
+
sections: [],
|
|
57
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getMultiplyDecimalByTensQuestion, nb),
|
|
58
|
+
qcmTimer: 60,
|
|
59
|
+
freeTimer: 60,
|
|
60
|
+
getPropositions,
|
|
61
|
+
isAnswerValid,
|
|
62
|
+
subject: "Mathématiques",
|
|
63
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fractionsSumsSameDenominators.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsSumsSameDenominators.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"fractionsSumsSameDenominators.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsSumsSameDenominators.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAclC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAiGF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAe/D,CAAC"}
|
|
@@ -4,8 +4,13 @@ exports.fractionsSumsSameDenominators = void 0;
|
|
|
4
4
|
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const rational_1 = require("../../../../math/numbers/rationals/rational");
|
|
7
|
+
const primeFactors_1 = require("../../../../math/utils/arithmetic/primeFactors");
|
|
7
8
|
const randint_1 = require("../../../../math/utils/random/randint");
|
|
8
9
|
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
10
|
+
const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
|
|
11
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
12
|
+
const operatorComposition_1 = require("../../../../tree/utilities/operatorComposition");
|
|
13
|
+
const alignTex_1 = require("../../../../utils/alignTex");
|
|
9
14
|
const getFractionsSumsSameDenominatorsQuestion = () => {
|
|
10
15
|
const denom = (0, randint_1.randint)(2, 15);
|
|
11
16
|
const num1 = (0, randint_1.randint)(1, denom + 10);
|
|
@@ -13,11 +18,37 @@ const getFractionsSumsSameDenominatorsQuestion = () => {
|
|
|
13
18
|
const ratio1 = new rational_1.Rational(num1, denom).toTree();
|
|
14
19
|
const ratio2 = new rational_1.Rational(num2, denom).toTree();
|
|
15
20
|
const statement = new addNode_1.AddNode(ratio1, ratio2).toTex();
|
|
16
|
-
const
|
|
21
|
+
const answerRatio = new rational_1.Rational(num1 + num2, denom);
|
|
22
|
+
const answer = answerRatio.simplify().toTree().toTex();
|
|
17
23
|
const question = {
|
|
18
24
|
answer,
|
|
19
25
|
instruction: `Calculer et donner le résultat sous forme d'une fraction irréductible : $${statement}$`,
|
|
20
26
|
keys: [],
|
|
27
|
+
hint: `Pour additionner deux fractions qui ont le même dénominateur, on peut additionner leurs numerateurs.`,
|
|
28
|
+
correction: `Les deux fractions ont bien le même dénominateur donc on additionne leurs numérateurs :
|
|
29
|
+
|
|
30
|
+
${(0, alignTex_1.alignTex)([
|
|
31
|
+
[
|
|
32
|
+
statement,
|
|
33
|
+
"=",
|
|
34
|
+
new fractionNode_1.FractionNode(new addNode_1.AddNode(num1.toTree(), num2.toTree()), denom.toTree()).toTex(),
|
|
35
|
+
],
|
|
36
|
+
["", "=", answerRatio.toTree().toTex()],
|
|
37
|
+
])}
|
|
38
|
+
|
|
39
|
+
${answerRatio.isSimplified && answerRatio.denum !== 1
|
|
40
|
+
? "Cette fraction est bien irréductible."
|
|
41
|
+
: `Puis on simplifie la fraction :
|
|
42
|
+
|
|
43
|
+
${(0, alignTex_1.alignTex)([
|
|
44
|
+
[
|
|
45
|
+
answerRatio.toTree().toTex(),
|
|
46
|
+
"=",
|
|
47
|
+
new fractionNode_1.FractionNode((0, operatorComposition_1.operatorComposition)(multiplyNode_1.MultiplyNode, (0, primeFactors_1.primeFactors)(num1 + num2).map((e) => e.toTree())), (0, operatorComposition_1.operatorComposition)(multiplyNode_1.MultiplyNode, (0, primeFactors_1.primeFactors)(denom).map((e) => e.toTree()))).toTex(),
|
|
48
|
+
],
|
|
49
|
+
["", "=", answer],
|
|
50
|
+
])}`}
|
|
51
|
+
`,
|
|
21
52
|
answerFormat: "tex",
|
|
22
53
|
identifiers: { denom, num1, num2 },
|
|
23
54
|
};
|
|
@@ -54,4 +85,5 @@ exports.fractionsSumsSameDenominators = {
|
|
|
54
85
|
getPropositions,
|
|
55
86
|
isAnswerValid,
|
|
56
87
|
subject: "Mathématiques",
|
|
88
|
+
hasHintAndCorrection: true,
|
|
57
89
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
|
|
@@ -26,3 +26,5 @@ __exportStar(require("./digitRank"), exports);
|
|
|
26
26
|
__exportStar(require("./digitDecimalRank"), exports);
|
|
27
27
|
__exportStar(require("./digitRankNumber"), exports);
|
|
28
28
|
__exportStar(require("./digitDecimalRankNumber"), exports);
|
|
29
|
+
__exportStar(require("./ordering"), exports);
|
|
30
|
+
__exportStar(require("./decimals"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expressionNature.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/operations/expressionNature.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"expressionNature.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/operations/expressionNature.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAalC,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,GAAG,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAoLnE,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC"}
|