math-exercises 3.0.214 → 3.0.216
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/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 +82 -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 +2 -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/graphs/adjacentMatrixPath.d.ts +10 -0
- package/lib/exercises/math/graphs/adjacentMatrixPath.d.ts.map +1 -0
- package/lib/exercises/math/graphs/adjacentMatrixPath.js +89 -0
- package/lib/exercises/math/graphs/edgesNumberFromSummitsDegrees.d.ts +7 -0
- package/lib/exercises/math/graphs/edgesNumberFromSummitsDegrees.d.ts.map +1 -0
- package/lib/exercises/math/graphs/edgesNumberFromSummitsDegrees.js +98 -0
- package/lib/exercises/math/graphs/eulerianChainFromAdjacentMatrix.d.ts +8 -0
- package/lib/exercises/math/graphs/eulerianChainFromAdjacentMatrix.d.ts.map +1 -0
- package/lib/exercises/math/graphs/eulerianChainFromAdjacentMatrix.js +96 -0
- package/lib/exercises/math/graphs/graphsChainOrPathOfLengthN.d.ts +15 -0
- package/lib/exercises/math/graphs/graphsChainOrPathOfLengthN.d.ts.map +1 -0
- package/lib/exercises/math/graphs/graphsChainOrPathOfLengthN.js +262 -0
- package/lib/exercises/math/graphs/graphsCheckIsConnectedUndirectedGraph.d.ts +11 -0
- package/lib/exercises/math/graphs/graphsCheckIsConnectedUndirectedGraph.d.ts.map +1 -0
- package/lib/exercises/math/graphs/graphsCheckIsConnectedUndirectedGraph.js +178 -0
- package/lib/exercises/math/graphs/graphsCheckIsSameGraph.d.ts +19 -0
- package/lib/exercises/math/graphs/graphsCheckIsSameGraph.d.ts.map +1 -0
- package/lib/exercises/math/graphs/graphsCheckIsSameGraph.js +301 -0
- package/lib/exercises/math/graphs/graphsCheckIsVerticesAdjacent.d.ts +16 -0
- package/lib/exercises/math/graphs/graphsCheckIsVerticesAdjacent.d.ts.map +1 -0
- package/lib/exercises/math/graphs/graphsCheckIsVerticesAdjacent.js +207 -0
- package/lib/exercises/math/graphs/graphsDegreeOfVertex.d.ts +15 -0
- package/lib/exercises/math/graphs/graphsDegreeOfVertex.d.ts.map +1 -0
- package/lib/exercises/math/graphs/graphsDegreeOfVertex.js +232 -0
- package/lib/exercises/math/graphs/graphsOrderOfGraph.d.ts +14 -0
- package/lib/exercises/math/graphs/graphsOrderOfGraph.d.ts.map +1 -0
- package/lib/exercises/math/graphs/graphsOrderOfGraph.js +222 -0
- package/lib/exercises/math/graphs/index.d.ts +10 -0
- package/lib/exercises/math/graphs/index.d.ts.map +1 -0
- package/lib/exercises/math/graphs/index.js +9 -0
- package/lib/exercises/math/index.d.ts +1 -0
- package/lib/exercises/math/index.d.ts.map +1 -1
- package/lib/exercises/math/index.js +1 -0
- package/lib/exercises/math/matrices/areMatricesInverse.d.ts +9 -0
- package/lib/exercises/math/matrices/areMatricesInverse.d.ts.map +1 -0
- package/lib/exercises/math/matrices/areMatricesInverse.js +106 -0
- package/lib/exercises/math/matrices/computeFixedMatrixInRecurrenceSequence.d.ts +9 -0
- package/lib/exercises/math/matrices/computeFixedMatrixInRecurrenceSequence.d.ts.map +1 -0
- package/lib/exercises/math/matrices/computeFixedMatrixInRecurrenceSequence.js +144 -0
- package/lib/exercises/math/matrices/findInversedMatrixFromSystem.d.ts +8 -0
- package/lib/exercises/math/matrices/findInversedMatrixFromSystem.d.ts.map +1 -0
- package/lib/exercises/math/matrices/findInversedMatrixFromSystem.js +148 -0
- package/lib/exercises/math/matrices/index.d.ts +12 -0
- package/lib/exercises/math/matrices/index.d.ts.map +1 -1
- package/lib/exercises/math/matrices/index.js +12 -0
- package/lib/exercises/math/matrices/isMatrixTransitionMatrix.d.ts +8 -0
- package/lib/exercises/math/matrices/isMatrixTransitionMatrix.d.ts.map +1 -0
- package/lib/exercises/math/matrices/isMatrixTransitionMatrix.js +132 -0
- package/lib/exercises/math/matrices/matrixBuildMatrixFromCoefficients.d.ts +8 -0
- package/lib/exercises/math/matrices/matrixBuildMatrixFromCoefficients.d.ts.map +1 -0
- package/lib/exercises/math/matrices/matrixBuildMatrixFromCoefficients.js +152 -0
- package/lib/exercises/math/matrices/matrixCheckIsSymmetrical.d.ts +8 -0
- package/lib/exercises/math/matrices/matrixCheckIsSymmetrical.d.ts.map +1 -0
- package/lib/exercises/math/matrices/matrixCheckIsSymmetrical.js +155 -0
- package/lib/exercises/math/matrices/matrixComputeDetOfMat2.d.ts +8 -0
- package/lib/exercises/math/matrices/matrixComputeDetOfMat2.d.ts.map +1 -0
- package/lib/exercises/math/matrices/matrixComputeDetOfMat2.js +142 -0
- package/lib/exercises/math/matrices/matrixComputeInverseOfMat2.d.ts +8 -0
- package/lib/exercises/math/matrices/matrixComputeInverseOfMat2.d.ts.map +1 -0
- package/lib/exercises/math/matrices/matrixComputeInverseOfMat2.js +237 -0
- package/lib/exercises/math/matrices/matrixComputeLinearCombination.d.ts +15 -0
- package/lib/exercises/math/matrices/matrixComputeLinearCombination.d.ts.map +1 -0
- package/lib/exercises/math/matrices/matrixComputeLinearCombination.js +232 -0
- package/lib/exercises/math/matrices/matrixComputePower.d.ts +12 -0
- package/lib/exercises/math/matrices/matrixComputePower.d.ts.map +1 -0
- package/lib/exercises/math/matrices/matrixComputePower.js +230 -0
- package/lib/exercises/math/matrices/matrixComputeProduct.d.ts +9 -0
- package/lib/exercises/math/matrices/matrixComputeProduct.d.ts.map +1 -0
- package/lib/exercises/math/matrices/matrixComputeProduct.js +178 -0
- package/lib/exercises/math/matrices/writeMatrixAssociatedToSystem.d.ts +8 -0
- package/lib/exercises/math/matrices/writeMatrixAssociatedToSystem.d.ts.map +1 -0
- package/lib/exercises/math/matrices/writeMatrixAssociatedToSystem.js +105 -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/exercises/vea/matrixVEA.d.ts +2 -0
- package/lib/exercises/vea/matrixVEA.d.ts.map +1 -0
- package/lib/exercises/vea/matrixVEA.js +1 -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 +286 -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/point.d.ts.map +1 -1
- package/lib/math/geometry/point.js +3 -1
- 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/graphs/graph.d.ts +43 -0
- package/lib/math/graphs/graph.d.ts.map +1 -0
- package/lib/math/graphs/graph.js +391 -0
- package/lib/math/matrices/matrix.d.ts +42 -3
- package/lib/math/matrices/matrix.d.ts.map +1 -1
- package/lib/math/matrices/matrix.js +173 -7
- package/lib/math/matrices/parseMatrix.d.ts +3 -0
- package/lib/math/matrices/parseMatrix.d.ts.map +1 -0
- package/lib/math/matrices/parseMatrix.js +22 -0
- package/lib/math/systems/generalSystem.d.ts +2 -0
- package/lib/math/systems/generalSystem.d.ts.map +1 -1
- package/lib/math/systems/generalSystem.js +5 -0
- 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/math/utils/graphs/graphRenderer.d.ts +25 -0
- package/lib/math/utils/graphs/graphRenderer.d.ts.map +1 -0
- package/lib/math/utils/graphs/graphRenderer.js +123 -0
- package/lib/playground.d.ts +6 -1
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +6 -5
- package/lib/tests/singleExo.test.d.ts.map +1 -1
- package/lib/tests/singleExo.test.js +2 -2
- package/lib/tree/parsers/latexParser.d.ts +1 -1
- package/lib/tree/utilities/nodeSimplifier.d.ts +1 -1
- package/lib/types/keyIds.d.ts +2 -0
- package/lib/types/keyIds.d.ts.map +1 -1
- package/lib/utils/arrays/arrayChunks.d.ts +9 -0
- package/lib/utils/arrays/arrayChunks.d.ts.map +1 -0
- package/lib/utils/arrays/arrayChunks.js +34 -0
- 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/lib/utils/strings/ordinalSuffixed.d.ts +2 -0
- package/lib/utils/strings/ordinalSuffixed.d.ts.map +1 -0
- package/lib/utils/strings/ordinalSuffixed.js +5 -0
- package/package.json +7 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
mod: number;
|
|
4
|
+
a: number;
|
|
5
|
+
n: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const findLeftInHugeNumberDivision: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=findLeftInHugeNumberDivision.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findLeftInHugeNumberDivision.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/arithmetic/findLeftInHugeNumberDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CAEX,CAAC;AAqMF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAsB9D,CAAC"}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, propWhile, tryToAddWrongProp, } from "../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { numberVEA } from "../../../exercises/vea/numberVEA.js";
|
|
4
|
+
import { randint } from "../../../math/utils/random/randint.js";
|
|
5
|
+
import { multiply } from "../../../tree/nodes/operators/multiplyNode.js";
|
|
6
|
+
import { power } from "../../../tree/nodes/operators/powerNode.js";
|
|
7
|
+
import { doWhile } from "../../../utils/doWhile.js";
|
|
8
|
+
import { handleVEAError } from "../../../utils/errors/handleVEAError.js";
|
|
9
|
+
import { alignTex } from "../../../utils/latex/alignTex.js";
|
|
10
|
+
const getPropositions = (n, { answer, mod }) => {
|
|
11
|
+
const propositions = [];
|
|
12
|
+
addValidProp(propositions, answer);
|
|
13
|
+
propWhile(propositions, n, () => {
|
|
14
|
+
tryToAddWrongProp(propositions, randint(0, mod).frenchify());
|
|
15
|
+
});
|
|
16
|
+
return shuffleProps(propositions, n);
|
|
17
|
+
};
|
|
18
|
+
const getAnswer = (identifiers) => {
|
|
19
|
+
const { a, mod, n } = identifiers;
|
|
20
|
+
const aMod = a % mod;
|
|
21
|
+
let cycle = 1;
|
|
22
|
+
let currentMod = aMod;
|
|
23
|
+
let cycleFound = false;
|
|
24
|
+
while (!cycleFound) {
|
|
25
|
+
cycle++;
|
|
26
|
+
currentMod = (currentMod * aMod) % mod;
|
|
27
|
+
if (currentMod === 1)
|
|
28
|
+
cycleFound = true;
|
|
29
|
+
}
|
|
30
|
+
const left = n % cycle;
|
|
31
|
+
currentMod = aMod;
|
|
32
|
+
for (let i = 1; i < left; i++) {
|
|
33
|
+
currentMod = (currentMod * aMod) % mod;
|
|
34
|
+
}
|
|
35
|
+
return currentMod.frenchify();
|
|
36
|
+
//a^cycle = 1 [mod]
|
|
37
|
+
};
|
|
38
|
+
const getInstruction = (identifiers) => {
|
|
39
|
+
const { a, mod, n } = identifiers;
|
|
40
|
+
return `Déterminer le reste de la division euclidienne de $${power(a, n).toTex()}$ par $${mod}$.`;
|
|
41
|
+
};
|
|
42
|
+
const getHint = (identifiers) => {
|
|
43
|
+
const { a, mod, n } = identifiers;
|
|
44
|
+
return `Calcule d'abord $${a} \\pmod ${mod}$.
|
|
45
|
+
|
|
46
|
+
Puis, par calculs successifs, détermine un nombre $n$ tel que $${a ^ n}\\equiv 1\\ [${mod}]$.
|
|
47
|
+
|
|
48
|
+
Cela permettra de simplifier le calcul.`;
|
|
49
|
+
};
|
|
50
|
+
const getCorrection = (identifiers) => {
|
|
51
|
+
const { a, mod, n } = identifiers;
|
|
52
|
+
const aMod = a % mod;
|
|
53
|
+
let cycle = 1;
|
|
54
|
+
let currentMod = aMod;
|
|
55
|
+
let cycleFound = false;
|
|
56
|
+
const powers = [];
|
|
57
|
+
while (!cycleFound) {
|
|
58
|
+
cycle++;
|
|
59
|
+
currentMod = (currentMod * aMod) % mod;
|
|
60
|
+
powers.push([
|
|
61
|
+
`${power(aMod, cycle).toTex()}`,
|
|
62
|
+
"\\equiv",
|
|
63
|
+
`${currentMod} \\ [${mod}]`,
|
|
64
|
+
]);
|
|
65
|
+
if (currentMod === 1)
|
|
66
|
+
cycleFound = true;
|
|
67
|
+
}
|
|
68
|
+
const left = n % cycle;
|
|
69
|
+
currentMod = aMod;
|
|
70
|
+
for (let i = 1; i < left; i++) {
|
|
71
|
+
currentMod = (currentMod * aMod) % mod;
|
|
72
|
+
}
|
|
73
|
+
const answer = currentMod.frenchify();
|
|
74
|
+
const quot = Math.floor(n / cycle);
|
|
75
|
+
//a^cycle = 1 [mod]
|
|
76
|
+
return `On commence par déterminer le reste de la division euclidienne de $${a}$ par $${mod}$ :
|
|
77
|
+
|
|
78
|
+
$$
|
|
79
|
+
${a} \\equiv ${aMod} \\ [${mod}]
|
|
80
|
+
$$
|
|
81
|
+
|
|
82
|
+
Ainsi,
|
|
83
|
+
|
|
84
|
+
$$
|
|
85
|
+
${power(a, n).toTex()} \\equiv ${power(aMod, n).toTex()} \\ [${mod}]
|
|
86
|
+
$$
|
|
87
|
+
|
|
88
|
+
Puis, on calcule les puissances successives de $${aMod}$ modulo $${mod}$ :
|
|
89
|
+
|
|
90
|
+
${alignTex(powers)}
|
|
91
|
+
|
|
92
|
+
On effectue alors la division euclidienne de $${n}$ par $${cycle}$ :
|
|
93
|
+
|
|
94
|
+
$$
|
|
95
|
+
${n} = ${cycle}\\times ${quot} + ${left}
|
|
96
|
+
$$
|
|
97
|
+
|
|
98
|
+
Alors :
|
|
99
|
+
|
|
100
|
+
$$
|
|
101
|
+
${power(aMod, n).toTex()} = ${multiply(power(power(aMod, cycle), quot), power(aMod, left)).toTex()}
|
|
102
|
+
$$
|
|
103
|
+
|
|
104
|
+
Et donc, modulo $${mod}$ :
|
|
105
|
+
|
|
106
|
+
$$
|
|
107
|
+
${power(aMod, n).toTex()} \\equiv 1^{${quot}} \\times ${power(aMod, left).toTex()} \\equiv ${power(aMod, left).toTex()} \\ [${mod}]
|
|
108
|
+
$$
|
|
109
|
+
|
|
110
|
+
d'où, finalement :
|
|
111
|
+
|
|
112
|
+
$$
|
|
113
|
+
${power(a, n).toTex()}\\equiv ${answer} \\ [${mod}]
|
|
114
|
+
$$
|
|
115
|
+
|
|
116
|
+
Le reste de la division euclidienne de $${power(a, n).toTex()}$ par $${mod}$ est donc $${answer}$.
|
|
117
|
+
`;
|
|
118
|
+
};
|
|
119
|
+
const getKeys = () => {
|
|
120
|
+
return [];
|
|
121
|
+
};
|
|
122
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
123
|
+
try {
|
|
124
|
+
return numberVEA(ans, answer);
|
|
125
|
+
}
|
|
126
|
+
catch (err) {
|
|
127
|
+
return handleVEAError(err);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
const getFindLeftInHugeNumberDivisionQuestion = () => {
|
|
131
|
+
let a = 0;
|
|
132
|
+
let mod = 0;
|
|
133
|
+
let found = false;
|
|
134
|
+
let counter = 0;
|
|
135
|
+
let n = 0;
|
|
136
|
+
do {
|
|
137
|
+
let cycle = 1;
|
|
138
|
+
counter++;
|
|
139
|
+
if (counter > 1000)
|
|
140
|
+
throw new Error("too many iterations in getFindLeftInHugeNumberDivisionQuestion");
|
|
141
|
+
mod = randint(5, 20);
|
|
142
|
+
a = randint(mod + 5, mod + 100);
|
|
143
|
+
n = doWhile(() => randint(100, 1000), (x) => x % mod === 0);
|
|
144
|
+
const aMod = a % mod;
|
|
145
|
+
if (aMod === 0 || aMod === 1 || aMod === mod - 1)
|
|
146
|
+
continue;
|
|
147
|
+
let currentMod = a % mod;
|
|
148
|
+
for (let i = 0; i < 5; i++) {
|
|
149
|
+
if (currentMod === 1) {
|
|
150
|
+
if (n % cycle === 0)
|
|
151
|
+
break;
|
|
152
|
+
found = true;
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
cycle++;
|
|
156
|
+
currentMod = (currentMod * aMod) % mod;
|
|
157
|
+
}
|
|
158
|
+
} while (!found);
|
|
159
|
+
const identifiers = {
|
|
160
|
+
a,
|
|
161
|
+
mod,
|
|
162
|
+
n,
|
|
163
|
+
};
|
|
164
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
165
|
+
};
|
|
166
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
167
|
+
return {
|
|
168
|
+
answer: getAnswer(identifiers),
|
|
169
|
+
instruction: getInstruction(identifiers),
|
|
170
|
+
keys: getKeys(identifiers),
|
|
171
|
+
answerFormat: "tex",
|
|
172
|
+
identifiers,
|
|
173
|
+
hint: getHint(identifiers),
|
|
174
|
+
correction: getCorrection(identifiers),
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
export const findLeftInHugeNumberDivision = {
|
|
178
|
+
id: "findLeftInHugeNumberDivision",
|
|
179
|
+
connector: "=",
|
|
180
|
+
label: "Calculer le reste de la division euclidienne de $a^n$ par $b$, pour des grandes valeurs de $a$ et $n$",
|
|
181
|
+
isSingleStep: true,
|
|
182
|
+
generator: (nb, opts) => getDistinctQuestions(() => getFindLeftInHugeNumberDivisionQuestion(opts), nb),
|
|
183
|
+
qcmTimer: 60,
|
|
184
|
+
freeTimer: 60,
|
|
185
|
+
getPropositions,
|
|
186
|
+
isAnswerValid,
|
|
187
|
+
subject: "Mathématiques",
|
|
188
|
+
getInstruction,
|
|
189
|
+
getHint,
|
|
190
|
+
getCorrection,
|
|
191
|
+
getAnswer,
|
|
192
|
+
getQuestionFromIdentifiers,
|
|
193
|
+
hasHintAndCorrection: true,
|
|
194
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
numbers: number[];
|
|
4
|
+
missingIndex: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const findMissingNumberToMakeNumberDivisibleBy9: Exercise<Identifiers>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=findMissingNumberToMakeNumberDivisibleBy9.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findMissingNumberToMakeNumberDivisibleBy9.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/arithmetic/findMissingNumberToMakeNumberDivisibleBy9.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAgHF,eAAO,MAAM,yCAAyC,EAAE,QAAQ,CAAC,WAAW,CAuBzE,CAAC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, propWhile, tryToAddWrongProp, } from "../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { numberVEA } from "../../../exercises/vea/numberVEA.js";
|
|
4
|
+
import { randint } from "../../../math/utils/random/randint.js";
|
|
5
|
+
import { randTupleInt } from "../../../math/utils/random/randTupleInt.js";
|
|
6
|
+
import { doWhile } from "../../../utils/doWhile.js";
|
|
7
|
+
import { handleVEAError } from "../../../utils/errors/handleVEAError.js";
|
|
8
|
+
const getPropositions = (n, { answer }) => {
|
|
9
|
+
const propositions = [];
|
|
10
|
+
addValidProp(propositions, answer);
|
|
11
|
+
propWhile(propositions, n, () => {
|
|
12
|
+
tryToAddWrongProp(propositions, randint(0, 100).frenchify());
|
|
13
|
+
});
|
|
14
|
+
return shuffleProps(propositions, n);
|
|
15
|
+
};
|
|
16
|
+
const getAnswer = (identifiers) => {
|
|
17
|
+
const { numbers } = identifiers;
|
|
18
|
+
const quotient = 9;
|
|
19
|
+
const sum = numbers.reduce((acc, curr) => acc + curr, 0);
|
|
20
|
+
const modulo = (sum + quotient) % quotient;
|
|
21
|
+
const missing = quotient - modulo;
|
|
22
|
+
return missing.frenchify();
|
|
23
|
+
};
|
|
24
|
+
const getInstruction = (identifiers) => {
|
|
25
|
+
const { numbers, missingIndex } = identifiers;
|
|
26
|
+
const trueNb = [
|
|
27
|
+
...numbers.slice(0, missingIndex).map((e) => e + ""),
|
|
28
|
+
"a",
|
|
29
|
+
...numbers.slice(missingIndex).map((e) => e + ""),
|
|
30
|
+
];
|
|
31
|
+
return `On considère un nombre qui a pour écriture décimale :
|
|
32
|
+
|
|
33
|
+
$$
|
|
34
|
+
${trueNb.join("")}
|
|
35
|
+
$$
|
|
36
|
+
|
|
37
|
+
Déterminer la valeur de $a$ pour que ce nombre soit divisible par $9$.`;
|
|
38
|
+
};
|
|
39
|
+
const getHint = () => {
|
|
40
|
+
return `Un nombre entier est divisible par $9$ si la somme de ses chiffres est divisible par $9$.`;
|
|
41
|
+
};
|
|
42
|
+
const getCorrection = (identifiers) => {
|
|
43
|
+
const { numbers, missingIndex } = identifiers;
|
|
44
|
+
const quotient = 9;
|
|
45
|
+
const sum = numbers.reduce((acc, curr) => acc + curr, 0);
|
|
46
|
+
const modulo = (sum + quotient) % quotient;
|
|
47
|
+
const missing = quotient - modulo;
|
|
48
|
+
const trueNb = [
|
|
49
|
+
...numbers.slice(0, missingIndex).map((e) => e + ""),
|
|
50
|
+
missing.frenchify(),
|
|
51
|
+
...numbers.slice(missingIndex).map((e) => e + ""),
|
|
52
|
+
];
|
|
53
|
+
return `Un nombre entier est divisible par $9$ si la somme de ses chiffres est divisible par $9$.
|
|
54
|
+
|
|
55
|
+
La somme des chiffres connus du nombre proposé est :
|
|
56
|
+
|
|
57
|
+
$$
|
|
58
|
+
${numbers.join("+")}=${sum}
|
|
59
|
+
$$
|
|
60
|
+
|
|
61
|
+
Le reste de la division euclidienne de $${sum}$ par $9$ est $${modulo}$.
|
|
62
|
+
|
|
63
|
+
Pour obtenir un multiple de $9$, il suffit donc d'ajouter $${missing}$ à cette somme.
|
|
64
|
+
|
|
65
|
+
Le nombre recherché est donc :
|
|
66
|
+
|
|
67
|
+
$$
|
|
68
|
+
${trueNb.join("")}
|
|
69
|
+
$$`;
|
|
70
|
+
};
|
|
71
|
+
const getKeys = () => {
|
|
72
|
+
return [];
|
|
73
|
+
};
|
|
74
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
75
|
+
try {
|
|
76
|
+
return numberVEA(ans, answer);
|
|
77
|
+
}
|
|
78
|
+
catch (err) {
|
|
79
|
+
return handleVEAError(err);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
const getFindMissingNumberToMakeNumberDivisibleByXQuestion = () => {
|
|
83
|
+
const numbers = doWhile(() => randTupleInt(randint(4, 8), {
|
|
84
|
+
from: 1,
|
|
85
|
+
to: 10,
|
|
86
|
+
}), (arr) => arr.reduce((acc, curr) => acc + curr, 0) % 9 === 0);
|
|
87
|
+
const identifiers = {
|
|
88
|
+
numbers,
|
|
89
|
+
missingIndex: randint(0, numbers.length),
|
|
90
|
+
};
|
|
91
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
92
|
+
};
|
|
93
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
94
|
+
return {
|
|
95
|
+
answer: getAnswer(identifiers),
|
|
96
|
+
instruction: getInstruction(identifiers),
|
|
97
|
+
keys: getKeys(identifiers),
|
|
98
|
+
answerFormat: "tex",
|
|
99
|
+
identifiers,
|
|
100
|
+
hint: getHint(identifiers),
|
|
101
|
+
correction: getCorrection(identifiers),
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
export const findMissingNumberToMakeNumberDivisibleBy9 = {
|
|
105
|
+
id: "findMissingNumberToMakeNumberDivisibleBy9",
|
|
106
|
+
connector: "=",
|
|
107
|
+
label: "Déterminer la valeur de $a$ pour que le nombre $xxaxx$ soit divisible par $9$",
|
|
108
|
+
isSingleStep: true,
|
|
109
|
+
generator: (nb, opts) => getDistinctQuestions(() => getFindMissingNumberToMakeNumberDivisibleByXQuestion(opts), nb),
|
|
110
|
+
qcmTimer: 60,
|
|
111
|
+
freeTimer: 60,
|
|
112
|
+
getPropositions,
|
|
113
|
+
isAnswerValid,
|
|
114
|
+
subject: "Mathématiques",
|
|
115
|
+
getInstruction,
|
|
116
|
+
getHint,
|
|
117
|
+
getCorrection,
|
|
118
|
+
getAnswer,
|
|
119
|
+
getQuestionFromIdentifiers,
|
|
120
|
+
hasHintAndCorrection: true,
|
|
121
|
+
};
|
|
@@ -7,4 +7,11 @@ export * from "./diophantianEquationSimpleSolution.js";
|
|
|
7
7
|
export * from "./pgcdHomogenuity.js";
|
|
8
8
|
export * from "./pgcdFromPrimeDecomposition.js";
|
|
9
9
|
export * from "./fermatUsageOnBigPowers.js";
|
|
10
|
+
export * from "./whichDayInXDays.js";
|
|
11
|
+
export * from "./findMissingNumberToMakeNumberDivisibleBy9.js";
|
|
12
|
+
export * from "./findLeftInHugeNumberDivision.js";
|
|
13
|
+
export * from "./pgcdFromEuclid.js";
|
|
14
|
+
export * from "./isBigNumberPrime.js";
|
|
15
|
+
export * from "./solveDiophantianEquationByUsingPrimality.js";
|
|
16
|
+
export * from "./numberOfEndingZerosOfBigProduct.js";
|
|
10
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/arithmetic/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC;AACpD,cAAc,wCAAwC,CAAC;AACvD,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/arithmetic/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC;AACpD,cAAc,wCAAwC,CAAC;AACvD,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,gDAAgD,CAAC;AAC/D,cAAc,mCAAmC,CAAC;AAClD,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,sCAAsC,CAAC"}
|
|
@@ -7,3 +7,10 @@ export * from "./diophantianEquationSimpleSolution.js";
|
|
|
7
7
|
export * from "./pgcdHomogenuity.js";
|
|
8
8
|
export * from "./pgcdFromPrimeDecomposition.js";
|
|
9
9
|
export * from "./fermatUsageOnBigPowers.js";
|
|
10
|
+
export * from "./whichDayInXDays.js";
|
|
11
|
+
export * from "./findMissingNumberToMakeNumberDivisibleBy9.js";
|
|
12
|
+
export * from "./findLeftInHugeNumberDivision.js";
|
|
13
|
+
export * from "./pgcdFromEuclid.js";
|
|
14
|
+
export * from "./isBigNumberPrime.js";
|
|
15
|
+
export * from "./solveDiophantianEquationByUsingPrimality.js";
|
|
16
|
+
export * from "./numberOfEndingZerosOfBigProduct.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isBigNumberPrime.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/arithmetic/isBigNumberPrime.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqGF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAkBlD,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { primes } from "../../../math/numbers/integer/primes.js";
|
|
4
|
+
import { isPrime } from "../../../math/utils/arithmetic/isPrime.js";
|
|
5
|
+
import { randint } from "../../../math/utils/random/randint.js";
|
|
6
|
+
import { sqrt } from "../../../tree/nodes/functions/sqrtNode.js";
|
|
7
|
+
import { coinFlip } from "../../../utils/alea/coinFlip.js";
|
|
8
|
+
import { doWhile } from "../../../utils/doWhile.js";
|
|
9
|
+
import { alignTex } from "../../../utils/latex/alignTex.js";
|
|
10
|
+
const getPropositions = (n, { answer }) => {
|
|
11
|
+
const propositions = [];
|
|
12
|
+
addValidProp(propositions, answer, "raw");
|
|
13
|
+
tryToAddWrongProp(propositions, "Oui", "raw");
|
|
14
|
+
tryToAddWrongProp(propositions, "Non", "raw");
|
|
15
|
+
tryToAddWrongProp(propositions, "On ne peut pas savoir", "raw");
|
|
16
|
+
return shuffleProps(propositions, n);
|
|
17
|
+
};
|
|
18
|
+
const getAnswer = (identifiers) => {
|
|
19
|
+
const { a } = identifiers;
|
|
20
|
+
return isPrime(a) ? "Oui" : "Non";
|
|
21
|
+
};
|
|
22
|
+
const getInstruction = (identifiers) => {
|
|
23
|
+
const { a } = identifiers;
|
|
24
|
+
return `$${a}$ est-il un nombre premier ?`;
|
|
25
|
+
};
|
|
26
|
+
const getHint = () => {
|
|
27
|
+
return `Utilise le test de primalité : si $n$ n'est divisible par aucun nombre premier inférieur ou égal à $\\sqrt{n}$, alors $n$ est premier.`;
|
|
28
|
+
};
|
|
29
|
+
const getCorrection = (identifiers) => {
|
|
30
|
+
const { a } = identifiers;
|
|
31
|
+
const nextSquare = (Math.floor(Math.sqrt(a)) + 1) ** 2;
|
|
32
|
+
const squareRootFloor = Math.floor(Math.sqrt(a));
|
|
33
|
+
const primesToTest = primes.filter((p) => p > 5 && p <= squareRootFloor);
|
|
34
|
+
const isPremier = isPrime(a);
|
|
35
|
+
const divisor = primesToTest.find((p) => a % p === 0);
|
|
36
|
+
return `On a $${a}<${nextSquare}$ et $${sqrt(nextSquare).toSimplificationTex()}$, donc :
|
|
37
|
+
|
|
38
|
+
$$
|
|
39
|
+
${sqrt(a).toTex()}\\leq ${squareRootFloor}
|
|
40
|
+
$$
|
|
41
|
+
|
|
42
|
+
On teste donc la divisibilité de $${a}$ par tous les entiers premiers inférieurs ou égaux à $${squareRootFloor}$.
|
|
43
|
+
|
|
44
|
+
$${a}$ n'est pas divisible par $2$, $3$ et $5$ d'après les critères de divisibilité.
|
|
45
|
+
|
|
46
|
+
${isPremier
|
|
47
|
+
? `On effectue les divisions euclidiennes par les nombres premiers restants :
|
|
48
|
+
|
|
49
|
+
${alignTex(primesToTest.map((p) => [
|
|
50
|
+
a.frenchify(),
|
|
51
|
+
"=",
|
|
52
|
+
`${p}\\times ${Math.floor(a / p).frenchify()}+ ${(a % p).frenchify()}`,
|
|
53
|
+
]))}
|
|
54
|
+
|
|
55
|
+
$${a}$ n'est donc divisible par aucun nombre premier inférieur ou égal à sa racine carrée : c'est un nombre premier.`
|
|
56
|
+
: `On trouve cependant en effectuant des divisions euclidiennes :
|
|
57
|
+
|
|
58
|
+
$$
|
|
59
|
+
${a} = ${divisor}\\times ${Math.floor(a / divisor)} + 0
|
|
60
|
+
$$
|
|
61
|
+
|
|
62
|
+
$${a}$ est donc divisible par $${divisor}$, donc il n'est pas premier.`}
|
|
63
|
+
|
|
64
|
+
`;
|
|
65
|
+
};
|
|
66
|
+
const getIsBigNumberPrimeQuestion = () => {
|
|
67
|
+
//a n'est pas un carré, ni divisible par 2, 3, 5,
|
|
68
|
+
//la racine doit etre strictement supérieur à 11 pour tester au moins 7 et 11
|
|
69
|
+
const generatePrime = coinFlip();
|
|
70
|
+
const a = doWhile(() => randint(127, 400), (x) => x % 2 === 0 ||
|
|
71
|
+
x % 3 === 0 ||
|
|
72
|
+
x % 5 === 0 ||
|
|
73
|
+
Math.sqrt(x) === Math.floor(Math.sqrt(x)) ||
|
|
74
|
+
(generatePrime && !isPrime(x)) ||
|
|
75
|
+
(!generatePrime && isPrime(x)));
|
|
76
|
+
const identifiers = { a };
|
|
77
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
78
|
+
};
|
|
79
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
80
|
+
return {
|
|
81
|
+
answer: getAnswer(identifiers),
|
|
82
|
+
instruction: getInstruction(identifiers),
|
|
83
|
+
keys: [],
|
|
84
|
+
answerFormat: "raw",
|
|
85
|
+
identifiers,
|
|
86
|
+
hint: getHint(identifiers),
|
|
87
|
+
correction: getCorrection(identifiers),
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
export const isBigNumberPrime = {
|
|
91
|
+
id: "isBigNumberPrime",
|
|
92
|
+
connector: "=",
|
|
93
|
+
label: "Déterminer si un nombre (relativement grand) est premier",
|
|
94
|
+
isSingleStep: true,
|
|
95
|
+
generator: (nb, opts) => getDistinctQuestions(() => getIsBigNumberPrimeQuestion(opts), nb),
|
|
96
|
+
qcmTimer: 60,
|
|
97
|
+
freeTimer: 60,
|
|
98
|
+
getPropositions,
|
|
99
|
+
subject: "Mathématiques",
|
|
100
|
+
getInstruction,
|
|
101
|
+
getHint,
|
|
102
|
+
getCorrection,
|
|
103
|
+
getAnswer,
|
|
104
|
+
getQuestionFromIdentifiers,
|
|
105
|
+
hasHintAndCorrection: true,
|
|
106
|
+
answerType: "QCU",
|
|
107
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
a: number;
|
|
4
|
+
b: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const numberOfEndingZerosOfBigProduct: Exercise<Identifiers>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=numberOfEndingZerosOfBigProduct.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numberOfEndingZerosOfBigProduct.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/arithmetic/numberOfEndingZerosOfBigProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA2IF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAsBjE,CAAC"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, propWhile, tryToAddWrongProp, } from "../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { numberVEA } from "../../../exercises/vea/numberVEA.js";
|
|
4
|
+
import { primeDecompNode } from "../../../math/utils/arithmetic/primeDecompNode.js";
|
|
5
|
+
import { primeDecomposition } from "../../../math/utils/arithmetic/primeDecomposition.js";
|
|
6
|
+
import { randint } from "../../../math/utils/random/randint.js";
|
|
7
|
+
import { randTupleInt } from "../../../math/utils/random/randTupleInt.js";
|
|
8
|
+
import { MultiplyNode } from "../../../tree/nodes/operators/multiplyNode.js";
|
|
9
|
+
import { power } from "../../../tree/nodes/operators/powerNode.js";
|
|
10
|
+
import { operatorComposition } from "../../../tree/utilities/operatorComposition.js";
|
|
11
|
+
import { randomMany } from "../../../utils/alea/random.js";
|
|
12
|
+
import { doWhile } from "../../../utils/doWhile.js";
|
|
13
|
+
import { handleVEAError } from "../../../utils/errors/handleVEAError.js";
|
|
14
|
+
const getPropositions = (n, { answer }) => {
|
|
15
|
+
const propositions = [];
|
|
16
|
+
addValidProp(propositions, answer);
|
|
17
|
+
propWhile(propositions, n, () => {
|
|
18
|
+
tryToAddWrongProp(propositions, randint(0, 8).frenchify());
|
|
19
|
+
});
|
|
20
|
+
return shuffleProps(propositions, n);
|
|
21
|
+
};
|
|
22
|
+
const getAnswer = (identifiers) => {
|
|
23
|
+
const { a, b } = identifiers;
|
|
24
|
+
const aDecomp = primeDecomposition(a);
|
|
25
|
+
const bDecomp = primeDecomposition(b);
|
|
26
|
+
const twoPower = (aDecomp.find((el) => el.value === 2)?.power ?? 0) +
|
|
27
|
+
(bDecomp.find((el) => el.value === 2)?.power ?? 0);
|
|
28
|
+
const fivePower = (aDecomp.find((el) => el.value === 5)?.power ?? 0) +
|
|
29
|
+
(bDecomp.find((el) => el.value === 5)?.power ?? 0);
|
|
30
|
+
const commonPower = Math.min(twoPower, fivePower);
|
|
31
|
+
return commonPower.frenchify();
|
|
32
|
+
};
|
|
33
|
+
const getInstruction = (identifiers) => {
|
|
34
|
+
const { a, b } = identifiers;
|
|
35
|
+
return `Après avoir écrit la décomposition en facteurs premiers de chaque facteur, déterminer combien de zéros terminent l'écriture décimale du produit :
|
|
36
|
+
|
|
37
|
+
$$
|
|
38
|
+
${a}\\times ${b}
|
|
39
|
+
$$`;
|
|
40
|
+
};
|
|
41
|
+
const getHint = () => {
|
|
42
|
+
return `L'écriture décimale d'un nombre se termine par $n$ zéros si et seulement si ce nombre est divisible par $10^n$.`;
|
|
43
|
+
};
|
|
44
|
+
const getCorrection = (identifiers) => {
|
|
45
|
+
const { a, b } = identifiers;
|
|
46
|
+
const aDecomp = primeDecomposition(a);
|
|
47
|
+
const bDecomp = primeDecomposition(b);
|
|
48
|
+
const twoPower = (aDecomp.find((el) => el.value === 2)?.power ?? 0) +
|
|
49
|
+
(bDecomp.find((el) => el.value === 2)?.power ?? 0);
|
|
50
|
+
const fivePower = (aDecomp.find((el) => el.value === 5)?.power ?? 0) +
|
|
51
|
+
(bDecomp.find((el) => el.value === 5)?.power ?? 0);
|
|
52
|
+
const commonPower = Math.min(twoPower, fivePower);
|
|
53
|
+
return `On écrit la décomposition en facteurs premiers de chaque facteur du produit :
|
|
54
|
+
|
|
55
|
+
$$
|
|
56
|
+
${a} = ${primeDecompNode(a).toTex()}
|
|
57
|
+
$$
|
|
58
|
+
|
|
59
|
+
$$
|
|
60
|
+
${b} = ${primeDecompNode(b).toTex()}
|
|
61
|
+
$$
|
|
62
|
+
|
|
63
|
+
Le produit de ces deux nombres est donc divisible par $2^{${twoPower}}$ et par $5^{${fivePower}}$, donc il est divisible par $(2\\times 5)^{${commonPower}} = 10^{${commonPower}}$.
|
|
64
|
+
|
|
65
|
+
L'écriture décimle de ce produit se terminent donc par $${commonPower}$ zéro(s).
|
|
66
|
+
|
|
67
|
+
`;
|
|
68
|
+
};
|
|
69
|
+
const getKeys = () => {
|
|
70
|
+
return [];
|
|
71
|
+
};
|
|
72
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
73
|
+
try {
|
|
74
|
+
return numberVEA(ans, answer);
|
|
75
|
+
}
|
|
76
|
+
catch (err) {
|
|
77
|
+
return handleVEAError(err);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const getNumberOfEndingZerosOfBigProductQuestion = () => {
|
|
81
|
+
const primes = [2, 3, 5, 7];
|
|
82
|
+
let a = 0;
|
|
83
|
+
let b = 0;
|
|
84
|
+
let answer = "";
|
|
85
|
+
do {
|
|
86
|
+
const aPrimes = randomMany(primes, randint(2, 4)).sort((a, b) => a - b);
|
|
87
|
+
const bPrimes = doWhile(() => randomMany(primes, randint(2, 4)), (list) => list.every((p) => !aPrimes.includes(p))).sort((a, b) => a - b);
|
|
88
|
+
const aPowers = randTupleInt(aPrimes.length, {
|
|
89
|
+
from: 1,
|
|
90
|
+
to: 5,
|
|
91
|
+
});
|
|
92
|
+
const bPowers = randTupleInt(bPrimes.length, {
|
|
93
|
+
from: 1,
|
|
94
|
+
to: 5,
|
|
95
|
+
excludes: [aPowers],
|
|
96
|
+
});
|
|
97
|
+
a = operatorComposition(MultiplyNode, aPrimes.map((p, i) => power(p, aPowers[i]))).evaluate();
|
|
98
|
+
b = operatorComposition(MultiplyNode, bPrimes.map((p, i) => power(p, bPowers[i]))).evaluate();
|
|
99
|
+
answer = getAnswer({ a, b });
|
|
100
|
+
} while (isNaN(a) ||
|
|
101
|
+
isNaN(b) ||
|
|
102
|
+
a < 1000 ||
|
|
103
|
+
b < 1000 ||
|
|
104
|
+
answer.unfrenchify() < 1);
|
|
105
|
+
const identifiers = {
|
|
106
|
+
a,
|
|
107
|
+
b,
|
|
108
|
+
};
|
|
109
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
110
|
+
};
|
|
111
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
112
|
+
return {
|
|
113
|
+
answer: getAnswer(identifiers),
|
|
114
|
+
instruction: getInstruction(identifiers),
|
|
115
|
+
keys: getKeys(identifiers),
|
|
116
|
+
answerFormat: "tex",
|
|
117
|
+
identifiers,
|
|
118
|
+
hint: getHint(identifiers),
|
|
119
|
+
correction: getCorrection(identifiers),
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
export const numberOfEndingZerosOfBigProduct = {
|
|
123
|
+
id: "numberOfEndingZerosOfBigProduct",
|
|
124
|
+
connector: "=",
|
|
125
|
+
label: "Déterminer le nombre de zéros terminant l'écriture décimale d'un produit de grands nombres",
|
|
126
|
+
isSingleStep: true,
|
|
127
|
+
generator: (nb, opts) => getDistinctQuestions(() => getNumberOfEndingZerosOfBigProductQuestion(opts), nb),
|
|
128
|
+
qcmTimer: 60,
|
|
129
|
+
freeTimer: 60,
|
|
130
|
+
getPropositions,
|
|
131
|
+
isAnswerValid,
|
|
132
|
+
subject: "Mathématiques",
|
|
133
|
+
getInstruction,
|
|
134
|
+
getHint,
|
|
135
|
+
getCorrection,
|
|
136
|
+
getAnswer,
|
|
137
|
+
getQuestionFromIdentifiers,
|
|
138
|
+
hasHintAndCorrection: true,
|
|
139
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pgcdFromEuclid.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/arithmetic/pgcdFromEuclid.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CAEX,CAAC;AAoHF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAkBhD,CAAC"}
|