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,10 @@
|
|
|
1
|
+
export * from "./addComplex.js";
|
|
2
|
+
export * from "./conjugateComplex.js";
|
|
3
|
+
export * from "./conjugateDivideComplex.js";
|
|
4
|
+
export * from "./conjugateMultiplyComplex.js";
|
|
5
|
+
export * from "./divideComplex.js";
|
|
6
|
+
export * from "./inverseComplex.js";
|
|
7
|
+
export * from "./linearCombinaisonComplex.js";
|
|
8
|
+
export * from "./moduloFromAlgebraicComplex.js";
|
|
9
|
+
export * from "./mutiplyComplex.js";
|
|
10
|
+
export * from "./reAndIm.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inverseComplex.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/complex/algebraic/inverseComplex.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAoFF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { addValidProp, propWhile, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { Complex, ComplexConstructor } from "../../../../math/complex/complex.js";
|
|
4
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
+
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
6
|
+
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
7
|
+
import { square } from "../../../../tree/nodes/operators/powerNode.js";
|
|
8
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
9
|
+
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
10
|
+
import { alignTex } from "../../../../utils/latex/alignTex.js";
|
|
11
|
+
const getInstruction = (identifiers) => {
|
|
12
|
+
const complex = new Complex(identifiers.re, identifiers.im);
|
|
13
|
+
return `Déterminer l'inverse de $z=${complex.toTree().toTex()}$.`;
|
|
14
|
+
};
|
|
15
|
+
const getAnswer = (identifiers) => {
|
|
16
|
+
const complex = new Complex(identifiers.re, identifiers.im);
|
|
17
|
+
const answer = complex.inverseNode().toTex();
|
|
18
|
+
return answer;
|
|
19
|
+
};
|
|
20
|
+
const getHint = () => {
|
|
21
|
+
return `Pour calculer un quotient dans $\\mathbb{C}$, on multiplie le numérateur et le dénominateur par le conjugué du dénominateur.
|
|
22
|
+
|
|
23
|
+
On rappelle que le conjugué d'un nombre complexe $z$ est le nombre complexe de même partie réelle et de partie imaginaire opposée.
|
|
24
|
+
`;
|
|
25
|
+
};
|
|
26
|
+
const getCorrection = (identifiers) => {
|
|
27
|
+
const { im, re } = identifiers;
|
|
28
|
+
const z = new Complex(re, im);
|
|
29
|
+
const zTree = z.toTree();
|
|
30
|
+
const conj = z.conjugate().toTree();
|
|
31
|
+
return `On cherche à calculer $\\frac{1}{${zTree.toTex()}}$.
|
|
32
|
+
|
|
33
|
+
Pour cela, on multiplie le numérateur et le dénominateur de ce quotient par le conjugué du dénominateur :
|
|
34
|
+
|
|
35
|
+
${alignTex([
|
|
36
|
+
["", ` \\frac{1}{${zTree.toTex()}} `],
|
|
37
|
+
["=", `\\frac{${conj.toTex()}}{(${zTree.toTex()})(${conj.toTex()})}`],
|
|
38
|
+
["=", frac(conj, substract(re ** 2, square(multiply(im, "i")))).toTex()],
|
|
39
|
+
["=", frac(conj, re ** 2 + im ** 2).toTex()],
|
|
40
|
+
["=", getAnswer(identifiers)],
|
|
41
|
+
])}`;
|
|
42
|
+
};
|
|
43
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
44
|
+
const question = {
|
|
45
|
+
answer: getAnswer(identifiers),
|
|
46
|
+
instruction: getInstruction(identifiers),
|
|
47
|
+
keys: ["i"],
|
|
48
|
+
answerFormat: "tex",
|
|
49
|
+
identifiers,
|
|
50
|
+
startStatement: "\\frac{1}{z}",
|
|
51
|
+
hint: getHint(identifiers),
|
|
52
|
+
correction: getCorrection(identifiers),
|
|
53
|
+
};
|
|
54
|
+
return question;
|
|
55
|
+
};
|
|
56
|
+
const getInverseComplexQuestion = () => {
|
|
57
|
+
const re = randint(-10, 11, [0]);
|
|
58
|
+
const im = randint(-10, 11, [0]);
|
|
59
|
+
const identifiers = { re, im };
|
|
60
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
61
|
+
};
|
|
62
|
+
const getPropositions = (n, { answer, re, im }) => {
|
|
63
|
+
const propositions = [];
|
|
64
|
+
addValidProp(propositions, answer);
|
|
65
|
+
const complex = new Complex(re, im);
|
|
66
|
+
const opposite = complex.opposite().toTree().toTex();
|
|
67
|
+
tryToAddWrongProp(propositions, opposite);
|
|
68
|
+
const conj = complex.conjugate().toTree().toTex();
|
|
69
|
+
tryToAddWrongProp(propositions, conj);
|
|
70
|
+
propWhile(propositions, n, () => {
|
|
71
|
+
const wrongAnswer = ComplexConstructor.random();
|
|
72
|
+
tryToAddWrongProp(propositions, wrongAnswer.toTree().toTex());
|
|
73
|
+
});
|
|
74
|
+
return shuffle(propositions);
|
|
75
|
+
};
|
|
76
|
+
const isAnswerValid = (ans, { re, im }) => {
|
|
77
|
+
const z = new Complex(re, im);
|
|
78
|
+
const inv = z.inverseNode();
|
|
79
|
+
const texs = inv.toAllValidTexs({ allowFractionToDecimal: true });
|
|
80
|
+
return texs.includes(ans);
|
|
81
|
+
};
|
|
82
|
+
export const inverseComplex = {
|
|
83
|
+
id: "inverseComplex",
|
|
84
|
+
connector: "=",
|
|
85
|
+
label: "Inverse d'un nombre complexe",
|
|
86
|
+
isSingleStep: true,
|
|
87
|
+
generator: (nb) => getDistinctQuestions(getInverseComplexQuestion, nb),
|
|
88
|
+
qcmTimer: 60,
|
|
89
|
+
freeTimer: 60,
|
|
90
|
+
getPropositions,
|
|
91
|
+
isAnswerValid,
|
|
92
|
+
subject: "Mathématiques",
|
|
93
|
+
getQuestionFromIdentifiers,
|
|
94
|
+
hasHintAndCorrection: true,
|
|
95
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
a: number;
|
|
4
|
+
b: number;
|
|
5
|
+
z1: number[];
|
|
6
|
+
z2: number[];
|
|
7
|
+
};
|
|
8
|
+
export declare const linearCombinaisonComplex: Exercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=linearCombinaisonComplex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linearCombinaisonComplex.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/complex/algebraic/linearCombinaisonComplex.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,EAAE,EAAE,MAAM,EAAE,CAAC;CACd,CAAC;AAmGF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAc1D,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { addValidProp, propWhile, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { Complex, ComplexConstructor } from "../../../../math/complex/complex.js";
|
|
4
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
6
|
+
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
7
|
+
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
8
|
+
import { alignTex } from "../../../../utils/latex/alignTex.js";
|
|
9
|
+
const getInstruction = (identifiers) => {
|
|
10
|
+
const { a, b, z1, z2 } = identifiers;
|
|
11
|
+
const z1Complex = new Complex(z1[0], z1[1]);
|
|
12
|
+
const z2Complex = new Complex(z2[0], z2[1]);
|
|
13
|
+
const statement = add(multiply(a, "z_1"), multiply(b, "z_2"));
|
|
14
|
+
return `Soit $z_1=${z1Complex.toTree().toTex()}$ et $z_2=${z2Complex
|
|
15
|
+
.toTree()
|
|
16
|
+
.toTex()}$.
|
|
17
|
+
|
|
18
|
+
Calculer $${statement.toTex()}$.`;
|
|
19
|
+
};
|
|
20
|
+
const getAnswer = (identifiers) => {
|
|
21
|
+
const { a, b, z1, z2 } = identifiers;
|
|
22
|
+
const z1Complex = new Complex(z1[0], z1[1]);
|
|
23
|
+
const z2Complex = new Complex(z2[0], z2[1]);
|
|
24
|
+
const answer = z1Complex.times(a).add(z2Complex.times(b)).toTree().toTex();
|
|
25
|
+
return answer;
|
|
26
|
+
};
|
|
27
|
+
const getHint = () => {
|
|
28
|
+
return `L'addition et la multiplication des nombres réels se prolongent aux nombres complexes : les règles de calcul sont les mêmes.
|
|
29
|
+
`;
|
|
30
|
+
};
|
|
31
|
+
const getCorrection = (identifiers) => {
|
|
32
|
+
const { a, b, z1, z2 } = identifiers;
|
|
33
|
+
const z1Complex = new Complex(z1[0], z1[1]).toTree().toRawTree();
|
|
34
|
+
const z2Complex = new Complex(z2[0], z2[1]).toTree().toRawTree();
|
|
35
|
+
const z1Aff = multiply(a, z1Complex);
|
|
36
|
+
const z2Aff = multiply(b, z2Complex);
|
|
37
|
+
return `On applique les mêmes règles de calcul que pour les nombres réels :
|
|
38
|
+
|
|
39
|
+
${alignTex([
|
|
40
|
+
["", add(z1Aff, z2Aff).toTex()],
|
|
41
|
+
[
|
|
42
|
+
"=",
|
|
43
|
+
add(z1Aff.simplify({
|
|
44
|
+
towardsDistribute: true,
|
|
45
|
+
forbidFactorize: true,
|
|
46
|
+
noAddOrder: true,
|
|
47
|
+
}), z2Aff.simplify({
|
|
48
|
+
towardsDistribute: true,
|
|
49
|
+
forbidFactorize: true,
|
|
50
|
+
noAddOrder: true,
|
|
51
|
+
})).toTex(),
|
|
52
|
+
],
|
|
53
|
+
["=", getAnswer(identifiers)],
|
|
54
|
+
])}`;
|
|
55
|
+
};
|
|
56
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
57
|
+
const question = {
|
|
58
|
+
answer: getAnswer(identifiers),
|
|
59
|
+
instruction: getInstruction(identifiers),
|
|
60
|
+
keys: ["i", "z", "quote"],
|
|
61
|
+
answerFormat: "tex",
|
|
62
|
+
identifiers,
|
|
63
|
+
hint: getHint(identifiers),
|
|
64
|
+
correction: getCorrection(identifiers),
|
|
65
|
+
};
|
|
66
|
+
return question;
|
|
67
|
+
};
|
|
68
|
+
const getLinearCombinaisonComplexQuestion = () => {
|
|
69
|
+
const z1 = ComplexConstructor.random();
|
|
70
|
+
const z2 = ComplexConstructor.random();
|
|
71
|
+
const a = randint(-10, 11, [0]);
|
|
72
|
+
const b = randint(-10, 11, [0]);
|
|
73
|
+
const identifiers = { a, b, z1: [z1.re, z1.im], z2: [z2.re, z2.im] };
|
|
74
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
75
|
+
};
|
|
76
|
+
const getPropositions = (n, { answer }) => {
|
|
77
|
+
const propositions = [];
|
|
78
|
+
addValidProp(propositions, answer);
|
|
79
|
+
propWhile(propositions, n, () => {
|
|
80
|
+
const wrongAnswer = ComplexConstructor.random();
|
|
81
|
+
tryToAddWrongProp(propositions, wrongAnswer.toTree().toTex());
|
|
82
|
+
});
|
|
83
|
+
return shuffle(propositions);
|
|
84
|
+
};
|
|
85
|
+
const isAnswerValid = (ans, { a, b, z1, z2 }) => {
|
|
86
|
+
const complex1 = new Complex(z1[0], z1[1]);
|
|
87
|
+
const complex2 = new Complex(z2[0], z2[1]);
|
|
88
|
+
const answerTree = complex1.times(a).add(complex2.times(b)).toTree();
|
|
89
|
+
const texs = answerTree.toAllValidTexs();
|
|
90
|
+
return texs.includes(ans);
|
|
91
|
+
};
|
|
92
|
+
export const linearCombinaisonComplex = {
|
|
93
|
+
id: "linearCombinaisonComplex",
|
|
94
|
+
connector: "=",
|
|
95
|
+
label: "Combinaison linéaire de deux nombres complexes",
|
|
96
|
+
isSingleStep: true,
|
|
97
|
+
generator: (nb) => getDistinctQuestions(getLinearCombinaisonComplexQuestion, nb),
|
|
98
|
+
qcmTimer: 60,
|
|
99
|
+
freeTimer: 60,
|
|
100
|
+
getPropositions,
|
|
101
|
+
isAnswerValid,
|
|
102
|
+
subject: "Mathématiques",
|
|
103
|
+
getQuestionFromIdentifiers,
|
|
104
|
+
hasHintAndCorrection: true,
|
|
105
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moduloFromAlgebraicComplex.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/complex/algebraic/moduloFromAlgebraicComplex.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAoFF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAc5D,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { addValidProp, propWhile, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { sqrtVEA } from "../../../../exercises/vea/sqrtVEA.js";
|
|
4
|
+
import { Complex, ComplexConstructor } from "../../../../math/complex/complex.js";
|
|
5
|
+
import { SquareRoot } from "../../../../math/numbers/reals/real.js";
|
|
6
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
7
|
+
import { sqrt } from "../../../../tree/nodes/functions/sqrtNode.js";
|
|
8
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
9
|
+
import { square } from "../../../../tree/nodes/operators/powerNode.js";
|
|
10
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
11
|
+
import { alignTex } from "../../../../utils/latex/alignTex.js";
|
|
12
|
+
const getInstruction = (identifiers) => {
|
|
13
|
+
const zTex = new Complex(identifiers.re, identifiers.im).toTree().toTex();
|
|
14
|
+
return `Soit $z=${zTex}$.
|
|
15
|
+
|
|
16
|
+
Déterminer le module $|z|$ de $z$.`;
|
|
17
|
+
};
|
|
18
|
+
const getAnswer = (identifiers) => {
|
|
19
|
+
const z = new Complex(identifiers.re, identifiers.im);
|
|
20
|
+
const answer = z.toModuleTree().toTex();
|
|
21
|
+
return answer;
|
|
22
|
+
};
|
|
23
|
+
const getHint = () => {
|
|
24
|
+
return `Si $z$ est un nombre complexe de forme algébrique
|
|
25
|
+
|
|
26
|
+
$$
|
|
27
|
+
z = x+iy
|
|
28
|
+
$$
|
|
29
|
+
|
|
30
|
+
avec $x$ et $y$ réels, alors le module de $z$ est le nombre :
|
|
31
|
+
|
|
32
|
+
$$
|
|
33
|
+
|z| = \\sqrt{x^2 + y^2}
|
|
34
|
+
$$`;
|
|
35
|
+
};
|
|
36
|
+
const getCorrection = (identifiers) => {
|
|
37
|
+
const { im, re } = identifiers;
|
|
38
|
+
return `Le module $|z|$ de $z$ vaut :
|
|
39
|
+
|
|
40
|
+
${alignTex([
|
|
41
|
+
["|z|", "=", sqrt(add(square(re), square(im))).toTex()],
|
|
42
|
+
["", "=", sqrt(re ** 2 + im ** 2).toSimplificationTex()],
|
|
43
|
+
])}`;
|
|
44
|
+
};
|
|
45
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
46
|
+
const question = {
|
|
47
|
+
answer: getAnswer(identifiers),
|
|
48
|
+
instruction: getInstruction(identifiers),
|
|
49
|
+
keys: [],
|
|
50
|
+
answerFormat: "tex",
|
|
51
|
+
identifiers,
|
|
52
|
+
hint: getHint(identifiers),
|
|
53
|
+
correction: getCorrection(identifiers),
|
|
54
|
+
};
|
|
55
|
+
return question;
|
|
56
|
+
};
|
|
57
|
+
const getModuloFromAlgebraicComplexQuestion = () => {
|
|
58
|
+
const z = ComplexConstructor.random();
|
|
59
|
+
const identifiers = { re: z.re, im: z.im };
|
|
60
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
61
|
+
};
|
|
62
|
+
const getPropositions = (n, { answer, re, im }) => {
|
|
63
|
+
const propositions = [];
|
|
64
|
+
addValidProp(propositions, answer);
|
|
65
|
+
tryToAddWrongProp(propositions, new SquareRoot(re + im).simplify().toTree().toTex());
|
|
66
|
+
tryToAddWrongProp(propositions, re ** 2 + im ** 2 + "");
|
|
67
|
+
propWhile(propositions, n, () => {
|
|
68
|
+
tryToAddWrongProp(propositions, `\\sqrt{${randint(0, 100)}}`);
|
|
69
|
+
});
|
|
70
|
+
return shuffleProps(propositions, n);
|
|
71
|
+
};
|
|
72
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
73
|
+
try {
|
|
74
|
+
return sqrtVEA(ans, answer);
|
|
75
|
+
}
|
|
76
|
+
catch (err) {
|
|
77
|
+
return handleVEAError(err);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
export const moduloFromAlgebraicComplex = {
|
|
81
|
+
id: "moduloFromAlgebraicComplex",
|
|
82
|
+
connector: "=",
|
|
83
|
+
label: "Déterminer le module d'un nombre complexe via sa forme algébrique",
|
|
84
|
+
isSingleStep: true,
|
|
85
|
+
generator: (nb) => getDistinctQuestions(getModuloFromAlgebraicComplexQuestion, nb),
|
|
86
|
+
qcmTimer: 60,
|
|
87
|
+
freeTimer: 60,
|
|
88
|
+
getPropositions,
|
|
89
|
+
isAnswerValid,
|
|
90
|
+
subject: "Mathématiques",
|
|
91
|
+
getQuestionFromIdentifiers,
|
|
92
|
+
hasHintAndCorrection: true,
|
|
93
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutiplyComplex.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/complex/algebraic/mutiplyComplex.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,EAAE,EAAE,MAAM,EAAE,CAAC;CACd,CAAC;AA2GF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { addValidProp, propWhile, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { Complex, ComplexConstructor } from "../../../../math/complex/complex.js";
|
|
4
|
+
import { randTupleInt } from "../../../../math/utils/random/randTupleInt.js";
|
|
5
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
6
|
+
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
7
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
8
|
+
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
9
|
+
import { alignTex } from "../../../../utils/latex/alignTex.js";
|
|
10
|
+
const getInstruction = (identifiers) => {
|
|
11
|
+
const z1 = new Complex(identifiers.z1[0], identifiers.z1[1]);
|
|
12
|
+
const z2 = new Complex(identifiers.z2[0], identifiers.z2[1]);
|
|
13
|
+
return `Soit $z=${z1.toTree().toTex()}$ et $z'=${z2.toTree().toTex()}$.
|
|
14
|
+
|
|
15
|
+
Calculer $z\\times z'$.`;
|
|
16
|
+
};
|
|
17
|
+
const getAnswer = (identifiers) => {
|
|
18
|
+
const z1 = new Complex(identifiers.z1[0], identifiers.z1[1]);
|
|
19
|
+
const z2 = new Complex(identifiers.z2[0], identifiers.z2[1]);
|
|
20
|
+
const answer = z1.multiply(z2).toTree().toTex();
|
|
21
|
+
return answer;
|
|
22
|
+
};
|
|
23
|
+
const getHint = () => {
|
|
24
|
+
return `Pour multiplier deux nombres complexes, on utilise la distributivité double, ainsi que le fait que $i^2 = -1$.`;
|
|
25
|
+
};
|
|
26
|
+
const getCorrection = (identifiers) => {
|
|
27
|
+
const { z1, z2 } = identifiers;
|
|
28
|
+
const [a, b] = z1;
|
|
29
|
+
const [c, d] = z2;
|
|
30
|
+
const zA = add(a, multiply(b, "i"));
|
|
31
|
+
const zB = add(c, multiply(d, "i"));
|
|
32
|
+
return `On distribue comme pour des nombres réels, puis on utilise le fait que $i^2=-1$ :
|
|
33
|
+
|
|
34
|
+
${alignTex([
|
|
35
|
+
["z\\times z'", "=", multiply(zA, zB).toTex()],
|
|
36
|
+
[
|
|
37
|
+
"",
|
|
38
|
+
"=",
|
|
39
|
+
add(add(multiply(a, c), multiply(a, multiply(d, "i"))), add(multiply(multiply(b, "i"), c), multiply(multiply(b, "i"), multiply(d, "i")))).toTex(),
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
"",
|
|
43
|
+
"=",
|
|
44
|
+
add(add(multiply(a, c).simplify(), multiply(a * d + b * c, "i")), multiply(multiply(b, d).simplify(), -1)).toTex(),
|
|
45
|
+
],
|
|
46
|
+
["", "=", getAnswer(identifiers)],
|
|
47
|
+
])}`;
|
|
48
|
+
};
|
|
49
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
50
|
+
const question = {
|
|
51
|
+
answer: getAnswer(identifiers),
|
|
52
|
+
instruction: getInstruction(identifiers),
|
|
53
|
+
keys: ["i"],
|
|
54
|
+
answerFormat: "tex",
|
|
55
|
+
startStatement: "z\\times z'",
|
|
56
|
+
identifiers,
|
|
57
|
+
hint: getHint(identifiers),
|
|
58
|
+
correction: getCorrection(identifiers),
|
|
59
|
+
};
|
|
60
|
+
return question;
|
|
61
|
+
};
|
|
62
|
+
const getMutiplyComplexQuestion = () => {
|
|
63
|
+
const [a, b, c, d] = randTupleInt(4, { from: -9, to: 10, elExcludes: [0] });
|
|
64
|
+
const identifiers = { z1: [a, b], z2: [c, d] };
|
|
65
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
66
|
+
};
|
|
67
|
+
const getPropositions = (n, { answer, z1, z2 }) => {
|
|
68
|
+
const propositions = [];
|
|
69
|
+
addValidProp(propositions, answer);
|
|
70
|
+
const prod = new Complex(z1[0], z1[1]).multiply(new Complex(z2[0], z2[1]));
|
|
71
|
+
tryToAddWrongProp(propositions, prod.conjugate().toTree().toTex());
|
|
72
|
+
propWhile(propositions, n, () => {
|
|
73
|
+
const wrongAnswer = ComplexConstructor.random();
|
|
74
|
+
tryToAddWrongProp(propositions, wrongAnswer.toTree().toTex());
|
|
75
|
+
});
|
|
76
|
+
return shuffle(propositions);
|
|
77
|
+
};
|
|
78
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
79
|
+
const parsed = parseAlgebraic(ans);
|
|
80
|
+
if (!parsed)
|
|
81
|
+
return false;
|
|
82
|
+
return (parsed
|
|
83
|
+
.simplify({
|
|
84
|
+
forbidFactorize: true,
|
|
85
|
+
})
|
|
86
|
+
.toTex() ===
|
|
87
|
+
parseAlgebraic(answer)
|
|
88
|
+
.simplify({
|
|
89
|
+
forbidFactorize: true,
|
|
90
|
+
})
|
|
91
|
+
.toTex());
|
|
92
|
+
};
|
|
93
|
+
export const mutiplyComplex = {
|
|
94
|
+
id: "mutiplyComplex",
|
|
95
|
+
connector: "=",
|
|
96
|
+
label: "Multiplier deux nombres complexes",
|
|
97
|
+
isSingleStep: true,
|
|
98
|
+
generator: (nb) => getDistinctQuestions(getMutiplyComplexQuestion, nb),
|
|
99
|
+
qcmTimer: 60,
|
|
100
|
+
freeTimer: 60,
|
|
101
|
+
getPropositions,
|
|
102
|
+
isAnswerValid,
|
|
103
|
+
subject: "Mathématiques",
|
|
104
|
+
getQuestionFromIdentifiers,
|
|
105
|
+
hasHintAndCorrection: true,
|
|
106
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reAndIm.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/complex/algebraic/reAndIm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AA2FF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,WAAW,CAazC,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { addValidProp, propWhile, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { numberVEA } from "../../../../exercises/vea/numberVEA.js";
|
|
4
|
+
import { Complex, ComplexConstructor } from "../../../../math/complex/complex.js";
|
|
5
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
6
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
7
|
+
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
8
|
+
import { doWhile } from "../../../../utils/doWhile.js";
|
|
9
|
+
const getInstruction = (identifiers) => {
|
|
10
|
+
const { re, im, isRe } = identifiers;
|
|
11
|
+
const z1 = new Complex(re, im);
|
|
12
|
+
return `Soit $z=${z1.toTree().toTex()}$.
|
|
13
|
+
|
|
14
|
+
Quelle est la partie ${isRe ? "réelle" : "imaginaire"} de $z$ ?`;
|
|
15
|
+
};
|
|
16
|
+
const getAnswer = (identifiers) => {
|
|
17
|
+
const { re, im, isRe } = identifiers;
|
|
18
|
+
const z1 = new Complex(re, im);
|
|
19
|
+
const answer = (isRe ? z1.re : z1.im) + "";
|
|
20
|
+
return answer;
|
|
21
|
+
};
|
|
22
|
+
const getHint = () => {
|
|
23
|
+
return `Si $z$ est un nombre complexe tel que :
|
|
24
|
+
|
|
25
|
+
$$
|
|
26
|
+
z = a+ib
|
|
27
|
+
$$
|
|
28
|
+
|
|
29
|
+
alors $a$ est la partie réelle de $z$, et $b$ et sa partie imaginaire.`;
|
|
30
|
+
};
|
|
31
|
+
const getCorrection = (identifiers) => {
|
|
32
|
+
const { re, im } = identifiers;
|
|
33
|
+
const z1 = new Complex(re, im);
|
|
34
|
+
return `Si $z$ est un nombre complexe tel que :
|
|
35
|
+
|
|
36
|
+
$$
|
|
37
|
+
z = a+ib
|
|
38
|
+
$$
|
|
39
|
+
|
|
40
|
+
alors $a$ est la partie réelle de $z$, et $b$ et sa partie imaginaire.
|
|
41
|
+
|
|
42
|
+
Ici, on a $z = ${z1
|
|
43
|
+
.toTree()
|
|
44
|
+
.toTex()}$, donc la partie réelle de $z$ est $${re}$ et sa partie imaginaire est $${im}$. `;
|
|
45
|
+
};
|
|
46
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
47
|
+
const question = {
|
|
48
|
+
answer: getAnswer(identifiers),
|
|
49
|
+
instruction: getInstruction(identifiers),
|
|
50
|
+
keys: ["i", "z"],
|
|
51
|
+
answerFormat: "tex",
|
|
52
|
+
identifiers,
|
|
53
|
+
hint: getHint(identifiers),
|
|
54
|
+
correction: getCorrection(identifiers),
|
|
55
|
+
};
|
|
56
|
+
return question;
|
|
57
|
+
};
|
|
58
|
+
const getReAndImQuestion = () => {
|
|
59
|
+
const z1 = doWhile(() => ComplexConstructor.random(), (z) => z.re === z.im);
|
|
60
|
+
const isRe = coinFlip();
|
|
61
|
+
const identifiers = { re: z1.re, im: z1.im, isRe };
|
|
62
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
63
|
+
};
|
|
64
|
+
const getPropositions = (n, { answer, re, im, isRe }) => {
|
|
65
|
+
const propositions = [];
|
|
66
|
+
addValidProp(propositions, answer);
|
|
67
|
+
tryToAddWrongProp(propositions, im + "i");
|
|
68
|
+
tryToAddWrongProp(propositions, isRe ? im.toString() : re.toString());
|
|
69
|
+
tryToAddWrongProp(propositions, (-im).toString());
|
|
70
|
+
propWhile(propositions, n, () => {
|
|
71
|
+
const wrongAnswer = randint(-10, 11) + "";
|
|
72
|
+
tryToAddWrongProp(propositions, wrongAnswer);
|
|
73
|
+
});
|
|
74
|
+
return shuffle(propositions);
|
|
75
|
+
};
|
|
76
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
77
|
+
return numberVEA(ans, answer);
|
|
78
|
+
};
|
|
79
|
+
export const reAndIm = {
|
|
80
|
+
id: "getReAndImQuestion",
|
|
81
|
+
connector: "=",
|
|
82
|
+
getPropositions,
|
|
83
|
+
label: "Identifier partie réelle et partie imaginaire d'un nombre complexe",
|
|
84
|
+
isSingleStep: true,
|
|
85
|
+
generator: (nb) => getDistinctQuestions(getReAndImQuestion, nb),
|
|
86
|
+
qcmTimer: 60,
|
|
87
|
+
freeTimer: 60,
|
|
88
|
+
isAnswerValid,
|
|
89
|
+
subject: "Mathématiques",
|
|
90
|
+
getQuestionFromIdentifiers,
|
|
91
|
+
hasHintAndCorrection: true,
|
|
92
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
moduleIds: NodeIdentifiers;
|
|
5
|
+
argIds: NodeIdentifiers;
|
|
6
|
+
};
|
|
7
|
+
export declare const complexAlgebraicFromModuloAndArg: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=complexAlgebraicFromModuloAndArg.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complexAlgebraicFromModuloAndArg.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/complex/geometric/complexAlgebraicFromModuloAndArg.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAQ7C,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,CAAC;IAC3B,MAAM,EAAE,eAAe,CAAC;CACzB,CAAC;AAkJF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAsBlE,CAAC"}
|