math-exercises 3.0.150 → 3.0.152
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 +5 -0
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/primeNumbersAffirmations.js +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/equa1.d.ts +4 -1
- package/lib/exercises/math/calculLitteral/equation/equa1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equa1.js +27 -7
- package/lib/exercises/math/calculLitteral/equation/equa2.d.ts +1 -0
- package/lib/exercises/math/calculLitteral/equation/equa2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equa2.js +18 -1
- package/lib/exercises/math/calculLitteral/equation/equa3.d.ts +4 -1
- package/lib/exercises/math/calculLitteral/equation/equa3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equa3.js +26 -6
- package/lib/exercises/math/calculLitteral/equation/equa4.d.ts +4 -1
- package/lib/exercises/math/calculLitteral/equation/equa4.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equa4.js +27 -7
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa1.d.ts +14 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa1.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa1.js +129 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa2.d.ts +18 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa2.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa2.js +167 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa3.d.ts +15 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa3.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa3.js +129 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa4.d.ts +16 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa4.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa4.js +124 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType1.d.ts +9 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType1.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType1.js +107 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType2.d.ts +10 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType2.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType2.js +108 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType3.d.ts +11 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType3.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType3.js +104 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/index.d.ts +8 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/index.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/index.js +7 -0
- package/lib/exercises/math/calculLitteral/equation/index.d.ts +1 -7
- package/lib/exercises/math/calculLitteral/equation/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/index.js +1 -7
- package/lib/exercises/math/dataRepresentations/histogram/etendueHistogram.d.ts +8 -0
- package/lib/exercises/math/dataRepresentations/histogram/etendueHistogram.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/histogram/etendueHistogram.js +175 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramCommenting.d.ts +9 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramCommenting.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramCommenting.js +250 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramFillDataTableFromHistogramData.d.ts +9 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramFillDataTableFromHistogramData.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramFillDataTableFromHistogramData.js +173 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramIsSameData.d.ts +14 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramIsSameData.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramIsSameData.js +239 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramReading.d.ts +9 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramReading.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramReading.js +163 -0
- package/lib/exercises/math/dataRepresentations/histogram/index.d.ts +6 -0
- package/lib/exercises/math/dataRepresentations/histogram/index.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/histogram/index.js +5 -0
- package/lib/exercises/math/dataRepresentations/index.d.ts +1 -1
- package/lib/exercises/math/dataRepresentations/index.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/index.js +1 -1
- 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/affines/leadingCoeffAndOriginOrdinate.d.ts +4 -1
- package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.js +19 -4
- package/lib/exercises/math/functions/affines/leadingCoefficient.d.ts +1 -0
- package/lib/exercises/math/functions/affines/leadingCoefficient.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/leadingCoefficient.js +13 -1
- package/lib/exercises/math/functions/affines/recognizeAffineGraph.d.ts +4 -1
- package/lib/exercises/math/functions/affines/recognizeAffineGraph.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/recognizeAffineGraph.js +19 -4
- 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/geometry/euclidian/pythagoreOrThales.d.ts +4 -1
- package/lib/exercises/math/geometry/euclidian/pythagoreOrThales.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidian/pythagoreOrThales.js +18 -3
- package/lib/exercises/math/geometry/triangles/index.d.ts +1 -0
- package/lib/exercises/math/geometry/triangles/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/triangles/index.js +1 -0
- package/lib/exercises/math/geometry/triangles/similar/index.d.ts +4 -0
- package/lib/exercises/math/geometry/triangles/similar/index.d.ts.map +1 -0
- package/lib/exercises/math/geometry/triangles/similar/index.js +3 -0
- package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWithAngles.d.ts +10 -0
- package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWithAngles.d.ts.map +1 -0
- package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWithAngles.js +122 -0
- package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWrtSideLengths.d.ts +15 -0
- package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWrtSideLengths.d.ts.map +1 -0
- package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWrtSideLengths.js +351 -0
- package/lib/exercises/math/geometry/triangles/similar/placeSegmentsOfSimilarTriangle.d.ts +11 -0
- package/lib/exercises/math/geometry/triangles/similar/placeSegmentsOfSimilarTriangle.d.ts.map +1 -0
- package/lib/exercises/math/geometry/triangles/similar/placeSegmentsOfSimilarTriangle.js +311 -0
- package/lib/exercises/math/probaStat/basicProbas/calculateProbaFromProbaLaw.d.ts +10 -0
- package/lib/exercises/math/probaStat/basicProbas/calculateProbaFromProbaLaw.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicProbas/calculateProbaFromProbaLaw.js +135 -0
- package/lib/exercises/math/probaStat/basicProbas/findEffectifFromProba.d.ts +9 -0
- package/lib/exercises/math/probaStat/basicProbas/findEffectifFromProba.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicProbas/findEffectifFromProba.js +109 -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 +4 -0
- package/lib/exercises/math/probaStat/basicProbas/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/basicProbas/index.js +4 -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/averageWithTable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/averageWithTable.js +7 -1
- 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/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/spaceGeometry/index.d.ts +1 -0
- package/lib/exercises/math/spaceGeometry/index.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/index.js +1 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfConeSection.d.ts +14 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfConeSection.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfConeSection.js +439 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfCylinderSection.d.ts +14 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfCylinderSection.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfCylinderSection.js +548 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfRectangularPrismSection.d.ts +11 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfRectangularPrismSection.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfRectangularPrismSection.js +360 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfSphereSection.d.ts +9 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfSphereSection.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfSphereSection.js +272 -0
- package/lib/exercises/math/spaceGeometry/sections/index.d.ts +9 -0
- package/lib/exercises/math/spaceGeometry/sections/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sections/index.js +8 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfCone.d.ts +11 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfCone.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfCone.js +266 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfCylinder.d.ts +11 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfCylinder.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfCylinder.js +236 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfRectangularPrism.d.ts +7 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfRectangularPrism.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfRectangularPrism.js +92 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfSphereOrBall.d.ts +9 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfSphereOrBall.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfSphereOrBall.js +236 -0
- package/lib/exercises/pc/mathExosInPC.d.ts +4 -4
- package/lib/exercises/pc/mathExosInPC.d.ts.map +1 -1
- package/lib/exercises/pc/mathExosInPC.js +4 -4
- package/lib/index.d.ts +173 -45
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/spacePoint.d.ts +10 -0
- package/lib/math/geometry/spacePoint.d.ts.map +1 -1
- package/lib/math/geometry/spacePoint.js +13 -0
- package/lib/tree/nodes/operators/substractNode.d.ts +1 -0
- package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/substractNode.js +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
4
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
5
|
+
import { probaFlip } from "../../../../utils/alea/probaFlip.js";
|
|
6
|
+
import { random, randomMany } from "../../../../utils/alea/random.js";
|
|
7
|
+
const getInstruction = (identifiers) => {
|
|
8
|
+
const { radius, height, isDiameterGiven, isHollow, isBaseCircle } = identifiers;
|
|
9
|
+
return `Parmi les propositions suivantes, lesquelles peuvent être des sections planes d'un cône de hauteur $${height.frenchify()}\\ \\textrm{cm}$ dont le ${isDiameterGiven ? "diamètre" : "rayon"} de la base mesure $${(isDiameterGiven
|
|
10
|
+
? 2 * radius
|
|
11
|
+
: radius).frenchify()}\\ \\textrm{cm}$ ?
|
|
12
|
+
On va considérer que le cône est ${isHollow ? "creux" : "plein"}${isHollow
|
|
13
|
+
? isBaseCircle
|
|
14
|
+
? " avec pour base un cercle"
|
|
15
|
+
: " avec pour base un disque"
|
|
16
|
+
: ""}.`;
|
|
17
|
+
};
|
|
18
|
+
const getHint = (identifiers) => {
|
|
19
|
+
const { isHollow, isBaseCircle } = identifiers;
|
|
20
|
+
return `Visualise mentalement un cône ${isHollow ? "creux" : "plein"}${isHollow
|
|
21
|
+
? isBaseCircle
|
|
22
|
+
? " avec pour base un cercle"
|
|
23
|
+
: " avec pour base un disque"
|
|
24
|
+
: ""}.`;
|
|
25
|
+
};
|
|
26
|
+
const getCorrection = (identifiers) => {
|
|
27
|
+
const { radius, isHollow, isBaseCircle } = identifiers;
|
|
28
|
+
return `Les réponses possibles pour un cône ${isHollow ? "creux" : "plein"}${isHollow
|
|
29
|
+
? isBaseCircle
|
|
30
|
+
? " avec pour base un cercle"
|
|
31
|
+
: " avec pour base un disque"
|
|
32
|
+
: ""} de rayon $${radius} \\ \\textrm{cm}$ sont :
|
|
33
|
+
|
|
34
|
+
- un point si le plan passe seulement par le sommet du cône
|
|
35
|
+
- un segment si le plan est comme "posé" sur le cône
|
|
36
|
+
${(() => {
|
|
37
|
+
if (isHollow) {
|
|
38
|
+
if (isBaseCircle) {
|
|
39
|
+
return `- un cercle de rayon inférieur ou égal à $${radius} \\ \\textrm{cm}$ si le plan est perpendiculaire à l'axe de révolution du cône
|
|
40
|
+
- une ligne brisée composée de deux segments si le plan passe par l'axe de révolution du cône`;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
return `- un cercle de rayon strictement inférieur à $${radius} \\ \\textrm{cm}$ si le plan est perpendiculaire à l'axe de révolution du cône
|
|
44
|
+
- un disque de rayon $${radius} \\ \\textrm{cm}$ si le plan est perpendiculaire à l'axe de révolution du cône et rencontre la base du cône
|
|
45
|
+
- un triangle si le plan passe par l'axe de révolution du cône`;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
return `- un disque de rayon inférieur ou égal à $${radius} \\ \\textrm{cm}$ si le plan est perpendiculaire à l'axe de révolution du cône
|
|
50
|
+
- un triangle plein si le plan passe par l'axe de révolution du cône`;
|
|
51
|
+
}
|
|
52
|
+
})()}`;
|
|
53
|
+
};
|
|
54
|
+
const getPropositions = (n, { answer, ...identifiers }) => {
|
|
55
|
+
const { radius, isHollow, isBaseCircle } = identifiers;
|
|
56
|
+
const propositions = [];
|
|
57
|
+
if (isHollow) {
|
|
58
|
+
const validPool = [
|
|
59
|
+
"un point",
|
|
60
|
+
"un segment",
|
|
61
|
+
//circle<radius
|
|
62
|
+
random([
|
|
63
|
+
`un cercle de rayon $${randint(1, radius)} \\ \\textrm{cm}$`,
|
|
64
|
+
`un cercle de diamètre $${2 * randint(1, radius)} \\ \\textrm{cm}$`,
|
|
65
|
+
]),
|
|
66
|
+
...(isBaseCircle
|
|
67
|
+
? [
|
|
68
|
+
"une ligne brisée composée de deux segments",
|
|
69
|
+
//circle=radius
|
|
70
|
+
random([
|
|
71
|
+
`un cercle de rayon $${radius} \\ \\textrm{cm}$`,
|
|
72
|
+
`un cercle de diamètre $${2 * radius} \\ \\textrm{cm}$`,
|
|
73
|
+
]),
|
|
74
|
+
]
|
|
75
|
+
: [
|
|
76
|
+
"un triangle",
|
|
77
|
+
//disk=radius
|
|
78
|
+
random([
|
|
79
|
+
`un disque de rayon $${radius} \\ \\textrm{cm}$`,
|
|
80
|
+
`un disque de diamètre $${2 * radius} \\ \\textrm{cm}$`,
|
|
81
|
+
]),
|
|
82
|
+
]),
|
|
83
|
+
];
|
|
84
|
+
const invalidPool = [
|
|
85
|
+
//circle>radius
|
|
86
|
+
random([
|
|
87
|
+
`un cercle de rayon $${randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
88
|
+
`un cercle de diamètre $${2 * randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
89
|
+
]),
|
|
90
|
+
...(isBaseCircle
|
|
91
|
+
? [
|
|
92
|
+
//disk=radius
|
|
93
|
+
random([
|
|
94
|
+
`un disque de rayon $${radius} \\ \\textrm{cm}$`,
|
|
95
|
+
`un disque de diamètre $${2 * radius} \\ \\textrm{cm}$`,
|
|
96
|
+
]),
|
|
97
|
+
]
|
|
98
|
+
: [
|
|
99
|
+
//circle=radius
|
|
100
|
+
random([
|
|
101
|
+
`un cercle de rayon $${radius} \\ \\textrm{cm}$`,
|
|
102
|
+
`un cercle de diamètre $${2 * radius} \\ \\textrm{cm}$`,
|
|
103
|
+
]),
|
|
104
|
+
]),
|
|
105
|
+
//disk<radius
|
|
106
|
+
random([
|
|
107
|
+
`un disque de rayon $${randint(1, radius)} \\ \\textrm{cm}$`,
|
|
108
|
+
`un disque de diamètre $${2 * randint(1, radius)} \\ \\textrm{cm}$`,
|
|
109
|
+
]),
|
|
110
|
+
//disk>radius
|
|
111
|
+
random([
|
|
112
|
+
`un disque de rayon $${randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
113
|
+
`un disque de diamètre $${2 * randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
114
|
+
]),
|
|
115
|
+
//rare
|
|
116
|
+
...(probaFlip(0.02)
|
|
117
|
+
? [
|
|
118
|
+
random([
|
|
119
|
+
`un disque de rayon $1,5 \\ \\textrm{cm}$`,
|
|
120
|
+
`un disque de diamètre $3 \\ \\textrm{cm}$`,
|
|
121
|
+
]),
|
|
122
|
+
]
|
|
123
|
+
: []),
|
|
124
|
+
];
|
|
125
|
+
const invalidMiscPool = ["une droite", "un cône", "un cylindre"];
|
|
126
|
+
if (coinFlip() && validPool.length === 4) {
|
|
127
|
+
//jackpot
|
|
128
|
+
validPool.forEach((str) => {
|
|
129
|
+
addValidProp(propositions, str, "raw");
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
const nbValid = randint(1, validPool.length + 1);
|
|
134
|
+
const nbInvalid = n - nbValid;
|
|
135
|
+
randomMany(validPool, nbValid).forEach((str) => {
|
|
136
|
+
addValidProp(propositions, str, "raw");
|
|
137
|
+
});
|
|
138
|
+
if (probaFlip(0.2)) {
|
|
139
|
+
randomMany([...invalidPool, random(invalidMiscPool)], nbInvalid).forEach((str) => {
|
|
140
|
+
tryToAddWrongProp(propositions, str, "raw");
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
randomMany(invalidPool, nbInvalid).forEach((str) => {
|
|
145
|
+
tryToAddWrongProp(propositions, str, "raw");
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
const validPool = [
|
|
152
|
+
"un point",
|
|
153
|
+
"un segment",
|
|
154
|
+
//disk<radius
|
|
155
|
+
random([
|
|
156
|
+
`un disque de rayon $${randint(1, radius)} \\ \\textrm{cm}$`,
|
|
157
|
+
`un disque de diamètre $${2 * randint(1, radius)} \\ \\textrm{cm}$`,
|
|
158
|
+
]),
|
|
159
|
+
"un triangle plein",
|
|
160
|
+
//disk=radius
|
|
161
|
+
random([
|
|
162
|
+
`un disque de rayon $${radius} \\ \\textrm{cm}$`,
|
|
163
|
+
`un disque de diamètre $${2 * radius} \\ \\textrm{cm}$`,
|
|
164
|
+
]),
|
|
165
|
+
];
|
|
166
|
+
const invalidPool = [
|
|
167
|
+
//disk>radius
|
|
168
|
+
random([
|
|
169
|
+
`un disque de rayon $${randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
170
|
+
`un disque de diamètre $${2 * randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
171
|
+
]),
|
|
172
|
+
//circle=radius
|
|
173
|
+
random([
|
|
174
|
+
`un cercle de rayon $${radius} \\ \\textrm{cm}$`,
|
|
175
|
+
`un cercle de diamètre $${2 * radius} \\ \\textrm{cm}$`,
|
|
176
|
+
]),
|
|
177
|
+
//circle<radius
|
|
178
|
+
random([
|
|
179
|
+
`un cercle de rayon $${randint(1, radius)} \\ \\textrm{cm}$`,
|
|
180
|
+
`un cercle de diamètre $${2 * randint(1, radius)} \\ \\textrm{cm}$`,
|
|
181
|
+
]),
|
|
182
|
+
//circle>radius
|
|
183
|
+
random([
|
|
184
|
+
`un cercle de rayon $${randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
185
|
+
`un cercle de diamètre $${2 * randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
186
|
+
]),
|
|
187
|
+
//rare
|
|
188
|
+
...(probaFlip(0.02)
|
|
189
|
+
? [
|
|
190
|
+
random([
|
|
191
|
+
`un cercle de rayon $1,5 \\ \\textrm{cm}$`,
|
|
192
|
+
`un cercle de diamètre $3 \\ \\textrm{cm}$`,
|
|
193
|
+
]),
|
|
194
|
+
]
|
|
195
|
+
: []),
|
|
196
|
+
];
|
|
197
|
+
const invalidMiscPool = ["une droite", "un cône", "un cylindre"];
|
|
198
|
+
if (coinFlip() && validPool.length === 4) {
|
|
199
|
+
//jackpot
|
|
200
|
+
validPool.forEach((str) => {
|
|
201
|
+
addValidProp(propositions, str, "raw");
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
const nbValid = randint(1, validPool.length + 1);
|
|
206
|
+
const nbInvalid = n - nbValid;
|
|
207
|
+
randomMany(validPool, nbValid).forEach((str) => {
|
|
208
|
+
addValidProp(propositions, str, "raw");
|
|
209
|
+
});
|
|
210
|
+
if (probaFlip(0.2)) {
|
|
211
|
+
randomMany([...invalidPool, random(invalidMiscPool)], nbInvalid).forEach((str) => {
|
|
212
|
+
tryToAddWrongProp(propositions, str, "raw");
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
randomMany(invalidPool, nbInvalid).forEach((str) => {
|
|
217
|
+
tryToAddWrongProp(propositions, str, "raw");
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return shuffleProps(propositions, n);
|
|
223
|
+
};
|
|
224
|
+
const getRecognizeSectionsOfConeQuestion = () => {
|
|
225
|
+
const radius = randint(5, 21);
|
|
226
|
+
const height = randint(5, 21);
|
|
227
|
+
const isDiameterGiven = coinFlip();
|
|
228
|
+
const isHollow = coinFlip();
|
|
229
|
+
const isBaseCircle = isHollow && coinFlip();
|
|
230
|
+
const identifiers = {
|
|
231
|
+
radius,
|
|
232
|
+
height,
|
|
233
|
+
isDiameterGiven,
|
|
234
|
+
isHollow,
|
|
235
|
+
isBaseCircle,
|
|
236
|
+
};
|
|
237
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
238
|
+
};
|
|
239
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
240
|
+
const question = {
|
|
241
|
+
instruction: getInstruction(identifiers),
|
|
242
|
+
hint: getHint(identifiers),
|
|
243
|
+
correction: getCorrection(identifiers),
|
|
244
|
+
keys: [],
|
|
245
|
+
answerFormat: "raw",
|
|
246
|
+
identifiers,
|
|
247
|
+
};
|
|
248
|
+
return question;
|
|
249
|
+
};
|
|
250
|
+
export const recognizeSectionsOfCone = {
|
|
251
|
+
id: "recognizeSectionsOfCone",
|
|
252
|
+
connector: "=",
|
|
253
|
+
label: "Reconnaître la nature d'une section de cône",
|
|
254
|
+
isSingleStep: true,
|
|
255
|
+
generator: (nb) => getDistinctQuestions(getRecognizeSectionsOfConeQuestion, nb),
|
|
256
|
+
qcmTimer: 60,
|
|
257
|
+
freeTimer: 60,
|
|
258
|
+
getPropositions,
|
|
259
|
+
subject: "Mathématiques",
|
|
260
|
+
getQuestionFromIdentifiers,
|
|
261
|
+
answerType: "QCM",
|
|
262
|
+
isQCM: true,
|
|
263
|
+
getHint,
|
|
264
|
+
getCorrection,
|
|
265
|
+
hasHintAndCorrection: true,
|
|
266
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
radius: number;
|
|
4
|
+
height: number;
|
|
5
|
+
isDiameterGiven: boolean;
|
|
6
|
+
isHollow: boolean;
|
|
7
|
+
isBaseCircle: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const recognizeSectionsOfCylinder: Exercise<Identifiers>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=recognizeSectionsOfCylinder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recognizeSectionsOfCylinder.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/sections/recognizeSectionsOfCylinder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAoRF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAiB7D,CAAC"}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
4
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
5
|
+
import { probaFlip } from "../../../../utils/alea/probaFlip.js";
|
|
6
|
+
import { random, randomMany } from "../../../../utils/alea/random.js";
|
|
7
|
+
const getInstruction = (identifiers) => {
|
|
8
|
+
const { radius, height, isDiameterGiven, isHollow, isBaseCircle } = identifiers;
|
|
9
|
+
return `Parmi les propositions suivantes, lesquelles peuvent être des sections planes d'un cylindre de hauteur $${height.frenchify()}\\ \\textrm{cm}$ et de ${isDiameterGiven ? "diamètre" : "rayon"} $${(isDiameterGiven ? 2 * radius : radius).frenchify()}\\ \\textrm{cm}$ ?
|
|
10
|
+
On va considérer que le cylindre est ${isHollow ? "creux" : "plein"}${isHollow
|
|
11
|
+
? isBaseCircle
|
|
12
|
+
? " et ouvert à chaque extrémité"
|
|
13
|
+
: " et fermé à chaque extrémité"
|
|
14
|
+
: ""}.`;
|
|
15
|
+
};
|
|
16
|
+
const getHint = (identifiers) => {
|
|
17
|
+
const { isHollow, isBaseCircle } = identifiers;
|
|
18
|
+
return `Visualise mentalement un cylindre ${isHollow ? "creux" : "plein"}${isHollow
|
|
19
|
+
? isBaseCircle
|
|
20
|
+
? " et ouvert à chaque extrémité"
|
|
21
|
+
: " et fermé à chaque extrémité"
|
|
22
|
+
: ""}.`;
|
|
23
|
+
};
|
|
24
|
+
const getCorrection = (identifiers) => {
|
|
25
|
+
const { radius, height, isHollow, isBaseCircle } = identifiers;
|
|
26
|
+
return `Les réponses possibles pour un cylindre ${isHollow ? "creux" : "plein"}${isHollow
|
|
27
|
+
? isBaseCircle
|
|
28
|
+
? " et ouvert à chaque extrémité"
|
|
29
|
+
: " et fermé à chaque extrémité"
|
|
30
|
+
: ""} de hauteur $${height} \\ \\textrm{cm}$ et de rayon $${radius} \\ \\textrm{cm}$ sont :
|
|
31
|
+
|
|
32
|
+
- un point si le plan passe seulement par un point d'une extrémité
|
|
33
|
+
- un segment si le plan est comme "posé" sur la paroi du cylindre
|
|
34
|
+
${(() => {
|
|
35
|
+
if (isHollow) {
|
|
36
|
+
if (isBaseCircle) {
|
|
37
|
+
return `- un cercle de rayon égal à $${radius} \\ \\textrm{cm}$ si le plan est perpendiculaire à l'axe de révolution du cylindre
|
|
38
|
+
- deux segments parallèles si le plan passe par l'axe de révolution du cylindre`;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
return `- un cercle de rayon égal à $${radius} \\ \\textrm{cm}$ si le plan est perpendiculaire à l'axe de révolution du cylindre
|
|
42
|
+
- un disque de rayon $${radius} \\ \\textrm{cm}$ si le plan est perpendiculaire à l'axe de révolution du cône et rencontre une des extrémités du cylindre
|
|
43
|
+
- un rectangle si le plan passe par l'axe de révolution du cylindre`;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
return `- un disque de rayon égal à $${radius} \\ \\textrm{cm}$ si le plan est perpendiculaire à l'axe de révolution du cylindre
|
|
48
|
+
- un rectangle plein si le plan passe par l'axe de révolution du cône`;
|
|
49
|
+
}
|
|
50
|
+
})()}`;
|
|
51
|
+
};
|
|
52
|
+
const getPropositions = (n, { answer, ...identifiers }) => {
|
|
53
|
+
const { radius, isHollow, isBaseCircle } = identifiers;
|
|
54
|
+
const propositions = [];
|
|
55
|
+
if (isHollow) {
|
|
56
|
+
const validPool = [
|
|
57
|
+
"un point",
|
|
58
|
+
"un segment",
|
|
59
|
+
...(isBaseCircle
|
|
60
|
+
? [
|
|
61
|
+
"deux segments parallèles",
|
|
62
|
+
//circle=radius
|
|
63
|
+
random([
|
|
64
|
+
`un cercle de rayon $${radius} \\ \\textrm{cm}$`,
|
|
65
|
+
`un cercle de diamètre $${2 * radius} \\ \\textrm{cm}$`,
|
|
66
|
+
]),
|
|
67
|
+
]
|
|
68
|
+
: [
|
|
69
|
+
"un rectangle",
|
|
70
|
+
//disk=radius
|
|
71
|
+
random([
|
|
72
|
+
`un disque de rayon $${radius} \\ \\textrm{cm}$`,
|
|
73
|
+
`un disque de diamètre $${2 * radius} \\ \\textrm{cm}$`,
|
|
74
|
+
]),
|
|
75
|
+
]),
|
|
76
|
+
];
|
|
77
|
+
const invalidPool = [
|
|
78
|
+
//circle>radius
|
|
79
|
+
random([
|
|
80
|
+
`un cercle de rayon $${randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
81
|
+
`un cercle de diamètre $${2 * randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
82
|
+
]),
|
|
83
|
+
...(isBaseCircle
|
|
84
|
+
? [
|
|
85
|
+
//disk=radius
|
|
86
|
+
random([
|
|
87
|
+
`un disque de rayon $${radius} \\ \\textrm{cm}$`,
|
|
88
|
+
`un disque de diamètre $${2 * radius} \\ \\textrm{cm}$`,
|
|
89
|
+
]),
|
|
90
|
+
]
|
|
91
|
+
: [
|
|
92
|
+
//circle=radius
|
|
93
|
+
random([
|
|
94
|
+
`un cercle de rayon $${radius} \\ \\textrm{cm}$`,
|
|
95
|
+
`un cercle de diamètre $${2 * radius} \\ \\textrm{cm}$`,
|
|
96
|
+
]),
|
|
97
|
+
]),
|
|
98
|
+
//disk<radius
|
|
99
|
+
random([
|
|
100
|
+
`un disque de rayon $${randint(1, radius)} \\ \\textrm{cm}$`,
|
|
101
|
+
`un disque de diamètre $${2 * randint(1, radius)} \\ \\textrm{cm}$`,
|
|
102
|
+
]),
|
|
103
|
+
//disk>radius
|
|
104
|
+
random([
|
|
105
|
+
`un disque de rayon $${randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
106
|
+
`un disque de diamètre $${2 * randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
107
|
+
]),
|
|
108
|
+
];
|
|
109
|
+
const invalidMiscPool = ["une droite", "un cône", "un cylindre"];
|
|
110
|
+
if (coinFlip() && validPool.length === 4) {
|
|
111
|
+
//jackpot
|
|
112
|
+
validPool.forEach((str) => {
|
|
113
|
+
addValidProp(propositions, str, "raw");
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
const nbValid = randint(1, validPool.length + 1);
|
|
118
|
+
const nbInvalid = n - nbValid;
|
|
119
|
+
randomMany(validPool, nbValid).forEach((str) => {
|
|
120
|
+
addValidProp(propositions, str, "raw");
|
|
121
|
+
});
|
|
122
|
+
if (probaFlip(0.2)) {
|
|
123
|
+
randomMany([...invalidPool, random(invalidMiscPool)], nbInvalid).forEach((str) => {
|
|
124
|
+
tryToAddWrongProp(propositions, str, "raw");
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
randomMany(invalidPool, nbInvalid).forEach((str) => {
|
|
129
|
+
tryToAddWrongProp(propositions, str, "raw");
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
const validPool = [
|
|
136
|
+
"un point",
|
|
137
|
+
"un segment",
|
|
138
|
+
"un rectangle",
|
|
139
|
+
//disk=radius
|
|
140
|
+
random([
|
|
141
|
+
`un disque de rayon $${radius} \\ \\textrm{cm}$`,
|
|
142
|
+
`un disque de diamètre $${2 * radius} \\ \\textrm{cm}$`,
|
|
143
|
+
]),
|
|
144
|
+
];
|
|
145
|
+
const invalidPool = [
|
|
146
|
+
//disk>radius
|
|
147
|
+
random([
|
|
148
|
+
`un disque de rayon $${randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
149
|
+
`un disque de diamètre $${2 * randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
150
|
+
]),
|
|
151
|
+
//circle=radius
|
|
152
|
+
random([
|
|
153
|
+
`un cercle de rayon $${radius} \\ \\textrm{cm}$`,
|
|
154
|
+
`un cercle de diamètre $${2 * radius} \\ \\textrm{cm}$`,
|
|
155
|
+
]),
|
|
156
|
+
//circle<radius
|
|
157
|
+
random([
|
|
158
|
+
`un cercle de rayon $${randint(1, radius)} \\ \\textrm{cm}$`,
|
|
159
|
+
`un cercle de diamètre $${2 * randint(1, radius)} \\ \\textrm{cm}$`,
|
|
160
|
+
]),
|
|
161
|
+
//circle>radius
|
|
162
|
+
random([
|
|
163
|
+
`un cercle de rayon $${randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
164
|
+
`un cercle de diamètre $${2 * randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
165
|
+
]),
|
|
166
|
+
];
|
|
167
|
+
const invalidMiscPool = ["une droite", "un cône", "un cylindre"];
|
|
168
|
+
if (coinFlip() && validPool.length === 4) {
|
|
169
|
+
//jackpot
|
|
170
|
+
validPool.forEach((str) => {
|
|
171
|
+
addValidProp(propositions, str, "raw");
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
const nbValid = randint(1, validPool.length + 1);
|
|
176
|
+
const nbInvalid = n - nbValid;
|
|
177
|
+
randomMany(validPool, nbValid).forEach((str) => {
|
|
178
|
+
addValidProp(propositions, str, "raw");
|
|
179
|
+
});
|
|
180
|
+
if (probaFlip(0.2)) {
|
|
181
|
+
randomMany([...invalidPool, random(invalidMiscPool)], nbInvalid).forEach((str) => {
|
|
182
|
+
tryToAddWrongProp(propositions, str, "raw");
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
randomMany(invalidPool, nbInvalid).forEach((str) => {
|
|
187
|
+
tryToAddWrongProp(propositions, str, "raw");
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return shuffleProps(propositions, n);
|
|
193
|
+
};
|
|
194
|
+
const getRecognizeSectionsOfCylinderQuestion = () => {
|
|
195
|
+
const radius = randint(5, 21);
|
|
196
|
+
const height = randint(5, 21);
|
|
197
|
+
const isDiameterGiven = coinFlip();
|
|
198
|
+
const isHollow = coinFlip();
|
|
199
|
+
const isBaseCircle = isHollow && coinFlip();
|
|
200
|
+
const identifiers = {
|
|
201
|
+
radius,
|
|
202
|
+
height,
|
|
203
|
+
isDiameterGiven,
|
|
204
|
+
isHollow,
|
|
205
|
+
isBaseCircle,
|
|
206
|
+
};
|
|
207
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
208
|
+
};
|
|
209
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
210
|
+
const question = {
|
|
211
|
+
instruction: getInstruction(identifiers),
|
|
212
|
+
hint: getHint(identifiers),
|
|
213
|
+
correction: getCorrection(identifiers),
|
|
214
|
+
keys: [],
|
|
215
|
+
answerFormat: "raw",
|
|
216
|
+
identifiers,
|
|
217
|
+
};
|
|
218
|
+
return question;
|
|
219
|
+
};
|
|
220
|
+
export const recognizeSectionsOfCylinder = {
|
|
221
|
+
id: "recognizeSectionsOfCylinder",
|
|
222
|
+
connector: "=",
|
|
223
|
+
label: "Reconnaître la nature d'une section de cylindre",
|
|
224
|
+
isSingleStep: true,
|
|
225
|
+
generator: (nb) => getDistinctQuestions(getRecognizeSectionsOfCylinderQuestion, nb),
|
|
226
|
+
qcmTimer: 60,
|
|
227
|
+
freeTimer: 60,
|
|
228
|
+
getPropositions,
|
|
229
|
+
subject: "Mathématiques",
|
|
230
|
+
getQuestionFromIdentifiers,
|
|
231
|
+
answerType: "QCM",
|
|
232
|
+
isQCM: true,
|
|
233
|
+
getHint,
|
|
234
|
+
getCorrection,
|
|
235
|
+
hasHintAndCorrection: true,
|
|
236
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
nothing: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare const recognizeSectionsOfRectangularPrism: Exercise<Identifiers>;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=recognizeSectionsOfRectangularPrism.d.ts.map
|
package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfRectangularPrism.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recognizeSectionsOfRectangularPrism.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/sections/recognizeSectionsOfRectangularPrism.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAKrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAwFF,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CAAC,WAAW,CAoBrE,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
3
|
+
import { probaFlip } from "../../../../utils/alea/probaFlip.js";
|
|
4
|
+
import { random, randomMany } from "../../../../utils/alea/random.js";
|
|
5
|
+
const getInstruction = () => {
|
|
6
|
+
return `Parmi les propositions suivantes, lesquelles peuvent être des sections planes d'un pavé droit ?`;
|
|
7
|
+
};
|
|
8
|
+
const getHint = () => {
|
|
9
|
+
return `Visualise mentalement un pavé droit et fait passer le plan comme si le pavé droit passait un scanner.
|
|
10
|
+
Tu peux ensuite changer la position du pavé droit et recommencer.`;
|
|
11
|
+
};
|
|
12
|
+
const getCorrection = () => {
|
|
13
|
+
return `Des réponses possibles pour un pavé droit sont :
|
|
14
|
+
|
|
15
|
+
- un point si le plan passe seulement par un sommet du pavé droit
|
|
16
|
+
- un segment si le plan est comme "posé" sur une arète du pavé droit
|
|
17
|
+
- un triangle si le plan est proche d'un sommet du pavé droit
|
|
18
|
+
- un trapèze
|
|
19
|
+
- un rectangle`;
|
|
20
|
+
};
|
|
21
|
+
const getPropositions = (n) => {
|
|
22
|
+
const propositions = [];
|
|
23
|
+
const validPool = [
|
|
24
|
+
"un point",
|
|
25
|
+
"un segment",
|
|
26
|
+
"un triangle",
|
|
27
|
+
"un trapèze",
|
|
28
|
+
"un rectangle",
|
|
29
|
+
];
|
|
30
|
+
const invalidPool = ["un cercle", "un disque", "deux segments parallèles"];
|
|
31
|
+
const invalidMiscPool = ["une droite", "un cône", "un cylindre"];
|
|
32
|
+
if (probaFlip(0.07) && validPool.length >= 4) {
|
|
33
|
+
//jackpot
|
|
34
|
+
validPool.forEach((str) => {
|
|
35
|
+
addValidProp(propositions, str, "raw");
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
const nbValid = randint(1, validPool.length);
|
|
40
|
+
const nbInvalid = n - nbValid;
|
|
41
|
+
randomMany(validPool, nbValid).forEach((str) => {
|
|
42
|
+
addValidProp(propositions, str, "raw");
|
|
43
|
+
});
|
|
44
|
+
if (probaFlip(0.2)) {
|
|
45
|
+
randomMany([...invalidPool, random(invalidMiscPool)], nbInvalid).forEach((str) => {
|
|
46
|
+
tryToAddWrongProp(propositions, str, "raw");
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
randomMany(invalidPool, nbInvalid).forEach((str) => {
|
|
51
|
+
tryToAddWrongProp(propositions, str, "raw");
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return shuffleProps(propositions, n);
|
|
56
|
+
};
|
|
57
|
+
const getRecognizeSectionsOfRectangularPrismQuestion = () => {
|
|
58
|
+
const identifiers = {
|
|
59
|
+
nothing: true,
|
|
60
|
+
};
|
|
61
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
62
|
+
};
|
|
63
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
64
|
+
const question = {
|
|
65
|
+
instruction: getInstruction(identifiers),
|
|
66
|
+
hint: getHint(identifiers),
|
|
67
|
+
correction: getCorrection(identifiers),
|
|
68
|
+
keys: [],
|
|
69
|
+
answerFormat: "raw",
|
|
70
|
+
identifiers,
|
|
71
|
+
};
|
|
72
|
+
return question;
|
|
73
|
+
};
|
|
74
|
+
export const recognizeSectionsOfRectangularPrism = {
|
|
75
|
+
id: "recognizeSectionsOfRectangularPrism",
|
|
76
|
+
connector: "=",
|
|
77
|
+
label: "Reconnaître la nature d'une section de pavé droit",
|
|
78
|
+
isSingleStep: true,
|
|
79
|
+
generator: (nb) =>
|
|
80
|
+
// getDistinctQuestions(getRecognizeSectionsOfRectangularPrismQuestion, nb),
|
|
81
|
+
[...Array(nb).keys()].map(() => getRecognizeSectionsOfRectangularPrismQuestion()),
|
|
82
|
+
qcmTimer: 60,
|
|
83
|
+
freeTimer: 60,
|
|
84
|
+
getPropositions,
|
|
85
|
+
subject: "Mathématiques",
|
|
86
|
+
getQuestionFromIdentifiers,
|
|
87
|
+
answerType: "QCM",
|
|
88
|
+
isQCM: true,
|
|
89
|
+
getHint,
|
|
90
|
+
getCorrection,
|
|
91
|
+
hasHintAndCorrection: true,
|
|
92
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
strOfX: string;
|
|
4
|
+
radius: number;
|
|
5
|
+
isDiameterGiven: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const recognizeSectionsOfSphereOrBall: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=recognizeSectionsOfSphereOrBall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recognizeSectionsOfSphereOrBall.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/sections/recognizeSectionsOfSphereOrBall.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAyQF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAiBjE,CAAC"}
|