math-exercises 3.0.213 → 3.0.215
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/math/arithmetic/findLeftInHugeNumberDivision.d.ts +9 -0
- package/lib/exercises/math/arithmetic/findLeftInHugeNumberDivision.d.ts.map +1 -0
- package/lib/exercises/math/arithmetic/findLeftInHugeNumberDivision.js +194 -0
- package/lib/exercises/math/arithmetic/findMissingNumberToMakeNumberDivisibleBy9.d.ts +8 -0
- package/lib/exercises/math/arithmetic/findMissingNumberToMakeNumberDivisibleBy9.d.ts.map +1 -0
- package/lib/exercises/math/arithmetic/findMissingNumberToMakeNumberDivisibleBy9.js +121 -0
- package/lib/exercises/math/arithmetic/hasDiophantianEquationSolution.js +4 -4
- package/lib/exercises/math/arithmetic/index.d.ts +7 -0
- package/lib/exercises/math/arithmetic/index.d.ts.map +1 -1
- package/lib/exercises/math/arithmetic/index.js +7 -0
- package/lib/exercises/math/arithmetic/isBigNumberPrime.d.ts +7 -0
- package/lib/exercises/math/arithmetic/isBigNumberPrime.d.ts.map +1 -0
- package/lib/exercises/math/arithmetic/isBigNumberPrime.js +107 -0
- package/lib/exercises/math/arithmetic/numberOfEndingZerosOfBigProduct.d.ts +8 -0
- package/lib/exercises/math/arithmetic/numberOfEndingZerosOfBigProduct.d.ts.map +1 -0
- package/lib/exercises/math/arithmetic/numberOfEndingZerosOfBigProduct.js +139 -0
- package/lib/exercises/math/arithmetic/pgcdFromEuclid.d.ts +8 -0
- package/lib/exercises/math/arithmetic/pgcdFromEuclid.d.ts.map +1 -0
- package/lib/exercises/math/arithmetic/pgcdFromEuclid.js +123 -0
- package/lib/exercises/math/arithmetic/solveDiophantianEquationByUsingPrimality.d.ts +7 -0
- package/lib/exercises/math/arithmetic/solveDiophantianEquationByUsingPrimality.d.ts.map +1 -0
- package/lib/exercises/math/arithmetic/solveDiophantianEquationByUsingPrimality.js +117 -0
- package/lib/exercises/math/arithmetic/whichDayInXDays.d.ts +8 -0
- package/lib/exercises/math/arithmetic/whichDayInXDays.d.ts.map +1 -0
- package/lib/exercises/math/arithmetic/whichDayInXDays.js +81 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumFillInTheBlank.d.ts +15 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumFillInTheBlank.d.ts.map +1 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumFillInTheBlank.js +256 -0
- package/lib/exercises/math/calcul/fractions/index.d.ts +1 -0
- package/lib/exercises/math/calcul/fractions/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/index.js +1 -0
- package/lib/exercises/math/calcul/index.d.ts +1 -0
- package/lib/exercises/math/calcul/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/index.js +1 -0
- package/lib/exercises/math/calcul/mentalCaluls/index.d.ts +3 -0
- package/lib/exercises/math/calcul/mentalCaluls/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/index.js +3 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplication101AndFriends.d.ts +10 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplication101AndFriends.d.ts.map +1 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplication101AndFriends.js +264 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplication11AndFriends.d.ts +10 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplication11AndFriends.d.ts.map +1 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplication11AndFriends.js +264 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationTable.d.ts +11 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationTable.d.ts.map +1 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationTable.js +141 -0
- package/lib/exercises/math/calcul/ratio/index.d.ts +1 -0
- package/lib/exercises/math/calcul/ratio/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ratio/index.js +1 -0
- package/lib/exercises/math/calcul/ratio/partsUsingRatio.d.ts +13 -0
- package/lib/exercises/math/calcul/ratio/partsUsingRatio.d.ts.map +1 -0
- package/lib/exercises/math/calcul/ratio/partsUsingRatio.js +237 -0
- package/lib/exercises/math/calcul/relatives/index.d.ts +2 -0
- package/lib/exercises/math/calcul/relatives/index.d.ts.map +1 -0
- package/lib/exercises/math/calcul/relatives/index.js +1 -0
- package/lib/exercises/math/calcul/relatives/relativesAddAndSub.d.ts +17 -0
- package/lib/exercises/math/calcul/relatives/relativesAddAndSub.d.ts.map +1 -0
- package/lib/exercises/math/calcul/relatives/relativesAddAndSub.js +448 -0
- package/lib/exercises/math/calculLitteral/factorisation/factoByXK.d.ts +10 -0
- package/lib/exercises/math/calculLitteral/factorisation/factoByXK.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/factorisation/factoByXK.js +190 -0
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts +1 -0
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/index.js +1 -0
- package/lib/exercises/math/complex/algebraic/addComplex.d.ts +10 -0
- package/lib/exercises/math/complex/algebraic/addComplex.d.ts.map +1 -0
- package/lib/exercises/math/complex/algebraic/addComplex.js +125 -0
- package/lib/exercises/math/complex/algebraic/conjugateComplex.d.ts +8 -0
- package/lib/exercises/math/complex/algebraic/conjugateComplex.d.ts.map +1 -0
- package/lib/exercises/math/complex/algebraic/conjugateComplex.js +105 -0
- package/lib/exercises/math/complex/algebraic/conjugateDivideComplex.d.ts +8 -0
- package/lib/exercises/math/complex/algebraic/conjugateDivideComplex.d.ts.map +1 -0
- package/lib/exercises/math/complex/algebraic/conjugateDivideComplex.js +137 -0
- package/lib/exercises/math/complex/algebraic/conjugateMultiplyComplex.d.ts +8 -0
- package/lib/exercises/math/complex/algebraic/conjugateMultiplyComplex.d.ts.map +1 -0
- package/lib/exercises/math/complex/algebraic/conjugateMultiplyComplex.js +116 -0
- package/lib/exercises/math/complex/algebraic/divideComplex.d.ts +8 -0
- package/lib/exercises/math/complex/algebraic/divideComplex.d.ts.map +1 -0
- package/lib/exercises/math/complex/algebraic/divideComplex.js +128 -0
- package/lib/exercises/math/complex/algebraic/index.d.ts +11 -0
- package/lib/exercises/math/complex/algebraic/index.d.ts.map +1 -0
- package/lib/exercises/math/complex/algebraic/index.js +10 -0
- package/lib/exercises/math/complex/algebraic/inverseComplex.d.ts +8 -0
- package/lib/exercises/math/complex/algebraic/inverseComplex.d.ts.map +1 -0
- package/lib/exercises/math/complex/algebraic/inverseComplex.js +95 -0
- package/lib/exercises/math/complex/algebraic/linearCombinaisonComplex.d.ts +10 -0
- package/lib/exercises/math/complex/algebraic/linearCombinaisonComplex.d.ts.map +1 -0
- package/lib/exercises/math/complex/algebraic/linearCombinaisonComplex.js +105 -0
- package/lib/exercises/math/complex/algebraic/moduloFromAlgebraicComplex.d.ts +8 -0
- package/lib/exercises/math/complex/algebraic/moduloFromAlgebraicComplex.d.ts.map +1 -0
- package/lib/exercises/math/complex/algebraic/moduloFromAlgebraicComplex.js +93 -0
- package/lib/exercises/math/complex/algebraic/mutiplyComplex.d.ts +8 -0
- package/lib/exercises/math/complex/algebraic/mutiplyComplex.d.ts.map +1 -0
- package/lib/exercises/math/complex/algebraic/mutiplyComplex.js +106 -0
- package/lib/exercises/math/complex/algebraic/reAndIm.d.ts +9 -0
- package/lib/exercises/math/complex/algebraic/reAndIm.d.ts.map +1 -0
- package/lib/exercises/math/complex/algebraic/reAndIm.js +92 -0
- package/lib/exercises/math/complex/geometric/complexAlgebraicFromModuloAndArg.d.ts +9 -0
- package/lib/exercises/math/complex/geometric/complexAlgebraicFromModuloAndArg.d.ts.map +1 -0
- package/lib/exercises/math/complex/geometric/complexAlgebraicFromModuloAndArg.js +151 -0
- package/lib/exercises/math/complex/geometric/complexDistance.d.ts +11 -0
- package/lib/exercises/math/complex/geometric/complexDistance.d.ts.map +1 -0
- package/lib/exercises/math/complex/geometric/complexDistance.js +125 -0
- package/lib/exercises/math/complex/geometric/complexGeomAffixAlgFromPoint.d.ts +9 -0
- package/lib/exercises/math/complex/geometric/complexGeomAffixAlgFromPoint.d.ts.map +1 -0
- package/lib/exercises/math/complex/geometric/complexGeomAffixAlgFromPoint.js +326 -0
- package/lib/exercises/math/complex/geometric/complexGeomAffixExpFromCenteredRegularPolygon.d.ts +10 -0
- package/lib/exercises/math/complex/geometric/complexGeomAffixExpFromCenteredRegularPolygon.d.ts.map +1 -0
- package/lib/exercises/math/complex/geometric/complexGeomAffixExpFromCenteredRegularPolygon.js +459 -0
- package/lib/exercises/math/complex/geometric/complexGeomAffixExpFromPoint.d.ts +14 -0
- package/lib/exercises/math/complex/geometric/complexGeomAffixExpFromPoint.d.ts.map +1 -0
- package/lib/exercises/math/complex/geometric/complexGeomAffixExpFromPoint.js +539 -0
- package/lib/exercises/math/complex/geometric/complexGeomAffixTrigFromPoint.d.ts +13 -0
- package/lib/exercises/math/complex/geometric/complexGeomAffixTrigFromPoint.d.ts.map +1 -0
- package/lib/exercises/math/complex/geometric/complexGeomAffixTrigFromPoint.js +485 -0
- package/lib/exercises/math/complex/geometric/complexGeomApproxOfCosArgOrSinArgFromPointAndAffixTrig.d.ts +12 -0
- package/lib/exercises/math/complex/geometric/complexGeomApproxOfCosArgOrSinArgFromPointAndAffixTrig.d.ts.map +1 -0
- package/lib/exercises/math/complex/geometric/complexGeomApproxOfCosArgOrSinArgFromPointAndAffixTrig.js +224 -0
- package/lib/exercises/math/complex/geometric/complexGeomArgumentOfFracCBABFromFigure.d.ts +11 -0
- package/lib/exercises/math/complex/geometric/complexGeomArgumentOfFracCBABFromFigure.d.ts.map +1 -0
- package/lib/exercises/math/complex/geometric/complexGeomArgumentOfFracCBABFromFigure.js +448 -0
- package/lib/exercises/math/complex/geometric/complexGeomFindPointFromAffixExp.d.ts +11 -0
- package/lib/exercises/math/complex/geometric/complexGeomFindPointFromAffixExp.d.ts.map +1 -0
- package/lib/exercises/math/complex/geometric/complexGeomFindPointFromAffixExp.js +223 -0
- package/lib/exercises/math/complex/geometric/complexGeomFindPointFromPowerOfUnitRootFromFigure.d.ts +11 -0
- package/lib/exercises/math/complex/geometric/complexGeomFindPointFromPowerOfUnitRootFromFigure.d.ts.map +1 -0
- package/lib/exercises/math/complex/geometric/complexGeomFindPointFromPowerOfUnitRootFromFigure.js +348 -0
- package/lib/exercises/math/complex/geometric/complexGeomPlaceAffixPoint.d.ts +8 -0
- package/lib/exercises/math/complex/geometric/complexGeomPlaceAffixPoint.d.ts.map +1 -0
- package/lib/exercises/math/complex/geometric/complexGeomPlaceAffixPoint.js +86 -0
- package/lib/exercises/math/complex/geometric/complexGeomPlacePointFromZAPlusZ.d.ts +11 -0
- package/lib/exercises/math/complex/geometric/complexGeomPlacePointFromZAPlusZ.d.ts.map +1 -0
- package/lib/exercises/math/complex/geometric/complexGeomPlacePointFromZAPlusZ.js +311 -0
- package/lib/exercises/math/complex/geometric/complexGeomPlacePointFromZATimesZ.d.ts +11 -0
- package/lib/exercises/math/complex/geometric/complexGeomPlacePointFromZATimesZ.d.ts.map +1 -0
- package/lib/exercises/math/complex/geometric/complexGeomPlacePointFromZATimesZ.js +345 -0
- package/lib/exercises/math/complex/geometric/complexGeomPlacePointFromZATransformed.d.ts +16 -0
- package/lib/exercises/math/complex/geometric/complexGeomPlacePointFromZATransformed.d.ts.map +1 -0
- package/lib/exercises/math/complex/geometric/complexGeomPlacePointFromZATransformed.js +729 -0
- package/lib/exercises/math/complex/geometric/complexGeomPlacePointWithAffixInU.d.ts +11 -0
- package/lib/exercises/math/complex/geometric/complexGeomPlacePointWithAffixInU.d.ts.map +1 -0
- package/lib/exercises/math/complex/geometric/complexGeomPlacePointWithAffixInU.js +253 -0
- package/lib/exercises/math/complex/geometric/index.d.ts +12 -0
- package/lib/exercises/math/complex/geometric/index.d.ts.map +1 -0
- package/lib/exercises/math/complex/geometric/index.js +19 -0
- package/lib/exercises/math/complex/index.d.ts +4 -10
- package/lib/exercises/math/complex/index.d.ts.map +1 -1
- package/lib/exercises/math/complex/index.js +4 -11
- package/lib/exercises/math/complex/polynomials/factorizePolynomialInC.d.ts +10 -0
- package/lib/exercises/math/complex/polynomials/factorizePolynomialInC.d.ts.map +1 -0
- package/lib/exercises/math/complex/polynomials/factorizePolynomialInC.js +176 -0
- package/lib/exercises/math/complex/polynomials/index.d.ts +4 -0
- package/lib/exercises/math/complex/polynomials/index.d.ts.map +1 -0
- package/lib/exercises/math/complex/polynomials/index.js +3 -0
- package/lib/exercises/math/complex/polynomials/solveSecondDegreeInComplex.d.ts +10 -0
- package/lib/exercises/math/complex/polynomials/solveSecondDegreeInComplex.d.ts.map +1 -0
- package/lib/exercises/math/complex/polynomials/solveSecondDegreeInComplex.js +190 -0
- package/lib/exercises/math/complex/polynomials/solveZSquareEqualsA.d.ts +11 -0
- package/lib/exercises/math/complex/polynomials/solveZSquareEqualsA.d.ts.map +1 -0
- package/lib/exercises/math/complex/polynomials/solveZSquareEqualsA.js +158 -0
- package/lib/exercises/math/complex/unitRoots/giveNUnitRoot.d.ts +7 -0
- package/lib/exercises/math/complex/unitRoots/giveNUnitRoot.d.ts.map +1 -0
- package/lib/exercises/math/complex/unitRoots/giveNUnitRoot.js +122 -0
- package/lib/exercises/math/complex/unitRoots/giveOneSolutionToComplexPowNEqualsOne.d.ts +8 -0
- package/lib/exercises/math/complex/unitRoots/giveOneSolutionToComplexPowNEqualsOne.d.ts.map +1 -0
- package/lib/exercises/math/complex/unitRoots/giveOneSolutionToComplexPowNEqualsOne.js +138 -0
- package/lib/exercises/math/complex/unitRoots/index.d.ts +3 -0
- package/lib/exercises/math/complex/unitRoots/index.d.ts.map +1 -0
- package/lib/exercises/math/complex/unitRoots/index.js +2 -0
- package/lib/exercises/math/conversion/clock/clockReading.d.ts +12 -0
- package/lib/exercises/math/conversion/clock/clockReading.d.ts.map +1 -0
- package/lib/exercises/math/conversion/clock/clockReading.js +385 -0
- package/lib/exercises/math/conversion/clock/clockReadingPlusTimeOperation.d.ts +2 -0
- package/lib/exercises/math/conversion/clock/clockReadingPlusTimeOperation.d.ts.map +1 -0
- package/lib/exercises/math/conversion/clock/clockReadingPlusTimeOperation.js +521 -0
- package/lib/exercises/math/conversion/clock/clockWritingByManipulatingNeedles.d.ts +2 -0
- package/lib/exercises/math/conversion/clock/clockWritingByManipulatingNeedles.d.ts.map +1 -0
- package/lib/exercises/math/conversion/clock/clockWritingByManipulatingNeedles.js +359 -0
- package/lib/exercises/math/conversion/clock/dateTimeOperationAdd.d.ts +16 -0
- package/lib/exercises/math/conversion/clock/dateTimeOperationAdd.d.ts.map +1 -0
- package/lib/exercises/math/conversion/clock/dateTimeOperationAdd.js +319 -0
- package/lib/exercises/math/conversion/clock/index.d.ts +3 -0
- package/lib/exercises/math/conversion/clock/index.d.ts.map +1 -0
- package/lib/exercises/math/conversion/clock/index.js +4 -0
- package/lib/exercises/math/conversion/index.d.ts +1 -0
- package/lib/exercises/math/conversion/index.d.ts.map +1 -1
- package/lib/exercises/math/conversion/index.js +1 -0
- package/lib/exercises/math/geometry/angles/angleNatureFromFigure.d.ts +11 -0
- package/lib/exercises/math/geometry/angles/angleNatureFromFigure.d.ts.map +1 -0
- package/lib/exercises/math/geometry/angles/angleNatureFromFigure.js +233 -0
- package/lib/exercises/math/geometry/angles/angleNatureFromMeasure.d.ts +10 -0
- package/lib/exercises/math/geometry/angles/angleNatureFromMeasure.d.ts.map +1 -0
- package/lib/exercises/math/geometry/angles/angleNatureFromMeasure.js +137 -0
- package/lib/exercises/math/geometry/angles/index.d.ts +2 -0
- package/lib/exercises/math/geometry/angles/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/angles/index.js +2 -0
- package/lib/exercises/math/geometry/circles/buildCircleFromRadius.d.ts +9 -0
- package/lib/exercises/math/geometry/circles/buildCircleFromRadius.d.ts.map +1 -0
- package/lib/exercises/math/geometry/circles/buildCircleFromRadius.js +187 -0
- package/lib/exercises/math/geometry/circles/index.d.ts +1 -0
- package/lib/exercises/math/geometry/circles/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/circles/index.js +1 -0
- package/lib/exercises/math/geometry/lines/buildParallelFromLineAndPoint.d.ts +11 -0
- package/lib/exercises/math/geometry/lines/buildParallelFromLineAndPoint.d.ts.map +1 -0
- package/lib/exercises/math/geometry/lines/buildParallelFromLineAndPoint.js +154 -0
- package/lib/exercises/math/geometry/lines/buildPerpendicularFromLineAndPoint.d.ts +11 -0
- package/lib/exercises/math/geometry/lines/buildPerpendicularFromLineAndPoint.d.ts.map +1 -0
- package/lib/exercises/math/geometry/lines/buildPerpendicularFromLineAndPoint.js +157 -0
- package/lib/exercises/math/geometry/lines/index.d.ts +2 -0
- package/lib/exercises/math/geometry/lines/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/index.js +2 -0
- package/lib/exercises/math/geometry/triangles/index.d.ts +2 -0
- package/lib/exercises/math/geometry/triangles/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/triangles/index.js +2 -1
- package/lib/exercises/math/geometry/triangles/traceHeightInTriangle.d.ts +13 -0
- package/lib/exercises/math/geometry/triangles/traceHeightInTriangle.d.ts.map +1 -0
- package/lib/exercises/math/geometry/triangles/traceHeightInTriangle.js +271 -0
- package/lib/exercises/math/geometry/triangles/traceMedianInTriangle.d.ts +8 -0
- package/lib/exercises/math/geometry/triangles/traceMedianInTriangle.d.ts.map +1 -1
- package/lib/exercises/math/geometry/triangles/traceMedianInTriangle.js +284 -53
- package/lib/exercises/math/geometry/vectors/constructions/index.d.ts +1 -0
- package/lib/exercises/math/geometry/vectors/constructions/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/constructions/index.js +1 -0
- package/lib/exercises/math/geometry/vectors/constructions/traceVectorSumFromVecs.d.ts +8 -0
- package/lib/exercises/math/geometry/vectors/constructions/traceVectorSumFromVecs.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/constructions/traceVectorSumFromVecs.js +165 -0
- package/lib/exercises/math/geometry/volumes/index.d.ts +1 -0
- package/lib/exercises/math/geometry/volumes/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/volumes/index.js +1 -0
- package/lib/exercises/math/geometry/volumes/volumeOfCylinder.d.ts +8 -0
- package/lib/exercises/math/geometry/volumes/volumeOfCylinder.d.ts.map +1 -0
- package/lib/exercises/math/geometry/volumes/volumeOfCylinder.js +157 -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/basis/spaceSegmentLengthInRectangularPrism.d.ts +18 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceSegmentLengthInRectangularPrism.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceSegmentLengthInRectangularPrism.js +538 -0
- package/lib/exercises/math/trigonometry/formulas/trigoAdditionFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/formulas/trigoAdditionFormulaUsage.js +6 -5
- package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaCalcul.js +1 -1
- package/lib/exercises/utils/geogebra/toolBarConstructor.d.ts +1 -0
- package/lib/exercises/utils/geogebra/toolBarConstructor.d.ts.map +1 -1
- package/lib/exercises/utils/geogebra/toolBarConstructor.js +2 -0
- package/lib/geogebra/parsers/geogebraParser.d.ts +3 -0
- package/lib/geogebra/parsers/geogebraParser.d.ts.map +1 -1
- package/lib/geogebra/parsers/geogebraParser.js +27 -0
- package/lib/index.d.ts +213 -23
- package/lib/index.d.ts.map +1 -1
- package/lib/latexTester.js +2 -0
- package/lib/math/geometry/angle.d.ts.map +1 -1
- package/lib/math/geometry/angle.js +3 -0
- package/lib/math/geometry/segment.d.ts +1 -1
- package/lib/math/geometry/segment.d.ts.map +1 -1
- package/lib/math/geometry/segment.js +5 -2
- package/lib/math/utils/geometry/angleBetweenPoints.d.ts +4 -0
- package/lib/math/utils/geometry/angleBetweenPoints.d.ts.map +1 -0
- package/lib/math/utils/geometry/angleBetweenPoints.js +58 -0
- package/lib/math/utils/geometry/angleNWSE.d.ts +3 -0
- package/lib/math/utils/geometry/angleNWSE.d.ts.map +1 -0
- package/lib/math/utils/geometry/angleNWSE.js +56 -0
- package/lib/tests/singleExo.test.d.ts.map +1 -1
- package/lib/tests/singleExo.test.js +2 -2
- package/lib/utils/strings/frenchDays.d.ts +2 -0
- package/lib/utils/strings/frenchDays.d.ts.map +1 -0
- package/lib/utils/strings/frenchDays.js +9 -0
- package/package.json +1 -1
|
@@ -0,0 +1,521 @@
|
|
|
1
|
+
// import {
|
|
2
|
+
// Exercise,
|
|
3
|
+
// Proposition,
|
|
4
|
+
// QCMGenerator,
|
|
5
|
+
// Question,
|
|
6
|
+
// QuestionGenerator,
|
|
7
|
+
// VEA,
|
|
8
|
+
// addValidProp,
|
|
9
|
+
// shuffleProps,
|
|
10
|
+
// tryToAddWrongProp,
|
|
11
|
+
// GetAnswer,
|
|
12
|
+
// GetHint,
|
|
13
|
+
// GetCorrection,
|
|
14
|
+
// GetInstruction,
|
|
15
|
+
// GetKeys,
|
|
16
|
+
// GetGGBOptions,
|
|
17
|
+
// GetQuestionFromIdentifiers,
|
|
18
|
+
// propWhile,
|
|
19
|
+
// GeneratorOption,
|
|
20
|
+
// GeneratorOptionTarget,
|
|
21
|
+
// GeneratorOptionType,
|
|
22
|
+
// } from "../../../../exercises/exercise.js";
|
|
23
|
+
// import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
24
|
+
// import { defaultArrayedOptsWhereNeeded } from "../../../../exercises/utils/options/arrayedOptions.js";
|
|
25
|
+
// import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
|
|
26
|
+
// import { Point, PointConstructor } from "../../../../math/geometry/point.js";
|
|
27
|
+
// import { Vector } from "../../../../math/geometry/vector.js";
|
|
28
|
+
// import { randint } from "../../../../math/utils/random/randint.js";
|
|
29
|
+
// import { round } from "../../../../math/utils/round.js";
|
|
30
|
+
// import { PiNode } from "../../../../tree/nodes/numbers/piNode.js";
|
|
31
|
+
// import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
32
|
+
// import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
33
|
+
// import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
34
|
+
// import { probaLawFlip } from "../../../../utils/alea/probaLawFlip.js";
|
|
35
|
+
// import { random } from "../../../../utils/alea/random.js";
|
|
36
|
+
// import { zip } from "../../../../utils/arrays/arrayZip.js";
|
|
37
|
+
// import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
38
|
+
export {};
|
|
39
|
+
// const _degreesToRadians = (angleInDegrees: number, precision: number) => {
|
|
40
|
+
// const oneOver180 = 0.00555555555555555;
|
|
41
|
+
// return round(
|
|
42
|
+
// multiply(multiply(angleInDegrees, PiNode), oneOver180).evaluate(),
|
|
43
|
+
// precision,
|
|
44
|
+
// );
|
|
45
|
+
// };
|
|
46
|
+
// const rotateVector = (vec: Vector, angle: number, name: string) => {
|
|
47
|
+
// //x' = cos(t)*x -sin(t)*y
|
|
48
|
+
// //y' = sin(t)*x + cos(t)*y
|
|
49
|
+
// const cos = Math.cos(angle);
|
|
50
|
+
// const sin = Math.sin(angle);
|
|
51
|
+
// return new Vector(
|
|
52
|
+
// name,
|
|
53
|
+
// substract(multiply(cos, vec.x), multiply(sin, vec.y)).evaluate().toTree(),
|
|
54
|
+
// add(multiply(sin, vec.x), multiply(cos, vec.y)).evaluate().toTree(),
|
|
55
|
+
// );
|
|
56
|
+
// };
|
|
57
|
+
// const rotatePoint = (
|
|
58
|
+
// target: Point,
|
|
59
|
+
// angle: number,
|
|
60
|
+
// center: Point,
|
|
61
|
+
// name: string,
|
|
62
|
+
// precision: number | undefined = 2,
|
|
63
|
+
// ) => {
|
|
64
|
+
// const vSrc = createVector(center, target, "vSrc", precision);
|
|
65
|
+
// const vRotated = rotateVector(vSrc, angle, "vRotated");
|
|
66
|
+
// return createPoint(
|
|
67
|
+
// add(center.x, vRotated.x).evaluate(),
|
|
68
|
+
// add(center.y, vRotated.y).evaluate(),
|
|
69
|
+
// name,
|
|
70
|
+
// precision,
|
|
71
|
+
// );
|
|
72
|
+
// };
|
|
73
|
+
// const createVector = (
|
|
74
|
+
// from: Point,
|
|
75
|
+
// to: Point,
|
|
76
|
+
// name: string,
|
|
77
|
+
// precision: number | undefined = 5,
|
|
78
|
+
// ) => {
|
|
79
|
+
// return new Vector(
|
|
80
|
+
// name,
|
|
81
|
+
// round(substract(to.x, from.x).evaluate(), precision).toTree(),
|
|
82
|
+
// round(substract(to.y, from.y).evaluate(), precision).toTree(),
|
|
83
|
+
// );
|
|
84
|
+
// };
|
|
85
|
+
// const createPoint = (
|
|
86
|
+
// x: number,
|
|
87
|
+
// y: number,
|
|
88
|
+
// name: string,
|
|
89
|
+
// precision: number | undefined = 5,
|
|
90
|
+
// ) => {
|
|
91
|
+
// return new Point(name, round(x, precision), round(y, precision));
|
|
92
|
+
// };
|
|
93
|
+
// /************/
|
|
94
|
+
// type Time = {
|
|
95
|
+
// hours: number;
|
|
96
|
+
// minutes: number;
|
|
97
|
+
// };
|
|
98
|
+
// type Identifiers = {
|
|
99
|
+
// time1: Time;
|
|
100
|
+
// time2?: Time;
|
|
101
|
+
// duration?: Time;
|
|
102
|
+
// qType: string;
|
|
103
|
+
// opType: string;
|
|
104
|
+
// timeDisplayType1: string;
|
|
105
|
+
// timeDisplayType2: string;
|
|
106
|
+
// };
|
|
107
|
+
// const getHydrated = (identifiers: Identifiers) => {
|
|
108
|
+
// const { time1, time2, duration, qType, opType } = identifiers;
|
|
109
|
+
// const dictHydratedClock = (() => {
|
|
110
|
+
// const {hours, minutes} = timeOnClock;
|
|
111
|
+
// const isExactlyNoon = hours === 12 && minutes === 0;
|
|
112
|
+
// const strAMPM = (() => {
|
|
113
|
+
// if (minutes !== 0) {
|
|
114
|
+
// if (hours < 12) {
|
|
115
|
+
// return "Nous sommes avant midi";
|
|
116
|
+
// } else {
|
|
117
|
+
// return "Nous sommes après midi";
|
|
118
|
+
// }
|
|
119
|
+
// } else {
|
|
120
|
+
// if (hours === 0) {
|
|
121
|
+
// return "Nous sommes avant midi (il n'est pas midi).";
|
|
122
|
+
// } else if (hours === 24) {
|
|
123
|
+
// return "Nous sommes après midi (il n'est pas midi).";
|
|
124
|
+
// } else {
|
|
125
|
+
// return "Nous sommes en pleine journée.";
|
|
126
|
+
// }
|
|
127
|
+
// }
|
|
128
|
+
// })();
|
|
129
|
+
// const duodecHours = hours > 12 ? hours - 12 : hours;
|
|
130
|
+
// const duodecMinutes = minutes / 5;
|
|
131
|
+
// const angleMinutes = (Math.PI / 6.0) * duodecMinutes;
|
|
132
|
+
// const angleHours = 2 * Math.PI * (((hours + minutes / 60) / 12.0) % 1);
|
|
133
|
+
// return {
|
|
134
|
+
// strAMPM,
|
|
135
|
+
// isExactlyNoon,
|
|
136
|
+
// duodecHours,
|
|
137
|
+
// duodecMinutes,
|
|
138
|
+
// angleHours,
|
|
139
|
+
// angleMinutes,
|
|
140
|
+
// };
|
|
141
|
+
// })();
|
|
142
|
+
// function createStrTime(time: Time) {
|
|
143
|
+
// const {hours, minutes} = time;
|
|
144
|
+
// const strHour = hours === 24 ? `0` : `${hours}`;
|
|
145
|
+
// const strMinutes = (() => {
|
|
146
|
+
// if (minutes < 10) {
|
|
147
|
+
// return `0${minutes}`;
|
|
148
|
+
// } else {
|
|
149
|
+
// return `${minutes}`;
|
|
150
|
+
// }
|
|
151
|
+
// })();
|
|
152
|
+
// return `${strHour}h${strMinutes}`;
|
|
153
|
+
// }
|
|
154
|
+
// const [strTimeOnClock, strTime2] = [timeOnClock, time2].map(createStrTime);
|
|
155
|
+
// return {
|
|
156
|
+
// dictHydratedClock,
|
|
157
|
+
// strTimeOnClock,
|
|
158
|
+
// strTime2,
|
|
159
|
+
// };
|
|
160
|
+
// };
|
|
161
|
+
// const getInstruction: GetInstruction<Identifiers> = (identifiers) => {
|
|
162
|
+
// const { opType } = identifiers;
|
|
163
|
+
// const { strTime2 } = getHydrated(identifiers);
|
|
164
|
+
// switch (opType) {
|
|
165
|
+
// case "addition": {
|
|
166
|
+
// return `Quand je suis parti dehors, il était ${strTime2}`
|
|
167
|
+
// }
|
|
168
|
+
// case "soustraction": {
|
|
169
|
+
// }
|
|
170
|
+
// default:
|
|
171
|
+
// throw new Error("Unsupported qType: " + qType);
|
|
172
|
+
// }
|
|
173
|
+
// return `Quelle est l'heure affichée sur l'horloge ? ${(() => {
|
|
174
|
+
// };
|
|
175
|
+
// const getAnswer: GetAnswer<Identifiers> = (identifiers) => {
|
|
176
|
+
// const { hours, minutes } = identifiers;
|
|
177
|
+
// const strMinutes = (() => {
|
|
178
|
+
// if (minutes < 10) {
|
|
179
|
+
// return `0${minutes}`;
|
|
180
|
+
// } else {
|
|
181
|
+
// return `${minutes}`;
|
|
182
|
+
// }
|
|
183
|
+
// })();
|
|
184
|
+
// return `${hours === 24 ? "0" : hours}h${strMinutes}`;
|
|
185
|
+
// };
|
|
186
|
+
// const getHint: GetHint<Identifiers> = () => {
|
|
187
|
+
// return `L'aiguille des heures est l'aiguille la plus courte.
|
|
188
|
+
// Avant midi, les heures vont de $0$ à $11$. Après midi, les heures vont de $12$ à $23$.
|
|
189
|
+
// Les graduations des minutes vont de $0$ à $55$ (de $5$ en $5$).`;
|
|
190
|
+
// };
|
|
191
|
+
// const getCorrection: GetCorrection<Identifiers> = (identifiers) => {
|
|
192
|
+
// const { hours, minutes } = identifiers;
|
|
193
|
+
// const { duodecHours, duodecMinutes } = getHydrated(identifiers);
|
|
194
|
+
// const strMinutes = (() => {
|
|
195
|
+
// if (minutes < 10) {
|
|
196
|
+
// return `0${minutes}`;
|
|
197
|
+
// } else {
|
|
198
|
+
// return `${minutes}`;
|
|
199
|
+
// }
|
|
200
|
+
// })();
|
|
201
|
+
// if (minutes !== 0) {
|
|
202
|
+
// if (hours < 12) {
|
|
203
|
+
// return `Nous sommes avant midi.
|
|
204
|
+
// L'aiguille des heures est entre $${duodecHours}$ et $${duodecHours + 1}$.
|
|
205
|
+
// Il est donc $${hours}h...$
|
|
206
|
+
// L'aiguille des minutes est sur la graduation $${duodecMinutes}$.
|
|
207
|
+
// $$
|
|
208
|
+
// ${duodecMinutes} \\times 5 = ${minutes}
|
|
209
|
+
// $$
|
|
210
|
+
// Il est donc $${hours}h${strMinutes}$.
|
|
211
|
+
// `;
|
|
212
|
+
// } else if (hours > 12) {
|
|
213
|
+
// return `Nous sommes après midi.
|
|
214
|
+
// L'aiguille des heures est entre $${duodecHours}$ et $${duodecHours + 1}$.
|
|
215
|
+
// $$
|
|
216
|
+
// 12 + ${duodecHours} = ${hours}
|
|
217
|
+
// $$
|
|
218
|
+
// Il est donc $${hours}h...$
|
|
219
|
+
// L'aiguille des minutes est sur la graduation $${duodecMinutes}$.
|
|
220
|
+
// $$
|
|
221
|
+
// ${duodecMinutes} \\times 5 = ${minutes}
|
|
222
|
+
// $$
|
|
223
|
+
// Il est donc $${hours}h${strMinutes}$.
|
|
224
|
+
// `;
|
|
225
|
+
// } else {
|
|
226
|
+
// return "Il est exactement midi ($12h00$).";
|
|
227
|
+
// }
|
|
228
|
+
// } else {
|
|
229
|
+
// if (hours === 0) {
|
|
230
|
+
// return `Il est exactement minuit ($0h00$).`;
|
|
231
|
+
// } else if (hours === 24) {
|
|
232
|
+
// return `Il est exactement minuit ($0h00$) (on passe dans le jour suivant donc on n'écrit pas "$24h00$").`;
|
|
233
|
+
// } else {
|
|
234
|
+
// return `Il est exactement $${hours}h00$.`;
|
|
235
|
+
// }
|
|
236
|
+
// }
|
|
237
|
+
// };
|
|
238
|
+
// const getGGBOptions: GetGGBOptions<Identifiers> = (identifiers) => {
|
|
239
|
+
// const { angleHours, angleMinutes } = getHydrated(identifiers);
|
|
240
|
+
// const pointOrigin = new Point("O", 0, 0);
|
|
241
|
+
// //ticks
|
|
242
|
+
// const arrPointTickTop = [
|
|
243
|
+
// PointConstructor.fromCoords([0, 0.8], "tickTopA"),
|
|
244
|
+
// PointConstructor.fromCoords([0, 1], "tickTopB"),
|
|
245
|
+
// ];
|
|
246
|
+
// const arrArrPointTick = [...Array(12).keys()].map((i) => {
|
|
247
|
+
// const angle = (i * Math.PI) / 6;
|
|
248
|
+
// return arrPointTickTop.map((point, j) =>
|
|
249
|
+
// rotatePoint(point, angle, pointOrigin, `tick${i}${j === 0 ? "A" : "B"}`),
|
|
250
|
+
// );
|
|
251
|
+
// });
|
|
252
|
+
// //needles
|
|
253
|
+
// const arrPointNeedleHours = [
|
|
254
|
+
// PointConstructor.fromCoords([0, 0], "needleHoursTopA"),
|
|
255
|
+
// PointConstructor.fromCoords([0, 0.5], "needleHoursTopB"),
|
|
256
|
+
// ].map((point, j) =>
|
|
257
|
+
// rotatePoint(
|
|
258
|
+
// point,
|
|
259
|
+
// -angleHours,
|
|
260
|
+
// pointOrigin,
|
|
261
|
+
// `needleHours${j === 0 ? "A" : "B"}`,
|
|
262
|
+
// ),
|
|
263
|
+
// );
|
|
264
|
+
// const arrPointNeedleMinutes = [
|
|
265
|
+
// PointConstructor.fromCoords([0, 0], "needleMinutesTopA"),
|
|
266
|
+
// PointConstructor.fromCoords([0, 0.75], "needleMinutesTopB"),
|
|
267
|
+
// ].map((point, j) =>
|
|
268
|
+
// rotatePoint(
|
|
269
|
+
// point,
|
|
270
|
+
// -angleMinutes,
|
|
271
|
+
// pointOrigin,
|
|
272
|
+
// `needleHours${j === 0 ? "A" : "B"}`,
|
|
273
|
+
// ),
|
|
274
|
+
// );
|
|
275
|
+
// const ggb = new GeogebraConstructor({
|
|
276
|
+
// commands: [
|
|
277
|
+
// `C = Circle((0,0), 1)`,
|
|
278
|
+
// `SetFixed(C, true, false)`,
|
|
279
|
+
// `SetLineThickness(C, 1)`,
|
|
280
|
+
// //ticks
|
|
281
|
+
// ...arrArrPointTick.flatMap(([pointA, pointB], i) => [
|
|
282
|
+
// `segTick${i} = Segment(${pointA.toMathString()}, ${pointB.toMathString()})`,
|
|
283
|
+
// `SetLineThickness(segTick${i}, ${i === 0 ? "6" : "2"})`,
|
|
284
|
+
// `SetFixed(segTick${i}, true, false)`,
|
|
285
|
+
// ]),
|
|
286
|
+
// //needles
|
|
287
|
+
// ...(() => {
|
|
288
|
+
// const [pointA, pointB] = arrPointNeedleHours;
|
|
289
|
+
// return [
|
|
290
|
+
// `segNeedleHours = Segment(${pointA.toMathString()}, ${pointB.toMathString()})`,
|
|
291
|
+
// `SetLineThickness(segNeedleHours, 20)`,
|
|
292
|
+
// ];
|
|
293
|
+
// })(),
|
|
294
|
+
// ...(() => {
|
|
295
|
+
// const [pointA, pointB] = arrPointNeedleMinutes;
|
|
296
|
+
// return [
|
|
297
|
+
// `segNeedleMinutes = Segment(${pointA.toMathString()}, ${pointB.toMathString()})`,
|
|
298
|
+
// `SetLineThickness(segNeedleMinutes, 10)`,
|
|
299
|
+
// ];
|
|
300
|
+
// })(),
|
|
301
|
+
// ],
|
|
302
|
+
// hideAxes: true,
|
|
303
|
+
// hideGrid: true,
|
|
304
|
+
// forbidShiftDragZoom: true,
|
|
305
|
+
// });
|
|
306
|
+
// return ggb.getOptions({
|
|
307
|
+
// coords: [-1.4, 1.4, -1.4, 1.4],
|
|
308
|
+
// });
|
|
309
|
+
// };
|
|
310
|
+
// const getPropositions: QCMGenerator<Identifiers> = (
|
|
311
|
+
// n,
|
|
312
|
+
// { answer, ...identifiers },
|
|
313
|
+
// ) => {
|
|
314
|
+
// const propositions: Proposition[] = [];
|
|
315
|
+
// addValidProp(propositions, answer);
|
|
316
|
+
// //student: one hour more
|
|
317
|
+
// {
|
|
318
|
+
// if (identifiers.minutes >= 30) {
|
|
319
|
+
// const identifiersWrong: Identifiers = {
|
|
320
|
+
// hours: identifiers.hours + 1,
|
|
321
|
+
// minutes: identifiers.minutes,
|
|
322
|
+
// };
|
|
323
|
+
// tryToAddWrongProp(propositions, getAnswer(identifiersWrong));
|
|
324
|
+
// }
|
|
325
|
+
// }
|
|
326
|
+
// //student: hours<->minutes
|
|
327
|
+
// {
|
|
328
|
+
// const identifiersWrong: Identifiers = {
|
|
329
|
+
// hours: identifiers.minutes / 5,
|
|
330
|
+
// minutes: (identifiers.hours % 12) * 5,
|
|
331
|
+
// };
|
|
332
|
+
// tryToAddWrongProp(propositions, getAnswer(identifiersWrong));
|
|
333
|
+
// }
|
|
334
|
+
// //student: am<->pm
|
|
335
|
+
// {
|
|
336
|
+
// const identifiersWrong: Identifiers = {
|
|
337
|
+
// hours:
|
|
338
|
+
// identifiers.hours < 12
|
|
339
|
+
// ? identifiers.hours + 12
|
|
340
|
+
// : identifiers.hours - 12,
|
|
341
|
+
// minutes: identifiers.minutes,
|
|
342
|
+
// };
|
|
343
|
+
// tryToAddWrongProp(propositions, getAnswer(identifiersWrong));
|
|
344
|
+
// }
|
|
345
|
+
// propWhile(propositions, n, () => {
|
|
346
|
+
// const amPmType = random(["AM", "midi", "PM", "minuit"]);
|
|
347
|
+
// const identifiersWrong = createRandomIdentifiers(amPmType);
|
|
348
|
+
// tryToAddWrongProp(propositions, getAnswer(identifiersWrong));
|
|
349
|
+
// });
|
|
350
|
+
// return shuffleProps(propositions, n);
|
|
351
|
+
// };
|
|
352
|
+
// const getKeys: GetKeys<Identifiers> = () => {
|
|
353
|
+
// return ["h"];
|
|
354
|
+
// };
|
|
355
|
+
// const isAnswerValid: VEA<Identifiers> = (ans, { answer, ...identifiers }) => {
|
|
356
|
+
// try {
|
|
357
|
+
// if (!ans.includes("h")) {
|
|
358
|
+
// return false;
|
|
359
|
+
// }
|
|
360
|
+
// const [hoursAns, minutesAns] = ans.split("h").map((str) => parseInt(str));
|
|
361
|
+
// const { hours, minutes } = identifiers;
|
|
362
|
+
// return zip(
|
|
363
|
+
// [hoursAns, minutesAns],
|
|
364
|
+
// [hours === 24 ? 0 : hours, minutes],
|
|
365
|
+
// ).every(([ans, answer]) => ans === answer);
|
|
366
|
+
// } catch (err) {
|
|
367
|
+
// return handleVEAError(err);
|
|
368
|
+
// }
|
|
369
|
+
// };
|
|
370
|
+
// const createRandomIdentifiers = (amPmType: string) => {
|
|
371
|
+
// const [hours, minutes] = (() => {
|
|
372
|
+
// switch (amPmType) {
|
|
373
|
+
// case "AM": {
|
|
374
|
+
// const hours = randint(0, 12);
|
|
375
|
+
// const minutes = randint(1, 12) * 5;
|
|
376
|
+
// return [hours, minutes];
|
|
377
|
+
// }
|
|
378
|
+
// case "midi": {
|
|
379
|
+
// return [12, 0];
|
|
380
|
+
// }
|
|
381
|
+
// case "PM": {
|
|
382
|
+
// const hours = randint(12, 23);
|
|
383
|
+
// const minutes = randint(1, 12) * 5;
|
|
384
|
+
// return [hours, minutes];
|
|
385
|
+
// }
|
|
386
|
+
// case "minuit": {
|
|
387
|
+
// return random([
|
|
388
|
+
// [0, 0],
|
|
389
|
+
// [24, 0],
|
|
390
|
+
// ]);
|
|
391
|
+
// }
|
|
392
|
+
// default:
|
|
393
|
+
// throw new Error("Unsupported typeAMPM: " + amPmType);
|
|
394
|
+
// }
|
|
395
|
+
// })();
|
|
396
|
+
// const identifiers: Identifiers = {
|
|
397
|
+
// hours,
|
|
398
|
+
// minutes,
|
|
399
|
+
// };
|
|
400
|
+
// return identifiers;
|
|
401
|
+
// };
|
|
402
|
+
// const getClockReadingPlusTimeOperationQuestion: QuestionGenerator<
|
|
403
|
+
// Identifiers,
|
|
404
|
+
// Options
|
|
405
|
+
// > = (optsIn) => {
|
|
406
|
+
// const arrayedOpts = defaultArrayedOptsWhereNeeded(optsIn, arrayedOptsDefault);
|
|
407
|
+
// const arrAMPMType = arrayedOpts.amPmType;
|
|
408
|
+
// function drawAMPMType(arrAMPMType: string[]) {
|
|
409
|
+
// if (arrAMPMType.length === 1) {
|
|
410
|
+
// const [amPmType] = arrAMPMType;
|
|
411
|
+
// return amPmType;
|
|
412
|
+
// } else {
|
|
413
|
+
// let amPmType: string | undefined;
|
|
414
|
+
// do {
|
|
415
|
+
// const amPmTypeDrawn = probaLawFlip([
|
|
416
|
+
// ["AM", 0.4],
|
|
417
|
+
// ["midi", 0.1],
|
|
418
|
+
// ["PM", 0.4],
|
|
419
|
+
// ["minuit", 0.1],
|
|
420
|
+
// ]);
|
|
421
|
+
// if (arrAMPMType.includes(amPmTypeDrawn)) {
|
|
422
|
+
// amPmType = amPmTypeDrawn;
|
|
423
|
+
// }
|
|
424
|
+
// } while (!amPmType);
|
|
425
|
+
// return amPmType;
|
|
426
|
+
// }
|
|
427
|
+
// }
|
|
428
|
+
// const amPmType = drawAMPMType(arrAMPMType);
|
|
429
|
+
// const identifiers = createRandomIdentifiers(amPmType);
|
|
430
|
+
// return getQuestionFromIdentifiers(identifiers);
|
|
431
|
+
// };
|
|
432
|
+
// const getQuestionFromIdentifiers: GetQuestionFromIdentifiers<
|
|
433
|
+
// Identifiers,
|
|
434
|
+
// Options
|
|
435
|
+
// > = (identifiers) => {
|
|
436
|
+
// const question: Question<Identifiers, Options> = {
|
|
437
|
+
// answer: getAnswer(identifiers),
|
|
438
|
+
// instruction: getInstruction(identifiers),
|
|
439
|
+
// keys: getKeys(identifiers),
|
|
440
|
+
// answerFormat: "tex",
|
|
441
|
+
// identifiers,
|
|
442
|
+
// hint: getHint(identifiers),
|
|
443
|
+
// correction: getCorrection(identifiers),
|
|
444
|
+
// ggbOptions: getGGBOptions(identifiers),
|
|
445
|
+
// };
|
|
446
|
+
// return question;
|
|
447
|
+
// };
|
|
448
|
+
// type Options = {
|
|
449
|
+
// amPmType: string;
|
|
450
|
+
// qType: string;
|
|
451
|
+
// opType: string;
|
|
452
|
+
// };
|
|
453
|
+
// type ArrayedOptions = {
|
|
454
|
+
// readonly [K in keyof Options]: Options[K] extends unknown[]
|
|
455
|
+
// ? Options[K]
|
|
456
|
+
// : Options[K][];
|
|
457
|
+
// };
|
|
458
|
+
// const arrayedOptsDefault: ArrayedOptions = {
|
|
459
|
+
// amPmType: ["AM", "midi"],
|
|
460
|
+
// opType: ["addition", "soustraction"],
|
|
461
|
+
// time1Type: ["horloge", "texte"],
|
|
462
|
+
// time2Type: ["horloge", "texte"],
|
|
463
|
+
// };
|
|
464
|
+
// const options: GeneratorOption[] = [
|
|
465
|
+
// {
|
|
466
|
+
// id: "amPmType1",
|
|
467
|
+
// label: "Type de plage horaire pour l'horloge",
|
|
468
|
+
// target: GeneratorOptionTarget.generation,
|
|
469
|
+
// type: GeneratorOptionType.multiselect,
|
|
470
|
+
// values: ["AM", "midi", "PM", "minuit"],
|
|
471
|
+
// defaultValue: arrayedOptsDefault.amPmType,
|
|
472
|
+
// },
|
|
473
|
+
// {
|
|
474
|
+
// id: "amPmType2",
|
|
475
|
+
// label: "Type de plage horaire pour l'autre heure",
|
|
476
|
+
// target: GeneratorOptionTarget.generation,
|
|
477
|
+
// type: GeneratorOptionType.multiselect,
|
|
478
|
+
// values: ["AM", "midi", "PM", "minuit"],
|
|
479
|
+
// defaultValue: arrayedOptsDefault.amPmType,
|
|
480
|
+
// },
|
|
481
|
+
// {
|
|
482
|
+
// id: "opType",
|
|
483
|
+
// label: "opération",
|
|
484
|
+
// target: GeneratorOptionTarget.generation,
|
|
485
|
+
// type: GeneratorOptionType.multiselect,
|
|
486
|
+
// values: ["addition", "soustraction"],
|
|
487
|
+
// defaultValue: arrayedOptsDefault.opType,
|
|
488
|
+
// },
|
|
489
|
+
// {
|
|
490
|
+
// id: "opType",
|
|
491
|
+
// label: "opération",
|
|
492
|
+
// target: GeneratorOptionTarget.generation,
|
|
493
|
+
// type: GeneratorOptionType.multiselect,
|
|
494
|
+
// values: ["addition", "soustraction"],
|
|
495
|
+
// defaultValue: arrayedOptsDefault.opType,
|
|
496
|
+
// },
|
|
497
|
+
// ];
|
|
498
|
+
// export const clockReadingPlusTimeOperation: Exercise<Identifiers, Options> = {
|
|
499
|
+
// id: "clockReadingPlusTimeOperation",
|
|
500
|
+
// label: "Lire l'heure sur une horloge et effectuer une opération",
|
|
501
|
+
// isSingleStep: true,
|
|
502
|
+
// generator: (nb, opts) =>
|
|
503
|
+
// getDistinctQuestions(
|
|
504
|
+
// () => getClockReadingPlusTimeOperationQuestion(opts),
|
|
505
|
+
// nb,
|
|
506
|
+
// ),
|
|
507
|
+
// options,
|
|
508
|
+
// qcmTimer: 60,
|
|
509
|
+
// freeTimer: 60,
|
|
510
|
+
// getPropositions,
|
|
511
|
+
// isAnswerValid,
|
|
512
|
+
// subject: "Mathématiques",
|
|
513
|
+
// getHint,
|
|
514
|
+
// getCorrection,
|
|
515
|
+
// hasHintAndCorrection: true,
|
|
516
|
+
// getInstruction,
|
|
517
|
+
// getAnswer,
|
|
518
|
+
// getGGBOptions,
|
|
519
|
+
// hasGeogebra: true,
|
|
520
|
+
// getQuestionFromIdentifiers,
|
|
521
|
+
// };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clockWritingByManipulatingNeedles.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/conversion/clock/clockWritingByManipulatingNeedles.ts"],"names":[],"mappings":""}
|