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
|
@@ -8,3 +8,6 @@ export * from "./mentalProgramSolve.js";
|
|
|
8
8
|
export * from "./mentalFractionageOfInteger.js";
|
|
9
9
|
export * from "./mentalFractionageOfQuantity.js";
|
|
10
10
|
export * from "./mentalApplyPercentageEvolution.js";
|
|
11
|
+
export * from "./mentalMultiplicationTable.js";
|
|
12
|
+
export * from "./mentalMultiplication11AndFriends.js";
|
|
13
|
+
export * from "./mentalMultiplication101AndFriends.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
numbers: number[];
|
|
4
|
+
};
|
|
5
|
+
type Options = {
|
|
6
|
+
factorPool: string[];
|
|
7
|
+
};
|
|
8
|
+
export declare const mentalMultiplication101AndFriends: Exercise<Identifiers, Options>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=mentalMultiplication101AndFriends.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mentalMultiplication101AndFriends.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/mentalMultiplication101AndFriends.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAmRF,KAAK,OAAO,GAAG;IACb,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAuBF,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAqB1E,CAAC"}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { GeneratorOptionTarget, GeneratorOptionType, addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { defaultArrayedOptsWhereNeeded } from "../../../../exercises/utils/options/arrayedOptions.js";
|
|
4
|
+
import { NumberNode } from "../../../../tree/nodes/numbers/numberNode.js";
|
|
5
|
+
import { MultiplyNode } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
6
|
+
import { operatorComposition } from "../../../../tree/utilities/operatorComposition.js";
|
|
7
|
+
import { random } from "../../../../utils/alea/random.js";
|
|
8
|
+
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
9
|
+
const getInstruction = (identifiers) => {
|
|
10
|
+
return `Calculer :
|
|
11
|
+
|
|
12
|
+
$$
|
|
13
|
+
${getStartStatement(identifiers)}
|
|
14
|
+
$$`;
|
|
15
|
+
};
|
|
16
|
+
const getStartStatement = (identifiers) => {
|
|
17
|
+
return getStatementNode(identifiers).toTex();
|
|
18
|
+
};
|
|
19
|
+
const getStatementNode = (identifiers) => {
|
|
20
|
+
const { numbers } = identifiers;
|
|
21
|
+
return operatorComposition(MultiplyNode, numbers.map((e) => e.toTree()));
|
|
22
|
+
};
|
|
23
|
+
const getAnswer = (identifiers) => {
|
|
24
|
+
const statement = getStatementNode(identifiers);
|
|
25
|
+
return statement.simplify().toTex();
|
|
26
|
+
};
|
|
27
|
+
const getHint = (identifiers) => {
|
|
28
|
+
const { numbers } = identifiers;
|
|
29
|
+
const [number1, number2] = numbers;
|
|
30
|
+
const [d2, u2] = (() => {
|
|
31
|
+
const u2 = number2 % 10;
|
|
32
|
+
const d2 = (number2 - u2) / 100;
|
|
33
|
+
return [d2, u2];
|
|
34
|
+
})();
|
|
35
|
+
switch (number2) {
|
|
36
|
+
case 101:
|
|
37
|
+
case 102:
|
|
38
|
+
case 201: {
|
|
39
|
+
return `
|
|
40
|
+
|
|
41
|
+
$$
|
|
42
|
+
${number1} \\times ${number2} = ${number1} \\times ${d2 * 100} + ${number1} \\times ${u2}
|
|
43
|
+
$$
|
|
44
|
+
|
|
45
|
+
$$
|
|
46
|
+
${number1} \\times ${number2} = ${number1 * d2} \\times 100 + ${number1 * u2}
|
|
47
|
+
$$
|
|
48
|
+
|
|
49
|
+
`;
|
|
50
|
+
}
|
|
51
|
+
case 150: {
|
|
52
|
+
return `
|
|
53
|
+
|
|
54
|
+
$$
|
|
55
|
+
${number1} \\times 100 = ${number1 * 100}
|
|
56
|
+
$$
|
|
57
|
+
|
|
58
|
+
donc :
|
|
59
|
+
|
|
60
|
+
$$
|
|
61
|
+
${number1} \\times 50 = \\frac{${number1} \\times 100}{2} = ${number1 * 50}
|
|
62
|
+
$$
|
|
63
|
+
|
|
64
|
+
`;
|
|
65
|
+
}
|
|
66
|
+
case 199: {
|
|
67
|
+
return `
|
|
68
|
+
|
|
69
|
+
$$
|
|
70
|
+
199 = 200 - 1
|
|
71
|
+
$$
|
|
72
|
+
|
|
73
|
+
$$
|
|
74
|
+
${number1} \\times 199 = ${number1} \\times 200 - ${number1} \\times 1
|
|
75
|
+
$$
|
|
76
|
+
|
|
77
|
+
et :
|
|
78
|
+
|
|
79
|
+
$$
|
|
80
|
+
${number1} \\times 200 = ${number1 * 2} \\times 100
|
|
81
|
+
$$
|
|
82
|
+
|
|
83
|
+
`;
|
|
84
|
+
}
|
|
85
|
+
default:
|
|
86
|
+
throw new Error("Unsupported number2: " + number2);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
const getCorrection = (identifiers) => {
|
|
90
|
+
const { numbers } = identifiers;
|
|
91
|
+
const [number1, number2] = numbers;
|
|
92
|
+
const [d2, u2] = (() => {
|
|
93
|
+
const u2 = number2 % 10;
|
|
94
|
+
const d2 = (number2 - u2) / 100;
|
|
95
|
+
return [d2, u2];
|
|
96
|
+
})();
|
|
97
|
+
switch (number2) {
|
|
98
|
+
case 101:
|
|
99
|
+
case 102:
|
|
100
|
+
case 201: {
|
|
101
|
+
return `
|
|
102
|
+
|
|
103
|
+
$$
|
|
104
|
+
${number1} \\times ${number2} = ${number1} \\times ${d2 * 100} + ${number1} \\times ${u2}
|
|
105
|
+
$$
|
|
106
|
+
|
|
107
|
+
$$
|
|
108
|
+
${number1} \\times ${number2} = ${number1 * d2} \\times 100 + ${number1 * u2}
|
|
109
|
+
$$
|
|
110
|
+
|
|
111
|
+
$$
|
|
112
|
+
${number1} \\times ${number2} = ${number1 * d2 * 100} + ${number1 * u2}
|
|
113
|
+
$$
|
|
114
|
+
|
|
115
|
+
$$
|
|
116
|
+
${number1} \\times ${number2} = ${number1 * number2}
|
|
117
|
+
$$
|
|
118
|
+
|
|
119
|
+
`;
|
|
120
|
+
}
|
|
121
|
+
case 150: {
|
|
122
|
+
return `
|
|
123
|
+
|
|
124
|
+
$$
|
|
125
|
+
${number1} \\times 100 = ${number1 * 100}
|
|
126
|
+
$$
|
|
127
|
+
|
|
128
|
+
donc :
|
|
129
|
+
|
|
130
|
+
$$
|
|
131
|
+
${number1} \\times 50 = \\frac{${number1} \\times 100}{2} = ${number1 * 50}
|
|
132
|
+
$$
|
|
133
|
+
|
|
134
|
+
$$
|
|
135
|
+
${number1} \\times ${number2} = ${number1 * 100} + ${number1 * 50}
|
|
136
|
+
$$
|
|
137
|
+
|
|
138
|
+
$$
|
|
139
|
+
${number1} \\times ${number2} = ${number1 * 150}
|
|
140
|
+
$$
|
|
141
|
+
|
|
142
|
+
`;
|
|
143
|
+
}
|
|
144
|
+
case 199: {
|
|
145
|
+
return `
|
|
146
|
+
|
|
147
|
+
$$
|
|
148
|
+
199 = 200 - 1
|
|
149
|
+
$$
|
|
150
|
+
|
|
151
|
+
$$
|
|
152
|
+
${number1} \\times 199 = ${number1} \\times 200 - ${number1} \\times 1
|
|
153
|
+
$$
|
|
154
|
+
|
|
155
|
+
On a :
|
|
156
|
+
|
|
157
|
+
$$
|
|
158
|
+
${number1} \\times 200 = ${number1 * 2} \\times 100
|
|
159
|
+
$$
|
|
160
|
+
|
|
161
|
+
Donc :
|
|
162
|
+
|
|
163
|
+
$$
|
|
164
|
+
${number1} \\times ${number2} = ${number1 * 200} - ${number1}
|
|
165
|
+
$$
|
|
166
|
+
|
|
167
|
+
$$
|
|
168
|
+
${number1} \\times ${number2} = ${number1 * 199}
|
|
169
|
+
$$
|
|
170
|
+
|
|
171
|
+
`;
|
|
172
|
+
}
|
|
173
|
+
default:
|
|
174
|
+
throw new Error("Unsupported number2: " + number2);
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
const getPropositions = (n, { answer, ...identifiers }) => {
|
|
178
|
+
const { numbers: [number1, number2], } = identifiers;
|
|
179
|
+
const propositions = [];
|
|
180
|
+
addValidProp(propositions, answer);
|
|
181
|
+
const poolProtoWrong1 = [
|
|
182
|
+
[number1 - 10, number2],
|
|
183
|
+
[number1, number2 - 10],
|
|
184
|
+
[number1 + 10, number2],
|
|
185
|
+
[number1, number2 + 10],
|
|
186
|
+
].map(([number1Wrong, number2Wrong]) => number1Wrong * number2Wrong);
|
|
187
|
+
const poolProtoWrong2 = (() => {
|
|
188
|
+
const vProduct = number1 * number2;
|
|
189
|
+
return [
|
|
190
|
+
...[...Array(5).keys()].map((i) => -i - 1),
|
|
191
|
+
...[...Array(5).keys()].map((i) => +i + 1),
|
|
192
|
+
]
|
|
193
|
+
.map((vOffset) => vProduct + vOffset)
|
|
194
|
+
.filter((v) => v >= 1);
|
|
195
|
+
})();
|
|
196
|
+
const obviousWrong = random([...poolProtoWrong1, ...poolProtoWrong2]);
|
|
197
|
+
const uP = (number1 * number2) % 10;
|
|
198
|
+
const poolCrypticWrong = [...poolProtoWrong1, ...poolProtoWrong2].map((v) => {
|
|
199
|
+
const vWu = v - (v % 10);
|
|
200
|
+
return vWu + uP;
|
|
201
|
+
});
|
|
202
|
+
shuffle([obviousWrong, ...poolCrypticWrong.slice(0, n - 2)]).forEach((v) => {
|
|
203
|
+
tryToAddWrongProp(propositions, v.frenchify());
|
|
204
|
+
});
|
|
205
|
+
return shuffleProps(propositions, n);
|
|
206
|
+
};
|
|
207
|
+
const isAnswerValid = (studentAns, { answer }) => {
|
|
208
|
+
const answerTree = new NumberNode(Number(answer.replace(",", ".")));
|
|
209
|
+
const texs = answerTree.toAllValidTexs();
|
|
210
|
+
return texs.includes(studentAns);
|
|
211
|
+
};
|
|
212
|
+
const getMentalMultiplication101AndFriendsQuestion = (optsIn) => {
|
|
213
|
+
const arrayedOptions = defaultArrayedOptsWhereNeeded(optsIn, arrayedOptsDefault);
|
|
214
|
+
const [number2] = [arrayedOptions.factorPool].map((numberPool) => random(numberPool.map((str) => parseInt(str))));
|
|
215
|
+
const number1Pool = [...Array(90).keys()]
|
|
216
|
+
.map((i) => i + 10)
|
|
217
|
+
.filter((v) => v % 10 !== 0);
|
|
218
|
+
const number1 = random(number1Pool);
|
|
219
|
+
const identifiers = { numbers: [number1, number2] };
|
|
220
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
221
|
+
};
|
|
222
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
223
|
+
const question = {
|
|
224
|
+
instruction: getInstruction(identifiers),
|
|
225
|
+
startStatement: getStartStatement(identifiers),
|
|
226
|
+
answer: getAnswer(identifiers),
|
|
227
|
+
keys: [],
|
|
228
|
+
answerFormat: "tex",
|
|
229
|
+
identifiers,
|
|
230
|
+
hint: getHint(identifiers),
|
|
231
|
+
correction: getCorrection(identifiers),
|
|
232
|
+
};
|
|
233
|
+
return question;
|
|
234
|
+
};
|
|
235
|
+
const arrayedOptsDefault = {
|
|
236
|
+
factorPool: [101, 102, 150, 199, 201].map((v) => v.frenchify()),
|
|
237
|
+
};
|
|
238
|
+
const options = [
|
|
239
|
+
{
|
|
240
|
+
id: "factorPool",
|
|
241
|
+
label: "Valeurs possible pour le facteur",
|
|
242
|
+
defaultValue: arrayedOptsDefault.factorPool,
|
|
243
|
+
values: [101, 102, 150, 199, 201].map((v) => v.frenchify()),
|
|
244
|
+
target: GeneratorOptionTarget.generation,
|
|
245
|
+
type: GeneratorOptionType.multiselect,
|
|
246
|
+
},
|
|
247
|
+
];
|
|
248
|
+
export const mentalMultiplication101AndFriends = {
|
|
249
|
+
id: "mentalMultiplication101AndFriends",
|
|
250
|
+
connector: "=",
|
|
251
|
+
label: "Multiplications par $101$,$102$,$150$,$199$,$201$",
|
|
252
|
+
isSingleStep: true,
|
|
253
|
+
generator: (nb, opts) => getDistinctQuestions(() => getMentalMultiplication101AndFriendsQuestion(opts), nb),
|
|
254
|
+
options,
|
|
255
|
+
qcmTimer: 60,
|
|
256
|
+
freeTimer: 60,
|
|
257
|
+
getPropositions,
|
|
258
|
+
isAnswerValid,
|
|
259
|
+
subject: "Mathématiques",
|
|
260
|
+
getQuestionFromIdentifiers,
|
|
261
|
+
getHint,
|
|
262
|
+
getCorrection,
|
|
263
|
+
hasHintAndCorrection: true,
|
|
264
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
numbers: number[];
|
|
4
|
+
};
|
|
5
|
+
type Options = {
|
|
6
|
+
factorPool: string[];
|
|
7
|
+
};
|
|
8
|
+
export declare const mentalMultiplication11AndFriends: Exercise<Identifiers, Options>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=mentalMultiplication11AndFriends.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mentalMultiplication11AndFriends.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/mentalMultiplication11AndFriends.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAmRF,KAAK,OAAO,GAAG;IACb,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAuBF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAqBzE,CAAC"}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { GeneratorOptionTarget, GeneratorOptionType, addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { defaultArrayedOptsWhereNeeded } from "../../../../exercises/utils/options/arrayedOptions.js";
|
|
4
|
+
import { NumberNode } from "../../../../tree/nodes/numbers/numberNode.js";
|
|
5
|
+
import { MultiplyNode } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
6
|
+
import { operatorComposition } from "../../../../tree/utilities/operatorComposition.js";
|
|
7
|
+
import { random } from "../../../../utils/alea/random.js";
|
|
8
|
+
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
9
|
+
const getInstruction = (identifiers) => {
|
|
10
|
+
return `Calculer :
|
|
11
|
+
|
|
12
|
+
$$
|
|
13
|
+
${getStartStatement(identifiers)}
|
|
14
|
+
$$`;
|
|
15
|
+
};
|
|
16
|
+
const getStartStatement = (identifiers) => {
|
|
17
|
+
return getStatementNode(identifiers).toTex();
|
|
18
|
+
};
|
|
19
|
+
const getStatementNode = (identifiers) => {
|
|
20
|
+
const { numbers } = identifiers;
|
|
21
|
+
return operatorComposition(MultiplyNode, numbers.map((e) => e.toTree()));
|
|
22
|
+
};
|
|
23
|
+
const getAnswer = (identifiers) => {
|
|
24
|
+
const statement = getStatementNode(identifiers);
|
|
25
|
+
return statement.simplify().toTex();
|
|
26
|
+
};
|
|
27
|
+
const getHint = (identifiers) => {
|
|
28
|
+
const { numbers } = identifiers;
|
|
29
|
+
const [number1, number2] = numbers;
|
|
30
|
+
const [d2, u2] = (() => {
|
|
31
|
+
const u2 = number2 % 10;
|
|
32
|
+
const d2 = (number2 - u2) / 10;
|
|
33
|
+
return [d2, u2];
|
|
34
|
+
})();
|
|
35
|
+
switch (number2) {
|
|
36
|
+
case 11:
|
|
37
|
+
case 12:
|
|
38
|
+
case 21: {
|
|
39
|
+
return `
|
|
40
|
+
|
|
41
|
+
$$
|
|
42
|
+
${number1} \\times ${number2} = ${number1} \\times ${d2 * 10} + ${number1} \\times ${u2}
|
|
43
|
+
$$
|
|
44
|
+
|
|
45
|
+
$$
|
|
46
|
+
${number1} \\times ${number2} = ${number1 * d2} \\times 10 + ${number1 * u2}
|
|
47
|
+
$$
|
|
48
|
+
|
|
49
|
+
`;
|
|
50
|
+
}
|
|
51
|
+
case 15: {
|
|
52
|
+
return `
|
|
53
|
+
|
|
54
|
+
$$
|
|
55
|
+
${number1} \\times 10 = ${number1 * 10}
|
|
56
|
+
$$
|
|
57
|
+
|
|
58
|
+
donc :
|
|
59
|
+
|
|
60
|
+
$$
|
|
61
|
+
${number1} \\times 5 = \\frac{${number1} \\times 10}{2} = ${number1 * 5}
|
|
62
|
+
$$
|
|
63
|
+
|
|
64
|
+
`;
|
|
65
|
+
}
|
|
66
|
+
case 19: {
|
|
67
|
+
return `
|
|
68
|
+
|
|
69
|
+
$$
|
|
70
|
+
19 = 20 - 1
|
|
71
|
+
$$
|
|
72
|
+
|
|
73
|
+
$$
|
|
74
|
+
${number1} \\times 19 = ${number1} \\times 20 - ${number1} \\times 1
|
|
75
|
+
$$
|
|
76
|
+
|
|
77
|
+
et :
|
|
78
|
+
|
|
79
|
+
$$
|
|
80
|
+
${number1} \\times 20 = ${number1 * 2} \\times 10
|
|
81
|
+
$$
|
|
82
|
+
|
|
83
|
+
`;
|
|
84
|
+
}
|
|
85
|
+
default:
|
|
86
|
+
throw new Error("Unsupported number2: " + number2);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
const getCorrection = (identifiers) => {
|
|
90
|
+
const { numbers } = identifiers;
|
|
91
|
+
const [number1, number2] = numbers;
|
|
92
|
+
const [d2, u2] = (() => {
|
|
93
|
+
const u2 = number2 % 10;
|
|
94
|
+
const d2 = (number2 - u2) / 10;
|
|
95
|
+
return [d2, u2];
|
|
96
|
+
})();
|
|
97
|
+
switch (number2) {
|
|
98
|
+
case 11:
|
|
99
|
+
case 12:
|
|
100
|
+
case 21: {
|
|
101
|
+
return `
|
|
102
|
+
|
|
103
|
+
$$
|
|
104
|
+
${number1} \\times ${number2} = ${number1} \\times ${d2 * 10} + ${number1} \\times ${u2}
|
|
105
|
+
$$
|
|
106
|
+
|
|
107
|
+
$$
|
|
108
|
+
${number1} \\times ${number2} = ${number1 * d2} \\times 10 + ${number1 * u2}
|
|
109
|
+
$$
|
|
110
|
+
|
|
111
|
+
$$
|
|
112
|
+
${number1} \\times ${number2} = ${number1 * d2 * 10} + ${number1 * u2}
|
|
113
|
+
$$
|
|
114
|
+
|
|
115
|
+
$$
|
|
116
|
+
${number1} \\times ${number2} = ${number1 * number2}
|
|
117
|
+
$$
|
|
118
|
+
|
|
119
|
+
`;
|
|
120
|
+
}
|
|
121
|
+
case 15: {
|
|
122
|
+
return `
|
|
123
|
+
|
|
124
|
+
$$
|
|
125
|
+
${number1} \\times 10 = ${number1 * 10}
|
|
126
|
+
$$
|
|
127
|
+
|
|
128
|
+
donc :
|
|
129
|
+
|
|
130
|
+
$$
|
|
131
|
+
${number1} \\times 5 = \\frac{${number1} \\times 10}{2} = ${number1 * 5}
|
|
132
|
+
$$
|
|
133
|
+
|
|
134
|
+
$$
|
|
135
|
+
${number1} \\times ${number2} = ${number1 * 10} + ${number1 * 5}
|
|
136
|
+
$$
|
|
137
|
+
|
|
138
|
+
$$
|
|
139
|
+
${number1} \\times ${number2} = ${number1 * 15}
|
|
140
|
+
$$
|
|
141
|
+
|
|
142
|
+
`;
|
|
143
|
+
}
|
|
144
|
+
case 19: {
|
|
145
|
+
return `
|
|
146
|
+
|
|
147
|
+
$$
|
|
148
|
+
19 = 20 - 1
|
|
149
|
+
$$
|
|
150
|
+
|
|
151
|
+
$$
|
|
152
|
+
${number1} \\times 19 = ${number1} \\times 20 - ${number1} \\times 1
|
|
153
|
+
$$
|
|
154
|
+
|
|
155
|
+
On a :
|
|
156
|
+
|
|
157
|
+
$$
|
|
158
|
+
${number1} \\times 20 = ${number1 * 2} \\times 10
|
|
159
|
+
$$
|
|
160
|
+
|
|
161
|
+
Donc :
|
|
162
|
+
|
|
163
|
+
$$
|
|
164
|
+
${number1} \\times ${number2} = ${number1 * 20} - ${number1}
|
|
165
|
+
$$
|
|
166
|
+
|
|
167
|
+
$$
|
|
168
|
+
${number1} \\times ${number2} = ${number1 * 19}
|
|
169
|
+
$$
|
|
170
|
+
|
|
171
|
+
`;
|
|
172
|
+
}
|
|
173
|
+
default:
|
|
174
|
+
throw new Error("Unsupported number2: " + number2);
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
const getPropositions = (n, { answer, ...identifiers }) => {
|
|
178
|
+
const { numbers: [number1, number2], } = identifiers;
|
|
179
|
+
const propositions = [];
|
|
180
|
+
addValidProp(propositions, answer);
|
|
181
|
+
const poolProtoWrong1 = [
|
|
182
|
+
[number1 - 1, number2],
|
|
183
|
+
[number1, number2 - 1],
|
|
184
|
+
[number1 + 1, number2],
|
|
185
|
+
[number1, number2 + 1],
|
|
186
|
+
].map(([number1Wrong, number2Wrong]) => number1Wrong * number2Wrong);
|
|
187
|
+
const poolProtoWrong2 = (() => {
|
|
188
|
+
const vProduct = number1 * number2;
|
|
189
|
+
return [
|
|
190
|
+
...[...Array(5).keys()].map((i) => -i - 1),
|
|
191
|
+
...[...Array(5).keys()].map((i) => +i + 1),
|
|
192
|
+
]
|
|
193
|
+
.map((vOffset) => vProduct + vOffset)
|
|
194
|
+
.filter((v) => v >= 1);
|
|
195
|
+
})();
|
|
196
|
+
const obviousWrong = random([...poolProtoWrong1, ...poolProtoWrong2]);
|
|
197
|
+
const uP = (number1 * number2) % 10;
|
|
198
|
+
const poolCrypticWrong = [...poolProtoWrong1, ...poolProtoWrong2].map((v) => {
|
|
199
|
+
const vWu = v - (v % 10);
|
|
200
|
+
return vWu + uP;
|
|
201
|
+
});
|
|
202
|
+
shuffle([obviousWrong, ...poolCrypticWrong.slice(0, n - 2)]).forEach((v) => {
|
|
203
|
+
tryToAddWrongProp(propositions, v.frenchify());
|
|
204
|
+
});
|
|
205
|
+
return shuffleProps(propositions, n);
|
|
206
|
+
};
|
|
207
|
+
const isAnswerValid = (studentAns, { answer }) => {
|
|
208
|
+
const answerTree = new NumberNode(Number(answer.replace(",", ".")));
|
|
209
|
+
const texs = answerTree.toAllValidTexs();
|
|
210
|
+
return texs.includes(studentAns);
|
|
211
|
+
};
|
|
212
|
+
const getMentalMultiplication11AndFriendsQuestion = (optsIn) => {
|
|
213
|
+
const arrayedOptions = defaultArrayedOptsWhereNeeded(optsIn, arrayedOptsDefault);
|
|
214
|
+
const [number2] = [arrayedOptions.factorPool].map((numberPool) => random(numberPool.map((str) => parseInt(str))));
|
|
215
|
+
const number1Pool = [...Array(90).keys()]
|
|
216
|
+
.map((i) => i + 10)
|
|
217
|
+
.filter((v) => v % 10 !== 0);
|
|
218
|
+
const number1 = random(number1Pool);
|
|
219
|
+
const identifiers = { numbers: [number1, number2] };
|
|
220
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
221
|
+
};
|
|
222
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
223
|
+
const question = {
|
|
224
|
+
instruction: getInstruction(identifiers),
|
|
225
|
+
startStatement: getStartStatement(identifiers),
|
|
226
|
+
answer: getAnswer(identifiers),
|
|
227
|
+
keys: [],
|
|
228
|
+
answerFormat: "tex",
|
|
229
|
+
identifiers,
|
|
230
|
+
hint: getHint(identifiers),
|
|
231
|
+
correction: getCorrection(identifiers),
|
|
232
|
+
};
|
|
233
|
+
return question;
|
|
234
|
+
};
|
|
235
|
+
const arrayedOptsDefault = {
|
|
236
|
+
factorPool: [11, 12, 15, 19, 21].map((v) => v.frenchify()),
|
|
237
|
+
};
|
|
238
|
+
const options = [
|
|
239
|
+
{
|
|
240
|
+
id: "factorPool",
|
|
241
|
+
label: "Valeurs possible pour le facteur",
|
|
242
|
+
defaultValue: arrayedOptsDefault.factorPool,
|
|
243
|
+
values: [11, 12, 15, 19, 21].map((v) => v.frenchify()),
|
|
244
|
+
target: GeneratorOptionTarget.generation,
|
|
245
|
+
type: GeneratorOptionType.multiselect,
|
|
246
|
+
},
|
|
247
|
+
];
|
|
248
|
+
export const mentalMultiplication11AndFriends = {
|
|
249
|
+
id: "mentalMultiplication11AndFriends",
|
|
250
|
+
connector: "=",
|
|
251
|
+
label: "Multiplications par $11$,$12$,$15$,$19$,$21$",
|
|
252
|
+
isSingleStep: true,
|
|
253
|
+
generator: (nb, opts) => getDistinctQuestions(() => getMentalMultiplication11AndFriendsQuestion(opts), nb),
|
|
254
|
+
options,
|
|
255
|
+
qcmTimer: 60,
|
|
256
|
+
freeTimer: 60,
|
|
257
|
+
getPropositions,
|
|
258
|
+
isAnswerValid,
|
|
259
|
+
subject: "Mathématiques",
|
|
260
|
+
getQuestionFromIdentifiers,
|
|
261
|
+
getHint,
|
|
262
|
+
getCorrection,
|
|
263
|
+
hasHintAndCorrection: true,
|
|
264
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
numbers: number[];
|
|
4
|
+
};
|
|
5
|
+
type Options = {
|
|
6
|
+
number1Pool: string[];
|
|
7
|
+
number2Pool: string[];
|
|
8
|
+
};
|
|
9
|
+
export declare const mentalMultiplicationTable: Exercise<Identifiers, Options>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=mentalMultiplicationTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mentalMultiplicationTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/mentalMultiplicationTable.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAkIF,KAAK,OAAO,GAAG;IACb,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAgCF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAiBpE,CAAC"}
|