math-exercises 3.0.151 → 3.0.153
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 +7 -0
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.d.ts +5 -1
- package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.js +92 -38
- package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.js +5 -1
- package/lib/exercises/math/calcul/proportionality/isTableProportional.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/isTableProportional.js +7 -1
- package/lib/exercises/math/calcul/proportionality/isTableProportionalNonInteger.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/isTableProportionalNonInteger.js +5 -1
- package/lib/exercises/math/calcul/proportionality/proportionalityTable.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/proportionalityTable.js +5 -1
- package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.js +8 -2
- package/lib/exercises/math/calculLitteral/equation/index.d.ts +1 -1
- package/lib/exercises/math/calculLitteral/equation/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/index.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/square/equationSimpleSquare.d.ts +10 -0
- package/lib/exercises/math/calculLitteral/equation/square/equationSimpleSquare.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/square/equationSimpleSquare.js +183 -0
- package/lib/exercises/math/calculLitteral/equation/square/equationSquareWithSteps.d.ts +10 -0
- package/lib/exercises/math/calculLitteral/equation/square/equationSquareWithSteps.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/square/equationSquareWithSteps.js +173 -0
- package/lib/exercises/math/calculLitteral/equation/square/index.d.ts +3 -0
- package/lib/exercises/math/calculLitteral/equation/square/index.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/square/index.js +2 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramIsSameData.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/histogram/histogramIsSameData.js +7 -0
- package/lib/exercises/math/dataRepresentations/tableReading.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/tableReading.js +7 -0
- package/lib/exercises/math/functions/affines/affineAdjustment.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineAdjustment.js +7 -1
- package/lib/exercises/math/functions/affines/affineAdjustmentComplete.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineAdjustmentComplete.js +7 -1
- package/lib/exercises/math/functions/affines/affineAdjustmentRsquared.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineAdjustmentRsquared.js +7 -1
- package/lib/exercises/math/functions/basics/inverseImageFunctionTable.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/inverseImageFunctionTable.js +7 -1
- package/lib/exercises/math/functions/basics/placePointsFromValueTable.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/placePointsFromValueTable.js +7 -0
- package/lib/exercises/math/functions/sqrt/squareRootCalculation.d.ts.map +1 -1
- package/lib/exercises/math/functions/sqrt/squareRootCalculation.js +4 -2
- package/lib/exercises/math/geometry/euclidian/homothetyFactorFromPoints.d.ts +15 -0
- package/lib/exercises/math/geometry/euclidian/homothetyFactorFromPoints.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidian/homothetyFactorFromPoints.js +301 -0
- package/lib/exercises/math/geometry/euclidian/index.d.ts +7 -0
- package/lib/exercises/math/geometry/euclidian/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidian/index.js +7 -0
- package/lib/exercises/math/geometry/euclidian/pinPointFromAxialOrCentralSymmetry.d.ts +21 -0
- package/lib/exercises/math/geometry/euclidian/pinPointFromAxialOrCentralSymmetry.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidian/pinPointFromAxialOrCentralSymmetry.js +406 -0
- package/lib/exercises/math/geometry/euclidian/pinPointFromRotation.d.ts +18 -0
- package/lib/exercises/math/geometry/euclidian/pinPointFromRotation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidian/pinPointFromRotation.js +315 -0
- package/lib/exercises/math/geometry/euclidian/pinPointFromTranslation.d.ts +20 -0
- package/lib/exercises/math/geometry/euclidian/pinPointFromTranslation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidian/pinPointFromTranslation.js +314 -0
- package/lib/exercises/math/geometry/euclidian/pinSegmentFromRotation.d.ts +18 -0
- package/lib/exercises/math/geometry/euclidian/pinSegmentFromRotation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidian/pinSegmentFromRotation.js +387 -0
- package/lib/exercises/math/geometry/euclidian/recognizeAngleFromRotation.d.ts +18 -0
- package/lib/exercises/math/geometry/euclidian/recognizeAngleFromRotation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidian/recognizeAngleFromRotation.js +309 -0
- package/lib/exercises/math/geometry/euclidian/recognizeHomothetyCenter.d.ts +17 -0
- package/lib/exercises/math/geometry/euclidian/recognizeHomothetyCenter.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidian/recognizeHomothetyCenter.js +301 -0
- package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromAxialSymetry.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromAxialSymetry.js +22 -8
- package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromCentralSymmetry.d.ts +11 -0
- package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromCentralSymmetry.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromCentralSymmetry.js +169 -0
- package/lib/exercises/math/geometry/euclidianConstructions/index.d.ts +2 -0
- package/lib/exercises/math/geometry/euclidianConstructions/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidianConstructions/index.js +2 -0
- package/lib/exercises/math/geometry/euclidianConstructions/placeHomothetyCenter.d.ts +16 -0
- package/lib/exercises/math/geometry/euclidianConstructions/placeHomothetyCenter.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidianConstructions/placeHomothetyCenter.js +309 -0
- package/lib/exercises/math/probaStat/basicProbas/calculateProbaFromProbaLaw.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/basicProbas/calculateProbaFromProbaLaw.js +7 -0
- package/lib/exercises/math/probaStat/basicProbas/getMissingProbabilityValue.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/basicProbas/getMissingProbabilityValue.js +7 -0
- package/lib/exercises/math/probaStat/basicProbas/getMissingProbabilityValueMiddleSchool.d.ts +9 -0
- package/lib/exercises/math/probaStat/basicProbas/getMissingProbabilityValueMiddleSchool.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicProbas/getMissingProbabilityValueMiddleSchool.js +120 -0
- package/lib/exercises/math/probaStat/basicProbas/index.d.ts +2 -0
- package/lib/exercises/math/probaStat/basicProbas/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/basicProbas/index.js +2 -0
- package/lib/exercises/math/probaStat/basicProbas/pickEquiprobableTo.d.ts +12 -0
- package/lib/exercises/math/probaStat/basicProbas/pickEquiprobableTo.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicProbas/pickEquiprobableTo.js +374 -0
- package/lib/exercises/math/probaStat/probaFromTableNoContext.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/probaFromTableNoContext.js +7 -0
- package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/probaFromTableWithContext.js +7 -0
- package/lib/exercises/math/probaStat/stats1var/averageWithClasses.d.ts +9 -0
- package/lib/exercises/math/probaStat/stats1var/averageWithClasses.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/stats1var/averageWithClasses.js +140 -0
- package/lib/exercises/math/probaStat/stats1var/averageWithTable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/averageWithTable.js +7 -1
- package/lib/exercises/math/probaStat/stats1var/averageWithTableWithContext.d.ts +8 -0
- package/lib/exercises/math/probaStat/stats1var/averageWithTableWithContext.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/stats1var/averageWithTableWithContext.js +113 -0
- package/lib/exercises/math/probaStat/stats1var/calculateMeanFromFrequencies.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/calculateMeanFromFrequencies.js +7 -0
- package/lib/exercises/math/probaStat/stats1var/cumulativeSum.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/cumulativeSum.js +7 -0
- package/lib/exercises/math/probaStat/stats1var/etendueTable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/etendueTable.js +7 -1
- package/lib/exercises/math/probaStat/stats1var/getQuartileProportionQuestion.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/getQuartileProportionQuestion.js +7 -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/interquartilesTable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/interquartilesTable.js +5 -1
- package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +7 -0
- package/lib/exercises/math/probaStat/stats1var/medianWithList.d.ts +2 -0
- package/lib/exercises/math/probaStat/stats1var/medianWithList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/medianWithList.js +67 -14
- package/lib/exercises/math/probaStat/stats1var/medianWithTable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/medianWithTable.js +7 -1
- package/lib/exercises/math/probaStat/stats1var/quartiles.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/quartiles.js +7 -1
- package/lib/exercises/math/probaStat/stats1var/standardDeviationTable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/standardDeviationTable.js +5 -1
- package/lib/exercises/math/probaStat/stats1var/varianceTable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/varianceTable.js +5 -1
- package/lib/exercises/math/probaStat/stats2var/averagePoint.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats2var/averagePoint.js +7 -1
- package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.d.ts +7 -0
- package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.js +171 -0
- package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceProbas.d.ts +7 -0
- package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceProbas.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceProbas.js +155 -0
- package/lib/exercises/math/probaStat/twoStepExperiments/index.d.ts +3 -0
- package/lib/exercises/math/probaStat/twoStepExperiments/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/twoStepExperiments/index.js +3 -0
- package/lib/exercises/math/probaStat/twoStepExperiments/numberPoolTwiceProbas.d.ts +7 -0
- package/lib/exercises/math/probaStat/twoStepExperiments/numberPoolTwiceProbas.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/twoStepExperiments/numberPoolTwiceProbas.js +189 -0
- package/lib/exercises/math/scratch/index.d.ts +3 -0
- package/lib/exercises/math/scratch/index.d.ts.map +1 -1
- package/lib/exercises/math/scratch/index.js +3 -0
- package/lib/exercises/math/scratch/scratchListElemAtIndex.d.ts +13 -0
- package/lib/exercises/math/scratch/scratchListElemAtIndex.d.ts.map +1 -0
- package/lib/exercises/math/scratch/scratchListElemAtIndex.js +189 -0
- package/lib/exercises/math/scratch/scratchListElemAtIndex2.d.ts +23 -0
- package/lib/exercises/math/scratch/scratchListElemAtIndex2.d.ts.map +1 -0
- package/lib/exercises/math/scratch/scratchListElemAtIndex2.js +207 -0
- package/lib/exercises/math/scratch/scratchListFilter.d.ts +13 -0
- package/lib/exercises/math/scratch/scratchListFilter.d.ts.map +1 -0
- package/lib/exercises/math/scratch/scratchListFilter.js +397 -0
- package/lib/exercises/math/spaceGeometry/basis/findSpacePointOnRectangularPrism.d.ts +14 -0
- package/lib/exercises/math/spaceGeometry/basis/findSpacePointOnRectangularPrism.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/basis/findSpacePointOnRectangularPrism.js +347 -0
- package/lib/exercises/math/spaceGeometry/basis/index.d.ts +1 -0
- package/lib/exercises/math/spaceGeometry/basis/index.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/basis/index.js +1 -0
- package/lib/exercises/math/spaceGeometry/index.d.ts +2 -0
- package/lib/exercises/math/spaceGeometry/index.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/index.js +2 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfConeSection.js +3 -3
- package/lib/exercises/math/spaceGeometry/solids/index.d.ts +3 -0
- package/lib/exercises/math/spaceGeometry/solids/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/solids/index.js +2 -0
- package/lib/exercises/math/spaceGeometry/solids/recognizeSolidFrom3D.d.ts +15 -0
- package/lib/exercises/math/spaceGeometry/solids/recognizeSolidFrom3D.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/solids/recognizeSolidFrom3D.js +440 -0
- package/lib/exercises/math/spaceGeometry/solids/recognizeSolidFromSolidPattern.d.ts +11 -0
- package/lib/exercises/math/spaceGeometry/solids/recognizeSolidFromSolidPattern.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/solids/recognizeSolidFromSolidPattern.js +1089 -0
- package/lib/exercises/math/spaceGeometry/sphere/index.d.ts +3 -0
- package/lib/exercises/math/spaceGeometry/sphere/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sphere/index.js +2 -0
- package/lib/exercises/math/spaceGeometry/sphere/pickIsPointInSphereOrBall.d.ts +9 -0
- package/lib/exercises/math/spaceGeometry/sphere/pickIsPointInSphereOrBall.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sphere/pickIsPointInSphereOrBall.js +127 -0
- package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.d.ts +14 -0
- package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.js +390 -0
- package/lib/geogebra/geogebraConstructor.d.ts +2 -0
- package/lib/geogebra/geogebraConstructor.d.ts.map +1 -1
- package/lib/geogebra/geogebraConstructor.js +6 -0
- package/lib/index.d.ts +198 -6
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/point.d.ts +6 -0
- package/lib/math/geometry/point.d.ts.map +1 -1
- package/lib/math/geometry/point.js +28 -0
- package/lib/tree/nodes/equations/equalNode.d.ts +1 -1
- package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equalNode.js +0 -1
- package/lib/tree/utilities/nodeSimplifier.d.ts +1 -1
- package/lib/utils/arrays/arrayZip.d.ts +2 -0
- package/lib/utils/arrays/arrayZip.d.ts.map +1 -0
- package/lib/utils/arrays/arrayZip.js +12 -0
- package/package.json +1 -1
|
@@ -65,6 +65,8 @@ export type GeogebraOptions = {
|
|
|
65
65
|
commands?: string[];
|
|
66
66
|
coords: number[];
|
|
67
67
|
is3D?: boolean;
|
|
68
|
+
projection?: number;
|
|
69
|
+
projectionParam?: number;
|
|
68
70
|
gridDistance?: [number, number] | false;
|
|
69
71
|
hideGrid?: boolean;
|
|
70
72
|
hideAxes?: boolean;
|
|
@@ -100,6 +102,11 @@ export interface Question<TIdentifiers, TOptions = Record<string, string | strin
|
|
|
100
102
|
correctionGgbOptions?: GeogebraOptions;
|
|
101
103
|
style?: {
|
|
102
104
|
tableHasNoHeader?: boolean;
|
|
105
|
+
tableOptions?: {
|
|
106
|
+
firstColumnIsHeader: boolean;
|
|
107
|
+
firstRowIsHeader: boolean;
|
|
108
|
+
firstCellIsDivided: boolean;
|
|
109
|
+
};
|
|
103
110
|
};
|
|
104
111
|
divisionFormat?: "fraction" | "obelus";
|
|
105
112
|
identifiers: TIdentifiers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAInD,eAAO,MAAM,SAAS,GACpB,cAAc,WAAW,EAAE,EAC3B,GAAG,MAAM,EACT,SAAS,MAAM,IAAI,SAQpB,CAAC;AACF,eAAO,MAAM,YAAY,GACvB,OAAO,WAAW,EAAE,EACpB,WAAW,MAAM,EACjB,SAAQ,KAAK,GAAG,KAAa,SAQ9B,CAAC;AACF,eAAO,MAAM,YAAY,GACvB,OAAO,WAAW,EAAE,EACpB,WAAW,MAAM,EACjB,SAAQ,KAAK,GAAG,KAAa,SAQ9B,CAAC;AACF,eAAO,MAAM,iBAAiB,GAC5B,OAAO,WAAW,EAAE,EACpB,WAAW,MAAM,EACjB,SAAQ,KAAK,GAAG,KAAa,SAU9B,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,OAAO,WAAW,EAAE,EACpB,GAAG,MAAM,EACT,oBAAoB,MAAM,kBAQ3B,CAAC;AAEF,oBAAY,qBAAqB;IAC/B,UAAU,eAAe;IACzB,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,WAAW,gBAAgB;IAC3B,IAAI,SAAS;IACb,UAAU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Q,CAAC,CAAC;IAC9D,OAAO,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAC1C,aAAa,CAAC,EAAE,aAAa,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAC1C,SAAS,CAAC,EAAE,SAAS,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAC9C,cAAc,CAAC,EAAE,cAAc,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAExD,YAAY,CAAC,EAAE,YAAY,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IACpD,aAAa,CAAC,EAAE,aAAa,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IACtD,oBAAoB,CAAC,EAAE,oBAAoB,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IACpE,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAChE,0BAA0B,EAAE,0BAA0B,CACpD,YAAY,EACZ,QAAQ,CACT,CAAC;IACF,MAAM,CAAC,EAAE,cAAc,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAChD,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC;IAC1E,QAAQ,CAAC,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;CAC7C"}
|
|
@@ -4,6 +4,10 @@ type Identifiers = {
|
|
|
4
4
|
numerator: number;
|
|
5
5
|
denominator: number;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
type Options = {
|
|
8
|
+
variantType: "original" | "proba";
|
|
9
|
+
};
|
|
10
|
+
export declare const fractionToPercentToDecimal: Exercise<Identifiers, Options>;
|
|
11
|
+
export declare const fractionToPercentToDecimalProbaVariant: Exercise<Identifiers, Options>;
|
|
8
12
|
export {};
|
|
9
13
|
//# sourceMappingURL=fractionToPercentToDecimal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fractionToPercentToDecimal.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionToPercentToDecimal.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;
|
|
1
|
+
{"version":3,"file":"fractionToPercentToDecimal.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionToPercentToDecimal.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAmSF,KAAK,OAAO,GAAG;IACb,WAAW,EAAE,UAAU,GAAG,OAAO,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAgBrE,CAAC;AAEF,eAAO,MAAM,sCAAsC,EAAE,QAAQ,CAC3D,WAAW,EACX,OAAO,CAiBR,CAAC"}
|
|
@@ -9,32 +9,36 @@ import { NumberNode } from "../../../../tree/nodes/numbers/numberNode.js";
|
|
|
9
9
|
import { PercentNode } from "../../../../tree/nodes/numbers/percentNode.js";
|
|
10
10
|
import { frac, FractionNode } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
11
11
|
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
12
|
-
const getInstruction = (identifiers) => {
|
|
12
|
+
const getInstruction = (identifiers, opts) => {
|
|
13
13
|
const { rand, numerator, denominator } = identifiers;
|
|
14
14
|
const fraction = new FractionNode(new NumberNode(numerator), new NumberNode(denominator));
|
|
15
15
|
const decimal = numerator / denominator;
|
|
16
16
|
const percent = round((numerator / denominator) * 100, 2);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
17
|
+
const strTheObj = opts?.variantType === "proba" ? "la probabilité" : "le nombre";
|
|
18
|
+
return `Écrire ${strTheObj}
|
|
19
|
+
${(() => {
|
|
20
|
+
switch (rand) {
|
|
21
|
+
case 1: {
|
|
22
|
+
return `$${decimal.frenchify()}$ sous forme de pourcentage.`;
|
|
23
|
+
}
|
|
24
|
+
case 2: {
|
|
25
|
+
return `$${decimal.frenchify()}$ sous forme de fraction irréductible.`;
|
|
26
|
+
}
|
|
27
|
+
case 3: {
|
|
28
|
+
return `$${percent.frenchify()}\\%$ sous forme décimale.`;
|
|
29
|
+
}
|
|
30
|
+
case 4: {
|
|
31
|
+
return `$${percent.frenchify()}\\%$ sous forme de fraction irréductible.`;
|
|
32
|
+
}
|
|
33
|
+
case 5: {
|
|
34
|
+
return `$${fraction.toTex()}$ sous forme décimale.`;
|
|
35
|
+
}
|
|
36
|
+
case 6:
|
|
37
|
+
default: {
|
|
38
|
+
return `$${fraction.toTex()}$ sous forme de pourcentage.`;
|
|
39
|
+
}
|
|
36
40
|
}
|
|
37
|
-
}
|
|
41
|
+
})()}`;
|
|
38
42
|
};
|
|
39
43
|
const getAnswer = (identifiers) => {
|
|
40
44
|
const { rand, numerator, denominator } = identifiers;
|
|
@@ -68,7 +72,7 @@ const getAnswer = (identifiers) => {
|
|
|
68
72
|
};
|
|
69
73
|
const getHint = () => {
|
|
70
74
|
return `- Un pourcentage du type $x\\%$ signifie : $\\frac{x}{100}$
|
|
71
|
-
- Pour transformer un nombre écrit sous forme
|
|
75
|
+
- Pour transformer un nombre écrit sous forme décimale en fraction, tu peux écrire au numérateur de la fraction le nombre sans virgule, et au dénominateur soit $10$, soit $100$, soit $1000$, etc... afin que la fraction soit bien égale au nombre décimal.`;
|
|
72
76
|
};
|
|
73
77
|
const getCorrection = (identifiers) => {
|
|
74
78
|
const { rand, numerator, denominator } = identifiers;
|
|
@@ -116,28 +120,66 @@ Ainsi $${fraction.toTex()} = ${percentTex}$.`;
|
|
|
116
120
|
}
|
|
117
121
|
return ``;
|
|
118
122
|
};
|
|
119
|
-
const getQuestionFromIdentifiers = (identifiers) => {
|
|
123
|
+
const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
120
124
|
const question = {
|
|
121
|
-
instruction: getInstruction(identifiers),
|
|
125
|
+
instruction: getInstruction(identifiers, opts),
|
|
122
126
|
answer: getAnswer(identifiers),
|
|
123
127
|
keys: ["percent"],
|
|
124
128
|
answerFormat: "tex",
|
|
125
129
|
identifiers,
|
|
126
|
-
hint: getHint(identifiers),
|
|
127
|
-
correction: getCorrection(identifiers),
|
|
130
|
+
hint: getHint(identifiers, opts),
|
|
131
|
+
correction: getCorrection(identifiers, opts),
|
|
132
|
+
options: opts,
|
|
128
133
|
};
|
|
129
134
|
return question;
|
|
130
135
|
};
|
|
131
|
-
const getFractionToPercentToDecimal = () => {
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
rand,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
136
|
+
const getFractionToPercentToDecimal = (opts) => {
|
|
137
|
+
const variantType = opts?.variantType ?? "original";
|
|
138
|
+
function createRandomIdentifiers() {
|
|
139
|
+
const denominator = 2 ** randint(0, 5) * 5 ** randint(0, 3);
|
|
140
|
+
const numerator = denominator !== 1 ? randint(1, denominator) : randint(1, 100);
|
|
141
|
+
const rand = randint(1, 7);
|
|
142
|
+
const identifiers = {
|
|
143
|
+
rand,
|
|
144
|
+
numerator,
|
|
145
|
+
denominator,
|
|
146
|
+
};
|
|
147
|
+
return identifiers;
|
|
148
|
+
}
|
|
149
|
+
let identifiers;
|
|
150
|
+
let counter = -1;
|
|
151
|
+
let isValid = false;
|
|
152
|
+
while (!isValid && counter < 100) {
|
|
153
|
+
counter++;
|
|
154
|
+
const identifiersCandidate = createRandomIdentifiers();
|
|
155
|
+
switch (variantType) {
|
|
156
|
+
case "original":
|
|
157
|
+
{
|
|
158
|
+
isValid = true;
|
|
159
|
+
}
|
|
160
|
+
break;
|
|
161
|
+
case "proba":
|
|
162
|
+
{
|
|
163
|
+
const { numerator, denominator } = identifiersCandidate;
|
|
164
|
+
const fractionNode = frac(numerator, denominator);
|
|
165
|
+
const value = fractionNode.evaluate();
|
|
166
|
+
isValid = 0 <= value && value <= 1;
|
|
167
|
+
}
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
if (isValid) {
|
|
171
|
+
identifiers = identifiersCandidate;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
if (!isValid) {
|
|
175
|
+
const identifiersDefault = {
|
|
176
|
+
rand: 3,
|
|
177
|
+
numerator: 2,
|
|
178
|
+
denominator: 5,
|
|
179
|
+
};
|
|
180
|
+
identifiers = identifiersDefault;
|
|
181
|
+
}
|
|
182
|
+
return getQuestionFromIdentifiers(identifiers, opts);
|
|
141
183
|
};
|
|
142
184
|
const getPropositions = (n, { answer, rand, numerator, denominator }) => {
|
|
143
185
|
const propositions = [];
|
|
@@ -211,10 +253,22 @@ const isAnswerValid = (ans, { rand, numerator, denominator }) => {
|
|
|
211
253
|
};
|
|
212
254
|
export const fractionToPercentToDecimal = {
|
|
213
255
|
id: "fractionToPercentToDecimal",
|
|
214
|
-
connector: "\\iff",
|
|
215
256
|
label: "Passer d'une écriture d'un nombre à une autre",
|
|
216
257
|
isSingleStep: false,
|
|
217
|
-
generator: (nb) => getDistinctQuestions(getFractionToPercentToDecimal, nb),
|
|
258
|
+
generator: (nb) => getDistinctQuestions(() => getFractionToPercentToDecimal({ variantType: "original" }), nb),
|
|
259
|
+
qcmTimer: 60,
|
|
260
|
+
freeTimer: 60,
|
|
261
|
+
getPropositions,
|
|
262
|
+
isAnswerValid,
|
|
263
|
+
subject: "Mathématiques",
|
|
264
|
+
getQuestionFromIdentifiers,
|
|
265
|
+
hasHintAndCorrection: true,
|
|
266
|
+
};
|
|
267
|
+
export const fractionToPercentToDecimalProbaVariant = {
|
|
268
|
+
id: "fractionToPercentToDecimalProbaVariant",
|
|
269
|
+
label: "Passer d'une écriture d'une probabilité à une autre",
|
|
270
|
+
isSingleStep: false,
|
|
271
|
+
generator: (nb) => getDistinctQuestions(() => getFractionToPercentToDecimal({ variantType: "proba" }), nb),
|
|
218
272
|
qcmTimer: 60,
|
|
219
273
|
freeTimer: 60,
|
|
220
274
|
getPropositions,
|
package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findCoeffInProportionalTableNonIntegers.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAU7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;
|
|
1
|
+
{"version":3,"file":"findCoeffInProportionalTableNonIntegers.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAU7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AA2JF,KAAK,OAAO,GAAG;IACb,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B,CAAC;AAoBF,eAAO,MAAM,uCAAuC,EAAE,QAAQ,CAC5D,WAAW,EACX,OAAO,CAuBR,CAAC"}
|
package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.js
CHANGED
|
@@ -123,7 +123,11 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
123
123
|
hint: getHint(identifiers),
|
|
124
124
|
correction: getCorrection(identifiers),
|
|
125
125
|
style: {
|
|
126
|
-
|
|
126
|
+
tableOptions: {
|
|
127
|
+
firstCellIsDivided: false,
|
|
128
|
+
firstColumnIsHeader: false,
|
|
129
|
+
firstRowIsHeader: false,
|
|
130
|
+
},
|
|
127
131
|
},
|
|
128
132
|
};
|
|
129
133
|
return question;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isTableProportional.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/isTableProportional.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"isTableProportional.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/isTableProportional.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAsG5D,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAcrD,CAAC"}
|
|
@@ -46,10 +46,16 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
46
46
|
instruction: getInstruction(identifiers),
|
|
47
47
|
keys: [],
|
|
48
48
|
answerFormat: "raw",
|
|
49
|
-
style: { tableHasNoHeader: true },
|
|
50
49
|
identifiers,
|
|
51
50
|
hint: getHint(identifiers),
|
|
52
51
|
correction: getCorrection(identifiers),
|
|
52
|
+
style: {
|
|
53
|
+
tableOptions: {
|
|
54
|
+
firstColumnIsHeader: false,
|
|
55
|
+
firstCellIsDivided: false,
|
|
56
|
+
firstRowIsHeader: false,
|
|
57
|
+
},
|
|
58
|
+
},
|
|
53
59
|
};
|
|
54
60
|
return question;
|
|
55
61
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isTableProportionalNonInteger.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/isTableProportionalNonInteger.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAEL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAU7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAmEF,KAAK,OAAO,GAAG;IACb,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B,CAAC;
|
|
1
|
+
{"version":3,"file":"isTableProportionalNonInteger.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/isTableProportionalNonInteger.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAEL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAU7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAmEF,KAAK,OAAO,GAAG;IACb,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B,CAAC;AAyGF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAmBxE,CAAC"}
|
|
@@ -119,7 +119,11 @@ const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
|
119
119
|
hint: getHint(identifiers),
|
|
120
120
|
correction: getCorrection(identifiers),
|
|
121
121
|
style: {
|
|
122
|
-
|
|
122
|
+
tableOptions: {
|
|
123
|
+
firstColumnIsHeader: false,
|
|
124
|
+
firstCellIsDivided: false,
|
|
125
|
+
firstRowIsHeader: false,
|
|
126
|
+
},
|
|
123
127
|
},
|
|
124
128
|
};
|
|
125
129
|
return question;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proportionalityTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/proportionalityTable.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;CACrB,CAAC;
|
|
1
|
+
{"version":3,"file":"proportionalityTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/proportionalityTable.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;CACrB,CAAC;AA4HF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAetD,CAAC"}
|
|
@@ -90,7 +90,11 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
90
90
|
answerFormat: "tex",
|
|
91
91
|
identifiers,
|
|
92
92
|
style: {
|
|
93
|
-
|
|
93
|
+
tableOptions: {
|
|
94
|
+
firstColumnIsHeader: false,
|
|
95
|
+
firstCellIsDivided: false,
|
|
96
|
+
firstRowIsHeader: false,
|
|
97
|
+
},
|
|
94
98
|
},
|
|
95
99
|
hint: getHint(identifiers),
|
|
96
100
|
correction: getCorrection(identifiers),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proportionalityTableCoefficient.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/proportionalityTableCoefficient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;
|
|
1
|
+
{"version":3,"file":"proportionalityTableCoefficient.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/proportionalityTableCoefficient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AA2FF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAejE,CAAC"}
|
|
@@ -29,7 +29,7 @@ const getHint = () => {
|
|
|
29
29
|
};
|
|
30
30
|
const getCorrection = (identifiers) => {
|
|
31
31
|
const { xValues, yValues } = identifiers;
|
|
32
|
-
return `Le coefficient de proportionnalité est le
|
|
32
|
+
return `Le coefficient de proportionnalité est le nombre par lequel on multiplie les valeurs de la première ligne pour obtenir les valeurs de la deuxième ligne.
|
|
33
33
|
|
|
34
34
|
Pour l'obtenir, on divise une valeur de la deuxième ligne par la valeur correspondante dans la première ligne, par exemple :
|
|
35
35
|
|
|
@@ -51,7 +51,13 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
51
51
|
keys: [],
|
|
52
52
|
answerFormat: "tex",
|
|
53
53
|
identifiers,
|
|
54
|
-
style: {
|
|
54
|
+
style: {
|
|
55
|
+
tableOptions: {
|
|
56
|
+
firstColumnIsHeader: false,
|
|
57
|
+
firstCellIsDivided: false,
|
|
58
|
+
firstRowIsHeader: false,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
55
61
|
hint: getHint(identifiers),
|
|
56
62
|
correction: getCorrection(identifiers),
|
|
57
63
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from "./equationSimpleSquare.js";
|
|
2
1
|
export * from "./fractionEquation.js";
|
|
3
2
|
export * from "./multiplicationEquation.js";
|
|
4
3
|
export * from "./firstDegreeEquation.js";
|
|
@@ -13,4 +12,5 @@ export * from "./proportionEquation.js";
|
|
|
13
12
|
export * from "./solveByFactorizingWithIdRmq3.js";
|
|
14
13
|
export * from "./equationFromFrenchDescription.js";
|
|
15
14
|
export * from "./firstDegree/index.js";
|
|
15
|
+
export * from "./square/index.js";
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from "./equationSimpleSquare.js";
|
|
2
1
|
export * from "./fractionEquation.js";
|
|
3
2
|
export * from "./multiplicationEquation.js";
|
|
4
3
|
export * from "./firstDegreeEquation.js";
|
|
@@ -13,3 +12,4 @@ export * from "./proportionEquation.js";
|
|
|
13
12
|
export * from "./solveByFactorizingWithIdRmq3.js";
|
|
14
13
|
export * from "./equationFromFrenchDescription.js";
|
|
15
14
|
export * from "./firstDegree/index.js";
|
|
15
|
+
export * from "./square/index.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
randNbr: number;
|
|
4
|
+
};
|
|
5
|
+
type Options = {
|
|
6
|
+
solutionType: string[];
|
|
7
|
+
};
|
|
8
|
+
export declare const equationSimpleSquare: Exercise<Identifiers, Options>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=equationSimpleSquare.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equationSimpleSquare.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/calculLitteral/equation/square/equationSimpleSquare.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAwBrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAgLF,KAAK,OAAO,GAAG;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAqBF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAgB/D,CAAC"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { GeneratorOptionTarget, GeneratorOptionType, addValidProp, propWhile, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { Rational } from "../../../../../math/numbers/rationals/rational.js";
|
|
4
|
+
import { SquareRoot } from "../../../../../math/numbers/reals/real.js";
|
|
5
|
+
import { randint } from "../../../../../math/utils/random/randint.js";
|
|
6
|
+
import { EquationSolutionNode } from "../../../../../tree/nodes/equations/equationSolutionNode.js";
|
|
7
|
+
import { OppositeNode } from "../../../../../tree/nodes/functions/oppositeNode.js";
|
|
8
|
+
import { NumberNode } from "../../../../../tree/nodes/numbers/numberNode.js";
|
|
9
|
+
import { DiscreteSetNode } from "../../../../../tree/nodes/sets/discreteSetNode.js";
|
|
10
|
+
import { coinFlip } from "../../../../../utils/alea/coinFlip.js";
|
|
11
|
+
import { isInt } from "../../../../../utils/isInt.js";
|
|
12
|
+
import { random } from "../../../../../utils/alea/random.js";
|
|
13
|
+
import { discreteSetParser } from "../../../../../tree/parsers/discreteSetParser.js";
|
|
14
|
+
import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
|
|
15
|
+
import { doWhile } from "../../../../../utils/doWhile.js";
|
|
16
|
+
const squares = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map((el) => el ** 2);
|
|
17
|
+
const higherFactor = (n) => {
|
|
18
|
+
for (let i = Math.floor(Math.sqrt(n)); i > 0; i--)
|
|
19
|
+
if (n % i ** 2 === 0)
|
|
20
|
+
return i;
|
|
21
|
+
return 1;
|
|
22
|
+
};
|
|
23
|
+
const getInstruction = (identifiers) => {
|
|
24
|
+
const { randNbr } = identifiers;
|
|
25
|
+
return `Résoudre l'équation :
|
|
26
|
+
|
|
27
|
+
$$
|
|
28
|
+
x^2 = ${randNbr}
|
|
29
|
+
$$`;
|
|
30
|
+
};
|
|
31
|
+
const getHint = () => {
|
|
32
|
+
return `L'équation $x^2 = k$ :
|
|
33
|
+
|
|
34
|
+
- n'admet pas de solution si $k<0$ ;
|
|
35
|
+
- admet une solution si $k=0$, qui est $0$ ;
|
|
36
|
+
- admet deux solutions si $k>0$, qui sont $-\\sqrt{k}$ et $\\sqrt{k}$.
|
|
37
|
+
`;
|
|
38
|
+
};
|
|
39
|
+
const getAnswer = (identifiers) => {
|
|
40
|
+
const { randNbr } = identifiers;
|
|
41
|
+
let solutionsSet;
|
|
42
|
+
if (randNbr < 0) {
|
|
43
|
+
solutionsSet = new DiscreteSetNode([]);
|
|
44
|
+
}
|
|
45
|
+
else if (randNbr === 0) {
|
|
46
|
+
solutionsSet = new DiscreteSetNode([new NumberNode(0)]);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
const tree = new SquareRoot(randNbr).simplify().toTree();
|
|
50
|
+
solutionsSet = new DiscreteSetNode([new OppositeNode(tree), tree]);
|
|
51
|
+
}
|
|
52
|
+
const answer = new EquationSolutionNode(solutionsSet).toTex();
|
|
53
|
+
return answer;
|
|
54
|
+
};
|
|
55
|
+
const getCorrection = (identifiers) => {
|
|
56
|
+
const { randNbr } = identifiers;
|
|
57
|
+
const answer = getAnswer(identifiers);
|
|
58
|
+
return `
|
|
59
|
+
${randNbr < 0
|
|
60
|
+
? `L'équation $x^2 = ${randNbr}$ n'admet pas de solution, car $${randNbr}$ est négatif. Ainsi, $${answer}$.`
|
|
61
|
+
: randNbr === 0
|
|
62
|
+
? `L'équation $x^2 = 0$ admet une unique solution : $0$. En effet, $0$ est le seul nombre qui au carré est égal à $0$. Ainsi, $${answer}$.`
|
|
63
|
+
: `Puisque $${randNbr}>0$, l'équation $x^2 = ${randNbr}$ admet deux solutions : $-\\sqrt{${randNbr}}$ et $\\sqrt{${randNbr}}$.
|
|
64
|
+
|
|
65
|
+
${new SquareRoot(randNbr).isSimplifiable()
|
|
66
|
+
? `Or, $\\sqrt{${randNbr}}=${new SquareRoot(randNbr)
|
|
67
|
+
.simplify()
|
|
68
|
+
.toTree()
|
|
69
|
+
.toTex()}$.`
|
|
70
|
+
: ""}
|
|
71
|
+
|
|
72
|
+
Ainsi, $${answer}$.
|
|
73
|
+
`}
|
|
74
|
+
`;
|
|
75
|
+
};
|
|
76
|
+
const getEquationSimpleSquare = (opts) => {
|
|
77
|
+
let randNbr;
|
|
78
|
+
const type = random(opts?.solutionType ?? ["Entiers", "Racines carrées", "Ensemble vide"]);
|
|
79
|
+
if (type === "Ensemble vide") {
|
|
80
|
+
randNbr = randint(-20, 0);
|
|
81
|
+
}
|
|
82
|
+
else if (type === "Racines carrées") {
|
|
83
|
+
randNbr = doWhile(() => randint(2, 100), (x) => Math.sqrt(x) === Math.floor(Math.sqrt(x)));
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
randNbr = random(squares);
|
|
87
|
+
}
|
|
88
|
+
const identifiers = { randNbr };
|
|
89
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
90
|
+
};
|
|
91
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
92
|
+
const question = {
|
|
93
|
+
instruction: getInstruction(identifiers),
|
|
94
|
+
answer: getAnswer(identifiers),
|
|
95
|
+
keys: ["S", "equal", "lbrace", "semicolon", "rbrace", "varnothing"],
|
|
96
|
+
answerFormat: "tex",
|
|
97
|
+
identifiers,
|
|
98
|
+
hint: getHint(identifiers),
|
|
99
|
+
correction: getCorrection(identifiers),
|
|
100
|
+
};
|
|
101
|
+
return question;
|
|
102
|
+
};
|
|
103
|
+
const getPropositions = (n, { answer, randNbr }) => {
|
|
104
|
+
const propositions = [];
|
|
105
|
+
addValidProp(propositions, answer);
|
|
106
|
+
const half = new Rational(randNbr, 2).simplify().toTree();
|
|
107
|
+
if (randNbr < 0) {
|
|
108
|
+
tryToAddWrongProp(propositions, `S=\\left\\{-\\sqrt{${-randNbr}}\\right\\}`);
|
|
109
|
+
tryToAddWrongProp(propositions, `S=\\left\\{\\sqrt{-${-randNbr}}\\right\\}`);
|
|
110
|
+
tryToAddWrongProp(propositions, new EquationSolutionNode(new DiscreteSetNode([half])).toTex());
|
|
111
|
+
}
|
|
112
|
+
else if (isInt(Math.sqrt(randNbr))) {
|
|
113
|
+
const sqrt = Math.sqrt(randNbr);
|
|
114
|
+
tryToAddWrongProp(propositions, `S=\\left\\{${sqrt}\\right\\}`);
|
|
115
|
+
tryToAddWrongProp(propositions, new EquationSolutionNode(new DiscreteSetNode([half])).toTex());
|
|
116
|
+
propWhile(propositions, n, () => {
|
|
117
|
+
const tempAns = sqrt + randint(-sqrt + 1, 7, [0]);
|
|
118
|
+
tryToAddWrongProp(propositions, coinFlip()
|
|
119
|
+
? `S=\\left\\{-${tempAns};${tempAns}\\right\\}`
|
|
120
|
+
: `S=\\varnothing`);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
const sqrtTree = new SquareRoot(randNbr).simplify().toTree();
|
|
125
|
+
const factor = higherFactor(randNbr);
|
|
126
|
+
const radicand = randNbr / factor ** 2;
|
|
127
|
+
tryToAddWrongProp(propositions, new EquationSolutionNode(new DiscreteSetNode([sqrtTree])).toTex());
|
|
128
|
+
tryToAddWrongProp(propositions, new EquationSolutionNode(new DiscreteSetNode([half])).toTex());
|
|
129
|
+
propWhile(propositions, n, () => {
|
|
130
|
+
const tempFactor = factor + randint(-factor + 1, 7, [0]);
|
|
131
|
+
const tempRadicand = radicand + randint(-radicand + 1, 7, [0]);
|
|
132
|
+
tryToAddWrongProp(propositions, coinFlip()
|
|
133
|
+
? `S=\\left\\{-${tempFactor}\\sqrt{${tempRadicand}};${tempFactor}\\sqrt{${tempRadicand}}\\right\\}`
|
|
134
|
+
: `S=\\varnothing`);
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
return shuffleProps(propositions, n);
|
|
138
|
+
};
|
|
139
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
140
|
+
try {
|
|
141
|
+
const parsed = discreteSetParser(ans);
|
|
142
|
+
if (!parsed)
|
|
143
|
+
return false;
|
|
144
|
+
return "S=" + parsed.simplify().toTex() === answer;
|
|
145
|
+
}
|
|
146
|
+
catch (err) {
|
|
147
|
+
return handleVEAError(err);
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
const options = [
|
|
151
|
+
{
|
|
152
|
+
id: "solutionType",
|
|
153
|
+
label: "Type de solutions",
|
|
154
|
+
target: GeneratorOptionTarget.generation,
|
|
155
|
+
type: GeneratorOptionType.multiselect,
|
|
156
|
+
defaultValue: ["Entiers", "Racines carrées", "Ensemble vide"],
|
|
157
|
+
values: ["Entiers", "Racines carrées", "Ensemble vide"],
|
|
158
|
+
},
|
|
159
|
+
];
|
|
160
|
+
const validateOptions = (opts) => {
|
|
161
|
+
if (opts?.solutionType?.length === 0)
|
|
162
|
+
return {
|
|
163
|
+
valid: false,
|
|
164
|
+
message: "Veuillez choisir au moins un type de solution.",
|
|
165
|
+
};
|
|
166
|
+
return { valid: true, message: "" };
|
|
167
|
+
};
|
|
168
|
+
export const equationSimpleSquare = {
|
|
169
|
+
id: "equationSimpleSquare",
|
|
170
|
+
connector: "=",
|
|
171
|
+
label: "Résoudre une équation du second degré du type $x^2 = a$",
|
|
172
|
+
isSingleStep: false,
|
|
173
|
+
generator: (nb, opts) => getDistinctQuestions(() => getEquationSimpleSquare(opts), nb),
|
|
174
|
+
qcmTimer: 60,
|
|
175
|
+
freeTimer: 60,
|
|
176
|
+
getPropositions,
|
|
177
|
+
isAnswerValid,
|
|
178
|
+
subject: "Mathématiques",
|
|
179
|
+
hasHintAndCorrection: true,
|
|
180
|
+
getQuestionFromIdentifiers,
|
|
181
|
+
options,
|
|
182
|
+
validateOptions,
|
|
183
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
a: number;
|
|
4
|
+
b: number;
|
|
5
|
+
c: number;
|
|
6
|
+
d: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const equationSquareWithSteps: Exercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=equationSquareWithSteps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equationSquareWithSteps.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/calculLitteral/equation/square/equationSquareWithSteps.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAgBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAmKF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAkBzD,CAAC"}
|