math-exercises 2.2.27 → 2.2.28

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.
Files changed (456) hide show
  1. package/lib/exercises/exercise.d.ts +2 -1
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/exercise.js +1 -1
  4. package/lib/exercises/math/calcul/addAndSub.js +1 -1
  5. package/lib/exercises/math/calcul/addAndSubWithoutRelatives.js +1 -1
  6. package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.js +1 -1
  7. package/lib/exercises/math/calcul/arithmetics/divisibiltyCriteria.js +1 -1
  8. package/lib/exercises/math/calcul/arithmetics/divisorsList.js +1 -1
  9. package/lib/exercises/math/calcul/arithmetics/paritySumsAndProducts.js +1 -1
  10. package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.js +1 -1
  11. package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +1 -1
  12. package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.js +1 -1
  13. package/lib/exercises/math/calcul/fractions/fractionAndIntegerSum.js +1 -1
  14. package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.js +1 -1
  15. package/lib/exercises/math/calcul/fractions/fractionsDivision.js +1 -1
  16. package/lib/exercises/math/calcul/fractions/fractionsProduct.js +1 -1
  17. package/lib/exercises/math/calcul/fractions/fractionsSum.js +1 -1
  18. package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.js +1 -1
  19. package/lib/exercises/math/calcul/fractions/simplifyFraction.js +1 -1
  20. package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSub.js +2 -2
  21. package/lib/exercises/math/calcul/mentalCaluls/mentalDivisions.js +2 -2
  22. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.js +2 -2
  23. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.js +2 -2
  24. package/lib/exercises/math/calcul/mentalCaluls/mentalPercentage.js +2 -2
  25. package/lib/exercises/math/calcul/operations/expressionNature.js +1 -1
  26. package/lib/exercises/math/calcul/operations/operationsPriorities.js +2 -2
  27. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.js +1 -1
  28. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesisNoRelatives.js +1 -1
  29. package/lib/exercises/math/calcul/operations/operationsPrioritiesWithoutRelative.js +2 -2
  30. package/lib/exercises/math/calcul/ordering/decimalOrdering.js +1 -1
  31. package/lib/exercises/math/calcul/ordering/decimalOrderingNoRelatives.js +1 -1
  32. package/lib/exercises/math/calcul/ordering/framing.js +2 -2
  33. package/lib/exercises/math/calcul/ordering/integerOrdering.js +2 -2
  34. package/lib/exercises/math/calcul/proportionality/proportionalityTable.js +1 -1
  35. package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.js +1 -1
  36. package/lib/exercises/math/calcul/proportionality/scaleCalculation.js +1 -1
  37. package/lib/exercises/math/calcul/proportionality/scaleUsage.js +1 -1
  38. package/lib/exercises/math/calcul/rounding/rounding.js +1 -1
  39. package/lib/exercises/math/calculLitteral/distributivity/allIdentities.js +1 -1
  40. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.js +1 -1
  41. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.js +1 -1
  42. package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.js +1 -1
  43. package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.js +1 -1
  44. package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.js +1 -1
  45. package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.js +1 -1
  46. package/lib/exercises/math/calculLitteral/equation/equationFromSentenceExercise.js +1 -1
  47. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +3 -3
  48. package/lib/exercises/math/calculLitteral/equation/equationType1Exercise.js +1 -1
  49. package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.js +1 -1
  50. package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.js +1 -1
  51. package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.js +1 -1
  52. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquation.js +1 -1
  53. package/lib/exercises/math/calculLitteral/equation/fractionEquation.js +1 -1
  54. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +1 -1
  55. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.js +1 -1
  56. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +1 -1
  57. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +2 -2
  58. package/lib/exercises/math/calculLitteral/factorisation/factoType2.js +1 -1
  59. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.js +2 -2
  60. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType1.js +2 -2
  61. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.js +2 -2
  62. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js +2 -2
  63. package/lib/exercises/math/calculLitteral/inequations/squareFunctionInequation.js +1 -1
  64. package/lib/exercises/math/calculLitteral/simplifying/distributeAndSimplify.js +1 -1
  65. package/lib/exercises/math/calculLitteral/simplifying/evaluateExpression.js +2 -2
  66. package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.js +1 -1
  67. package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.js +1 -1
  68. package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.js +1 -1
  69. package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.js +1 -1
  70. package/lib/exercises/math/combinatory/anagrams.js +1 -1
  71. package/lib/exercises/math/complex/addComplex.js +1 -1
  72. package/lib/exercises/math/complex/argumentFromAlgebraicComplex.js +1 -1
  73. package/lib/exercises/math/complex/conjugateComplex.ts.js +1 -1
  74. package/lib/exercises/math/complex/conjugateDivideComplex.js +1 -1
  75. package/lib/exercises/math/complex/conjugateMultiplyComplex.js +1 -1
  76. package/lib/exercises/math/complex/divideComplex.js +1 -1
  77. package/lib/exercises/math/complex/inverseComplex.js +1 -1
  78. package/lib/exercises/math/complex/linearCombinaisonComplex.js +1 -1
  79. package/lib/exercises/math/complex/mutiplyComplex.js +1 -1
  80. package/lib/exercises/math/complex/reAndIm.js +2 -2
  81. package/lib/exercises/math/conversion/aeraConversion.js +1 -1
  82. package/lib/exercises/math/conversion/capacityConversion.js +1 -1
  83. package/lib/exercises/math/conversion/hoursToDecimal.js +1 -1
  84. package/lib/exercises/math/conversion/lengthConversion.js +1 -1
  85. package/lib/exercises/math/conversion/massConversion.js +1 -1
  86. package/lib/exercises/math/conversion/volumeCapacityConversion.js +2 -2
  87. package/lib/exercises/math/conversion/volumeConversion.js +1 -1
  88. package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.js +1 -1
  89. package/lib/exercises/math/derivation/derivative/lnDerivativeTwo.js +1 -1
  90. package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.js +1 -1
  91. package/lib/exercises/math/derivation/derivative/secondDegreeDerivative.js +1 -1
  92. package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.js +2 -2
  93. package/lib/exercises/math/derivation/tangent/derivativeNumberReading.js +1 -1
  94. package/lib/exercises/math/derivation/tangent/derivativeTangentEquationReading.js +1 -1
  95. package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.js +2 -2
  96. package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +1 -1
  97. package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.js +1 -1
  98. package/lib/exercises/math/functions/absolute/absoluteValueEquations.js +2 -2
  99. package/lib/exercises/math/functions/absolute/absoluteValueInequations.js +1 -1
  100. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +1 -1
  101. package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.js +1 -1
  102. package/lib/exercises/math/functions/affines/leadingCoefficient.js +1 -1
  103. package/lib/exercises/math/functions/affines/leadingCoefficientCalculV1.js +1 -1
  104. package/lib/exercises/math/functions/affines/leadingCoefficientCalculV2.js +1 -1
  105. package/lib/exercises/math/functions/affines/signFunction.js +2 -2
  106. package/lib/exercises/math/functions/basics/graphicEquation.js +1 -1
  107. package/lib/exercises/math/functions/basics/graphicInequation.js +1 -1
  108. package/lib/exercises/math/functions/basics/imageFunction.js +2 -2
  109. package/lib/exercises/math/functions/basics/imageFunctionGeogebra.js +2 -2
  110. package/lib/exercises/math/functions/basics/inverseImageFunction.js +1 -1
  111. package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.js +2 -2
  112. package/lib/exercises/math/functions/basics/inverseImageFunctionTable.js +3 -3
  113. package/lib/exercises/math/functions/basics/twoFunctionsEquation.js +2 -2
  114. package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +2 -2
  115. package/lib/exercises/math/functions/cube/cubicEquation.js +1 -1
  116. package/lib/exercises/math/functions/exponential/expEquation.js +1 -1
  117. package/lib/exercises/math/functions/exponential/expSimplifiying.js +1 -1
  118. package/lib/exercises/math/functions/integral/integralExpU.js +1 -1
  119. package/lib/exercises/math/functions/integral/integralFractions.js +1 -1
  120. package/lib/exercises/math/functions/logarithm/log10Simplifying.js +1 -1
  121. package/lib/exercises/math/functions/logarithm/logEquation.js +1 -1
  122. package/lib/exercises/math/functions/logarithm/logSimplifiying.js +2 -2
  123. package/lib/exercises/math/functions/parity/parityFromAlgebra.js +3 -3
  124. package/lib/exercises/math/functions/parity/parityFromGraph.js +3 -3
  125. package/lib/exercises/math/functions/rationalFraction/rationalFractionForbiddenValue.js +1 -1
  126. package/lib/exercises/math/functions/trinoms/alphaBetaFromDevForm.js +2 -2
  127. package/lib/exercises/math/functions/trinoms/alphaBetaInCanonicalForm.js +2 -2
  128. package/lib/exercises/math/functions/trinoms/canonicalFromDevForm.js +1 -1
  129. package/lib/exercises/math/functions/trinoms/deltaTrinom.js +1 -1
  130. package/lib/exercises/math/functions/trinoms/extremumFromCanonicalForm.js +1 -1
  131. package/lib/exercises/math/functions/trinoms/extremumTypeFromAlgebricForm.js +2 -2
  132. package/lib/exercises/math/functions/trinoms/factorizedFormFromRoots.js +1 -1
  133. package/lib/exercises/math/functions/trinoms/niceRootsFromDevForm.js +1 -1
  134. package/lib/exercises/math/functions/trinoms/rootsFromDevForm.js +1 -1
  135. package/lib/exercises/math/functions/trinoms/rootsFromFactorizedForm.js +1 -1
  136. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.js +1 -1
  137. package/lib/exercises/math/functions/trinoms/variationsFromAlgebricForm.js +2 -2
  138. package/lib/exercises/math/geometry/areas/circleArea.js +2 -2
  139. package/lib/exercises/math/geometry/areas/rectangleArea.js +1 -1
  140. package/lib/exercises/math/geometry/areas/rightTriangleArea.js +1 -1
  141. package/lib/exercises/math/geometry/areas/squareArea.js +1 -1
  142. package/lib/exercises/math/geometry/areas/triangleArea.js +1 -1
  143. package/lib/exercises/math/geometry/areas/triangleAreaV2.js +1 -1
  144. package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.js +1 -1
  145. package/lib/exercises/math/geometry/cartesian/index.d.ts +4 -0
  146. package/lib/exercises/math/geometry/cartesian/index.d.ts.map +1 -1
  147. package/lib/exercises/math/geometry/cartesian/index.js +4 -0
  148. package/lib/exercises/math/geometry/cartesian/midpoint.js +1 -1
  149. package/lib/exercises/math/geometry/cartesian/placeAPoint.js +1 -1
  150. package/lib/exercises/math/geometry/cartesian/placeAbscissOnLine.d.ts +13 -0
  151. package/lib/exercises/math/geometry/cartesian/placeAbscissOnLine.d.ts.map +1 -0
  152. package/lib/exercises/math/geometry/cartesian/placeAbscissOnLine.js +133 -0
  153. package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.d.ts +13 -0
  154. package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.d.ts.map +1 -0
  155. package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.js +132 -0
  156. package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoOrthonorm.js +1 -1
  157. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.d.ts +12 -0
  158. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.d.ts.map +1 -1
  159. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.js +151 -91
  160. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.d.ts +13 -0
  161. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.d.ts.map +1 -0
  162. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.js +153 -0
  163. package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.js +1 -1
  164. package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.js +1 -1
  165. package/lib/exercises/math/geometry/perimeters/circleCircumference.js +2 -2
  166. package/lib/exercises/math/geometry/perimeters/rectanglePerimeter.js +1 -1
  167. package/lib/exercises/math/geometry/perimeters/squarePerimeter.js +1 -1
  168. package/lib/exercises/math/geometry/perimeters/trianglePerimeter.js +1 -1
  169. package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +2 -2
  170. package/lib/exercises/math/geometry/thales/thales.js +1 -1
  171. package/lib/exercises/math/geometry/thales/thalesCalcul.js +2 -2
  172. package/lib/exercises/math/geometry/vectors/alignementViaColinearity.js +2 -2
  173. package/lib/exercises/math/geometry/vectors/chasles.js +2 -2
  174. package/lib/exercises/math/geometry/vectors/colinearity.js +2 -2
  175. package/lib/exercises/math/geometry/vectors/determinant.js +1 -1
  176. package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.js +2 -2
  177. package/lib/exercises/math/geometry/vectors/fourthParallelogramPoint.js +1 -1
  178. package/lib/exercises/math/geometry/vectors/paralellismViaColinearity.js +2 -2
  179. package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.js +2 -2
  180. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.js +1 -1
  181. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCoords.js +1 -1
  182. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.js +1 -1
  183. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.js +1 -1
  184. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.js +1 -1
  185. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.js +1 -1
  186. package/lib/exercises/math/limits/limitReading.js +1 -1
  187. package/lib/exercises/math/limits/polynomLimit.js +2 -2
  188. package/lib/exercises/math/limits/polynomLimitNoFI.js +2 -2
  189. package/lib/exercises/math/limits/rationalFracForbiddenValueLimit.js +1 -1
  190. package/lib/exercises/math/limits/rationalFracLimit.js +2 -2
  191. package/lib/exercises/math/limits/sequencePolynomLimit.js +1 -1
  192. package/lib/exercises/math/limits/sequencePolynomNoFILimit.js +1 -1
  193. package/lib/exercises/math/limits/sequencePolynomProductLimit.js +1 -1
  194. package/lib/exercises/math/limits/sequenceRationalFracLimit.js +1 -1
  195. package/lib/exercises/math/percent/applyPercent.js +2 -2
  196. package/lib/exercises/math/percent/averageEvolutionRate.js +1 -1
  197. package/lib/exercises/math/percent/cmToEvolution.js +1 -1
  198. package/lib/exercises/math/percent/evolutionRateFromValues.d.ts +8 -0
  199. package/lib/exercises/math/percent/evolutionRateFromValues.d.ts.map +1 -0
  200. package/lib/exercises/math/percent/evolutionRateFromValues.js +71 -0
  201. package/lib/exercises/math/percent/findStartValueAfterEvolution.d.ts +8 -0
  202. package/lib/exercises/math/percent/findStartValueAfterEvolution.d.ts.map +1 -0
  203. package/lib/exercises/math/percent/findStartValueAfterEvolution.js +65 -0
  204. package/lib/exercises/math/percent/findTVA.js +2 -2
  205. package/lib/exercises/math/percent/globalPercent.js +1 -1
  206. package/lib/exercises/math/percent/htToTTC.js +2 -2
  207. package/lib/exercises/math/percent/index.d.ts +4 -0
  208. package/lib/exercises/math/percent/index.d.ts.map +1 -1
  209. package/lib/exercises/math/percent/index.js +4 -0
  210. package/lib/exercises/math/percent/isTableProportional.js +1 -1
  211. package/lib/exercises/math/percent/percentToDecimal.js +2 -2
  212. package/lib/exercises/math/percent/populationEffectifFromSubPopulation.d.ts +9 -0
  213. package/lib/exercises/math/percent/populationEffectifFromSubPopulation.d.ts.map +1 -0
  214. package/lib/exercises/math/percent/populationEffectifFromSubPopulation.js +93 -0
  215. package/lib/exercises/math/percent/reciprocalPercentage.js +2 -2
  216. package/lib/exercises/math/percent/subPopulationEffectifFromPercent.d.ts +9 -0
  217. package/lib/exercises/math/percent/subPopulationEffectifFromPercent.d.ts.map +1 -0
  218. package/lib/exercises/math/percent/subPopulationEffectifFromPercent.js +85 -0
  219. package/lib/exercises/math/percent/ttcToHT.js +2 -2
  220. package/lib/exercises/math/powers/decimalToScientific.js +1 -1
  221. package/lib/exercises/math/powers/powersDivision.js +1 -1
  222. package/lib/exercises/math/powers/powersOfTenToDecimal.js +1 -1
  223. package/lib/exercises/math/powers/powersProduct.js +1 -1
  224. package/lib/exercises/math/primitive/constantPrimitive.js +1 -1
  225. package/lib/exercises/math/primitive/logarithmePrimitive.js +1 -1
  226. package/lib/exercises/math/primitive/polynomialPrimitive.js +1 -1
  227. package/lib/exercises/math/primitive/sinCosPrimitive.js +2 -2
  228. package/lib/exercises/math/primitive/sinUCosUPrimitive.js +2 -2
  229. package/lib/exercises/math/probaStat/cardBasicProbas.js +2 -2
  230. package/lib/exercises/math/probaStat/conditionalProbability.js +1 -1
  231. package/lib/exercises/math/probaStat/diceBasicProbas.js +2 -2
  232. package/lib/exercises/math/probaStat/independancy.js +2 -2
  233. package/lib/exercises/math/probaStat/issuesCountingForCards.js +3 -3
  234. package/lib/exercises/math/probaStat/probaFromTableNoContext.js +1 -1
  235. package/lib/exercises/math/probaStat/probaFromTableWithContext.js +1 -1
  236. package/lib/exercises/math/probaStat/probabilityTree.js +1 -1
  237. package/lib/exercises/math/probaStat/stats1var/averageWithTable.js +1 -1
  238. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
  239. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +2 -1
  240. package/lib/exercises/math/probaStat/stats1var/median.js +1 -1
  241. package/lib/exercises/math/probaStat/stats1var/quartiles.js +1 -1
  242. package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.js +1 -1
  243. package/lib/exercises/math/python/pyForLoop1Exercise.js +2 -2
  244. package/lib/exercises/math/python/pyNestedForLoopExercise.js +1 -1
  245. package/lib/exercises/math/python/pyWhileLoop1Exercise.js +1 -1
  246. package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +1 -1
  247. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.js +1 -1
  248. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.js +1 -1
  249. package/lib/exercises/math/sequences/arithmetic/arithmeticFindReason.js +1 -1
  250. package/lib/exercises/math/sequences/arithmetic/arithmeticFindReasonRandomRange.js +1 -1
  251. package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.js +1 -1
  252. package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.js +1 -1
  253. package/lib/exercises/math/sequences/arithmetic/arithmeticReasonUsage.js +1 -1
  254. package/lib/exercises/math/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.js +1 -1
  255. package/lib/exercises/math/sequences/arithmetic/arithmeticThresholdFind.js +1 -1
  256. package/lib/exercises/math/sequences/arithmetic/firstIntegersSum.js +1 -1
  257. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.js +2 -2
  258. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.js +2 -2
  259. package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.js +1 -1
  260. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.js +1 -1
  261. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.js +1 -1
  262. package/lib/exercises/math/sequences/geometric/geometricFindReason.js +1 -1
  263. package/lib/exercises/math/sequences/geometric/geometricFindTerm.js +1 -1
  264. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.js +1 -1
  265. package/lib/exercises/math/sequences/geometric/geometricFirstTermsSum.js +1 -1
  266. package/lib/exercises/math/sequences/geometric/geometricReasonUsage.js +1 -1
  267. package/lib/exercises/math/sequences/geometric/geometricRecurrenceFormulaUsage.js +1 -1
  268. package/lib/exercises/math/sequences/sequencePlot.js +1 -1
  269. package/lib/exercises/math/sets/intervals/inequalityToInterval.js +1 -1
  270. package/lib/exercises/math/sets/intervals/intervalToInequality.js +1 -1
  271. package/lib/exercises/math/sets/intervals/intervalsIntersection.js +1 -1
  272. package/lib/exercises/math/sets/intervals/intervalsUnion.js +1 -1
  273. package/lib/exercises/math/sets/setBelonging.js +2 -2
  274. package/lib/exercises/math/squareRoots/simpifySquareRoot.js +1 -1
  275. package/lib/exercises/math/squareRoots/squareRootEquation.js +1 -1
  276. package/lib/exercises/math/squareRoots/squareRootIdentities.js +2 -2
  277. package/lib/exercises/math/squareRoots/squareRootsSum.js +1 -1
  278. package/lib/exercises/math/trigonometry/arcLength.d.ts +10 -0
  279. package/lib/exercises/math/trigonometry/arcLength.d.ts.map +1 -0
  280. package/lib/exercises/math/trigonometry/arcLength.js +92 -0
  281. package/lib/exercises/math/trigonometry/associatePoint.js +1 -1
  282. package/lib/exercises/math/trigonometry/basicEquationCos.d.ts +7 -0
  283. package/lib/exercises/math/trigonometry/basicEquationCos.d.ts.map +1 -0
  284. package/lib/exercises/math/trigonometry/basicEquationCos.js +94 -0
  285. package/lib/exercises/math/trigonometry/basicEquationSin.d.ts +7 -0
  286. package/lib/exercises/math/trigonometry/basicEquationSin.d.ts.map +1 -0
  287. package/lib/exercises/math/trigonometry/basicEquationSin.js +106 -0
  288. package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.d.ts +7 -0
  289. package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.d.ts.map +1 -0
  290. package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.js +85 -0
  291. package/lib/exercises/math/trigonometry/calculateCosSinAndTan.js +1 -1
  292. package/lib/exercises/math/trigonometry/degreeToRadians.d.ts +9 -0
  293. package/lib/exercises/math/trigonometry/degreeToRadians.d.ts.map +1 -0
  294. package/lib/exercises/math/trigonometry/degreeToRadians.js +125 -0
  295. package/lib/exercises/math/trigonometry/index.d.ts +6 -0
  296. package/lib/exercises/math/trigonometry/index.d.ts.map +1 -1
  297. package/lib/exercises/math/trigonometry/index.js +6 -0
  298. package/lib/exercises/math/trigonometry/mainAngleMeasure.d.ts +9 -0
  299. package/lib/exercises/math/trigonometry/mainAngleMeasure.d.ts.map +1 -0
  300. package/lib/exercises/math/trigonometry/mainAngleMeasure.js +91 -0
  301. package/lib/exercises/math/trigonometry/mainRemarkableValues.js +2 -2
  302. package/lib/exercises/math/trigonometry/remarkableValues.js +3 -3
  303. package/lib/exercises/math/trigonometry/trigonometry.js +1 -1
  304. package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.js +1 -1
  305. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +1 -1
  306. package/lib/exercises/pc/calibrationCurveOfSolution.js +2 -2
  307. package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.js +1 -1
  308. package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.js +2 -2
  309. package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.js +1 -1
  310. package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.js +1 -1
  311. package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.js +1 -1
  312. package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.js +1 -1
  313. package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.js +1 -1
  314. package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.js +2 -2
  315. package/lib/exercises/pc/chemicalEquations.js +1 -1
  316. package/lib/exercises/pc/chemicalReactions/calculateCombustionEnergy.js +1 -1
  317. package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.js +1 -1
  318. package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.js +1 -1
  319. package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.js +1 -1
  320. package/lib/exercises/pc/chemicalReactionsProduct.js +1 -1
  321. package/lib/exercises/pc/delution.js +1 -1
  322. package/lib/exercises/pc/dosage/beerLambertRandomValue.js +1 -1
  323. package/lib/exercises/pc/electricity/calculateIntensityInSerieOrParallel.js +1 -1
  324. package/lib/exercises/pc/electricity/calculateVoltage.js +1 -1
  325. package/lib/exercises/pc/electricity/electricEnergyFromPower.js +1 -1
  326. package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.js +2 -2
  327. package/lib/exercises/pc/electricity/kirchhoffVoltageLaw.js +1 -1
  328. package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +1 -1
  329. package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.js +2 -2
  330. package/lib/exercises/pc/fluids/mariotte.js +1 -1
  331. package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.js +1 -1
  332. package/lib/exercises/pc/forces/forceWork.js +1 -1
  333. package/lib/exercises/pc/forces/massWeight.js +1 -1
  334. package/lib/exercises/pc/forces/pressingForce.js +1 -1
  335. package/lib/exercises/pc/formulaFromComposition.js +1 -1
  336. package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.js +2 -2
  337. package/lib/exercises/pc/kineticEnergy.js +1 -1
  338. package/lib/exercises/pc/math/isolateVariables.js +1 -1
  339. package/lib/exercises/pc/math/proportionnalityCoeffFromLine.js +1 -1
  340. package/lib/exercises/pc/molarQuantity.js +1 -1
  341. package/lib/exercises/pc/mole/molarMass.js +1 -1
  342. package/lib/exercises/pc/mole/moleculeCountFromMassAndAvogadro.js +1 -1
  343. package/lib/exercises/pc/moleculeFormula.js +1 -1
  344. package/lib/exercises/pc/moleculeNomenclature.js +1 -1
  345. package/lib/exercises/pc/motion/averageSpeed.d.ts.map +1 -1
  346. package/lib/exercises/pc/motion/characteristicsOfVelocityVector.js +1 -1
  347. package/lib/exercises/pc/motion/motionReference.js +1 -1
  348. package/lib/exercises/pc/motion/typeOfAcceleration.js +1 -1
  349. package/lib/exercises/pc/motion/typeOfMovement.js +1 -1
  350. package/lib/exercises/pc/pH.js +1 -1
  351. package/lib/exercises/pc/perceivedFrequency.js +1 -1
  352. package/lib/exercises/pc/potentialEnergy.js +1 -1
  353. package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.js +1 -1
  354. package/lib/exercises/pc/snellDescartes.js +1 -1
  355. package/lib/exercises/pc/sound/findPeriodFromGraph.js +1 -1
  356. package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.js +1 -1
  357. package/lib/exercises/pc/sound/frequencyComparison.js +1 -1
  358. package/lib/exercises/pc/waves/lightDistanceConversion.js +1 -1
  359. package/lib/exercises/pc/waves/periodicWaveCelerity.js +1 -1
  360. package/lib/exercises/pc/weight/weightOnTheMoon.js +1 -1
  361. package/lib/exercises/utils/getDistinctQuestions.d.ts +1 -1
  362. package/lib/exercises/utils/getDistinctQuestions.d.ts.map +1 -1
  363. package/lib/exercises/utils/getDistinctQuestions.js +11 -5
  364. package/lib/geogebra/colors.js +1 -1
  365. package/lib/geogebra/geogebraConstructor.js +1 -1
  366. package/lib/geogebra/parsers/ggbPointToCoords.d.ts +5 -0
  367. package/lib/geogebra/parsers/ggbPointToCoords.d.ts.map +1 -0
  368. package/lib/geogebra/parsers/ggbPointToCoords.js +12 -0
  369. package/lib/geogebra/parsers/parseGGBPoints.d.ts +2 -0
  370. package/lib/geogebra/parsers/parseGGBPoints.d.ts.map +1 -0
  371. package/lib/geogebra/parsers/parseGGBPoints.js +10 -0
  372. package/lib/index.d.ts +61 -0
  373. package/lib/index.d.ts.map +1 -1
  374. package/lib/math/geometry/line.d.ts.map +1 -1
  375. package/lib/math/geometry/line.js +0 -1
  376. package/lib/math/inequations/inequation.js +1 -1
  377. package/lib/math/numbers/integer/integer.js +1 -1
  378. package/lib/math/numbers/nombre.js +1 -1
  379. package/lib/math/numbers/rationals/rational.js +3 -3
  380. package/lib/math/numbers/reals/real.js +2 -2
  381. package/lib/math/polynomials/polynomial.js +1 -1
  382. package/lib/math/polynomials/trinom.js +1 -1
  383. package/lib/math/sequences/geometricSequence.d.ts +2 -2
  384. package/lib/math/sequences/geometricSequence.d.ts.map +1 -1
  385. package/lib/math/sequences/geometricSequence.js +13 -11
  386. package/lib/math/sets/discreteSet.d.ts +2 -2
  387. package/lib/math/sets/discreteSet.d.ts.map +1 -1
  388. package/lib/math/sets/discreteSet.js +4 -4
  389. package/lib/math/sets/intervals/intervals.js +1 -1
  390. package/lib/math/trigonometry/remarkableValue.js +1 -1
  391. package/lib/math/trigonometry/remarkableValues.d.ts +3 -0
  392. package/lib/math/trigonometry/remarkableValues.d.ts.map +1 -1
  393. package/lib/math/trigonometry/remarkableValues.js +72 -1
  394. package/lib/math/utils/random/randTupleInt.js +1 -1
  395. package/lib/playground.d.ts.map +1 -1
  396. package/lib/playground.js +1 -31
  397. package/lib/tree/nodes/equations/multiEqualNode.js +2 -2
  398. package/lib/tree/nodes/geometry/degree.d.ts.map +1 -1
  399. package/lib/tree/nodes/geometry/degree.js +3 -2
  400. package/lib/tree/nodes/geometry/pointNode.js +1 -1
  401. package/lib/tree/nodes/inequations/inequationNode.js +1 -1
  402. package/lib/tree/nodes/operators/addNode.js +3 -3
  403. package/lib/tree/nodes/operators/divideNode.js +1 -1
  404. package/lib/tree/nodes/operators/multiplyNode.js +3 -3
  405. package/lib/tree/nodes/operators/substractNode.js +1 -1
  406. package/lib/tree/nodes/sets/discreteSetNode.d.ts +1 -0
  407. package/lib/tree/nodes/sets/discreteSetNode.d.ts.map +1 -1
  408. package/lib/tree/nodes/sets/discreteSetNode.js +8 -2
  409. package/lib/tree/nodes/sets/intervalNode.js +1 -1
  410. package/lib/tree/nodes/sets/unionIntervalNode.js +2 -2
  411. package/lib/tree/parsers/euroParser.d.ts +2 -0
  412. package/lib/tree/parsers/euroParser.d.ts.map +1 -0
  413. package/lib/tree/parsers/euroParser.js +12 -0
  414. package/lib/tree/parsers/percentParser.d.ts +1 -0
  415. package/lib/tree/parsers/percentParser.d.ts.map +1 -1
  416. package/lib/tree/parsers/percentParser.js +11 -0
  417. package/lib/utils/alea/coinFlip.d.ts +2 -0
  418. package/lib/utils/alea/coinFlip.d.ts.map +1 -0
  419. package/lib/utils/alea/coinFlip.js +7 -0
  420. package/lib/utils/alea/diceFlip.d.ts +2 -0
  421. package/lib/utils/alea/diceFlip.d.ts.map +1 -0
  422. package/lib/utils/alea/diceFlip.js +8 -0
  423. package/lib/utils/alea/probaFlip.d.ts +7 -0
  424. package/lib/utils/alea/probaFlip.d.ts.map +1 -0
  425. package/lib/utils/alea/probaFlip.js +12 -0
  426. package/lib/utils/alea/probaLawFlip.d.ts +7 -0
  427. package/lib/utils/alea/probaLawFlip.d.ts.map +1 -0
  428. package/lib/utils/alea/probaLawFlip.js +24 -0
  429. package/lib/utils/alea/random.d.ts +2 -0
  430. package/lib/utils/alea/random.d.ts.map +1 -0
  431. package/lib/utils/alea/random.js +7 -0
  432. package/lib/utils/alea/randomEnumValue.d.ts +2 -0
  433. package/lib/utils/alea/randomEnumValue.d.ts.map +1 -0
  434. package/lib/utils/alea/randomEnumValue.js +9 -0
  435. package/lib/utils/alea/shuffle.d.ts +2 -0
  436. package/lib/utils/alea/shuffle.d.ts.map +1 -0
  437. package/lib/utils/alea/shuffle.js +15 -0
  438. package/lib/utils/arrays/arrayEqual.d.ts +2 -0
  439. package/lib/utils/arrays/arrayEqual.d.ts.map +1 -0
  440. package/lib/utils/arrays/arrayEqual.js +13 -0
  441. package/lib/utils/arrays/arrayHasSameElement.d.ts +2 -0
  442. package/lib/utils/arrays/arrayHasSameElement.d.ts.map +1 -0
  443. package/lib/utils/arrays/arrayHasSameElement.js +8 -0
  444. package/lib/utils/arrays/cartesianProducts.d.ts +13 -0
  445. package/lib/utils/arrays/cartesianProducts.d.ts.map +1 -0
  446. package/lib/utils/arrays/cartesianProducts.js +64 -0
  447. package/lib/utils/arrays/enumToArray.d.ts +8 -0
  448. package/lib/utils/arrays/enumToArray.d.ts.map +1 -0
  449. package/lib/utils/arrays/enumToArray.js +16 -0
  450. package/lib/utils/arrays/permutations.d.ts +2 -0
  451. package/lib/utils/arrays/permutations.d.ts.map +1 -0
  452. package/lib/utils/arrays/permutations.js +21 -0
  453. package/lib/utils/latex/alignTex.d.ts +1 -1
  454. package/lib/utils/latex/alignTex.d.ts.map +1 -1
  455. package/lib/utils/latex/alignTex.js +3 -3
  456. package/package.json +1 -1
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.placeAbscissOnLine = void 0;
4
+ const toolBarConstructor_1 = require("../../../../exercises/utils/geogebra/toolBarConstructor");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const geogebraConstructor_1 = require("../../../../geogebra/geogebraConstructor");
7
+ const ggbPointToCoords_1 = require("../../../../geogebra/parsers/ggbPointToCoords");
8
+ const parseGGBPoints_1 = require("../../../../geogebra/parsers/parseGGBPoints");
9
+ const point_1 = require("../../../../math/geometry/point");
10
+ const nombre_1 = require("../../../../math/numbers/nombre");
11
+ const randfloat_1 = require("../../../../math/utils/random/randfloat");
12
+ const randint_1 = require("../../../../math/utils/random/randint");
13
+ const round_1 = require("../../../../math/utils/round");
14
+ const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
15
+ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
16
+ const random_1 = require("../../../../utils/alea/random");
17
+ const getInstruction = ({ abscissTex }) => {
18
+ return `Placer le point d'abscisse $${abscissTex}$ sur la droite graduée ci-dessous :`;
19
+ };
20
+ // const getHint: GetHint<Identifiers> = (identifiers) => {};
21
+ // const getCorrection: GetCorrection<Identifiers> = (identifiers) => {};
22
+ const getGGBAnswer = ({ absciss, coeff }) => {
23
+ return [`(${coeff},0)`];
24
+ };
25
+ const getStudentGGBOptions = ({ coeff, oneUnitTex, abscissType, }) => {
26
+ const O = new point_1.Point("O", (0).toTree(), (0).toTree());
27
+ const I = new point_1.Point("I", (1).toTree(), (0).toTree());
28
+ const A = new point_1.Point("A", coeff.toTree(), (0).toTree());
29
+ const commands = [
30
+ ...O.toGGBCommand(),
31
+ `Text("\\small 0", (0, -0.5), false, true, 0, 0)`,
32
+ ...I.toGGBCommand(),
33
+ `Text("\\small ${oneUnitTex}", (1, ${abscissType === nombre_1.NumberType.Rational ? -1 : -0.5}), false, true, 0, 0)`,
34
+ ];
35
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
36
+ commands,
37
+ customToolBar: (0, toolBarConstructor_1.toolBarConstructor)({
38
+ point: true,
39
+ }),
40
+ hideGrid: true,
41
+ xAxis: {
42
+ hideNumbers: true,
43
+ steps: 1,
44
+ },
45
+ yAxis: {
46
+ hidden: true,
47
+ },
48
+ forbidShiftDragZoom: true,
49
+ });
50
+ return ggb.getOptions({
51
+ coords: [-7, 7, -2, 2],
52
+ });
53
+ };
54
+ const isGGBAnswerValid = (ans, { ggbAnswer, absciss, abscissTex, abscissType, axisUnit, coeff, oneUnitTex }) => {
55
+ const points = (0, parseGGBPoints_1.parseGGBPoints)(ans).map((p) => (0, ggbPointToCoords_1.ggbPointToCoords)(p));
56
+ return points.some((point) => point.y === 0 && Math.abs(point.x - coeff) < 0.1);
57
+ return false;
58
+ };
59
+ const getPlaceAbscissOnLineQuestion = () => {
60
+ const abscissType = (0, random_1.random)([
61
+ nombre_1.NumberType.Integer,
62
+ nombre_1.NumberType.Rational,
63
+ nombre_1.NumberType.Decimal,
64
+ ]);
65
+ let absciss, axisUnit, oneUnitTex, abscissTex, coeff;
66
+ switch (abscissType) {
67
+ case nombre_1.NumberType.Integer:
68
+ axisUnit = (0, randint_1.randint)(1, 10);
69
+ coeff = (0, randint_1.randint)(-6, 7, [0, 1]);
70
+ absciss = axisUnit * coeff;
71
+ oneUnitTex = axisUnit.frenchify();
72
+ abscissTex = absciss.frenchify();
73
+ break;
74
+ case nombre_1.NumberType.Rational:
75
+ const randomFrac = (0, random_1.random)([
76
+ [1, 2],
77
+ [1, 3],
78
+ [2, 3],
79
+ [1, 4],
80
+ [3, 4],
81
+ [1, 5],
82
+ [2, 5],
83
+ [3, 5],
84
+ [4, 5],
85
+ ]);
86
+ axisUnit = randomFrac[0] / randomFrac[1];
87
+ const oneUnit = new fractionNode_1.FractionNode(randomFrac[0].toTree(), randomFrac[1].toTree());
88
+ oneUnitTex = oneUnit.toTex();
89
+ coeff = (0, randint_1.randint)(-6, 7, [0, 1]);
90
+ absciss = axisUnit * coeff;
91
+ abscissTex = new multiplyNode_1.MultiplyNode(oneUnit, coeff.toTree()).simplify().toTex();
92
+ break;
93
+ case nombre_1.NumberType.Decimal:
94
+ default:
95
+ axisUnit = (0, randfloat_1.randfloat)(0, 5, 1);
96
+ coeff = (0, randint_1.randint)(-6, 7, [0, 1]);
97
+ absciss = (0, round_1.round)(axisUnit * coeff, 2);
98
+ oneUnitTex = axisUnit.frenchify();
99
+ abscissTex = absciss.frenchify();
100
+ break;
101
+ }
102
+ const identifiers = {
103
+ absciss,
104
+ abscissTex,
105
+ abscissType,
106
+ axisUnit,
107
+ coeff,
108
+ oneUnitTex,
109
+ };
110
+ const question = {
111
+ ggbAnswer: getGGBAnswer(identifiers),
112
+ instruction: getInstruction(identifiers),
113
+ studentGgbOptions: getStudentGGBOptions(identifiers),
114
+ identifiers,
115
+ // hint: getHint(identifiers),
116
+ // correction: getCorrection(identifiers),
117
+ };
118
+ return question;
119
+ };
120
+ exports.placeAbscissOnLine = {
121
+ id: "placeAbscissOnLine",
122
+ label: "Placer un point d'abscisse donnée sur une droite graduée",
123
+ isSingleStep: true,
124
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getPlaceAbscissOnLineQuestion, nb),
125
+ ggbTimer: 60,
126
+ isGGBAnswerValid,
127
+ subject: "Mathématiques",
128
+ // getHint,
129
+ // getCorrection,
130
+ getGGBAnswer,
131
+ getStudentGGBOptions,
132
+ answerType: "GGB",
133
+ };
@@ -0,0 +1,13 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ import { NumberType } from "../../../../math/numbers/nombre";
3
+ type Identifiers = {
4
+ abscissType: NumberType;
5
+ axisUnit: number;
6
+ oneUnitTex: string;
7
+ absciss: number;
8
+ abscissTex: string;
9
+ coeff: number;
10
+ };
11
+ export declare const placeAbscissOnSemiLine: Exercise<Identifiers>;
12
+ export {};
13
+ //# sourceMappingURL=placeAbscissOnSemiLine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"placeAbscissOnSemiLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAQvD,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAoIF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.placeAbscissOnSemiLine = void 0;
4
+ const toolBarConstructor_1 = require("../../../../exercises/utils/geogebra/toolBarConstructor");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const geogebraConstructor_1 = require("../../../../geogebra/geogebraConstructor");
7
+ const ggbPointToCoords_1 = require("../../../../geogebra/parsers/ggbPointToCoords");
8
+ const parseGGBPoints_1 = require("../../../../geogebra/parsers/parseGGBPoints");
9
+ const point_1 = require("../../../../math/geometry/point");
10
+ const nombre_1 = require("../../../../math/numbers/nombre");
11
+ const randfloat_1 = require("../../../../math/utils/random/randfloat");
12
+ const randint_1 = require("../../../../math/utils/random/randint");
13
+ const round_1 = require("../../../../math/utils/round");
14
+ const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
15
+ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
16
+ const random_1 = require("../../../../utils/alea/random");
17
+ const getInstruction = ({ abscissTex }) => {
18
+ return `Placer le point d'abscisse $${abscissTex}$ sur la droite graduée ci-dessous :`;
19
+ };
20
+ // const getHint: GetHint<Identifiers> = (identifiers) => {};
21
+ // const getCorrection: GetCorrection<Identifiers> = (identifiers) => {};
22
+ const getGGBAnswer = ({ absciss, coeff }) => {
23
+ return [`(${coeff},0)`];
24
+ };
25
+ const getStudentGGBOptions = ({ coeff, oneUnitTex, abscissType, }) => {
26
+ const O = new point_1.Point("O", (0).toTree(), (0).toTree());
27
+ const I = new point_1.Point("I", (1).toTree(), (0).toTree());
28
+ const commands = [
29
+ ...O.toGGBCommand(),
30
+ `Text("\\small 0", (0, -0.5), false, true, 0, 0)`,
31
+ ...I.toGGBCommand(),
32
+ `Text("\\small ${oneUnitTex}", (1, ${abscissType === nombre_1.NumberType.Rational ? -1 : -0.5}), false, true, 0, 0)`,
33
+ ];
34
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
35
+ commands,
36
+ customToolBar: (0, toolBarConstructor_1.toolBarConstructor)({
37
+ point: true,
38
+ }),
39
+ hideGrid: true,
40
+ xAxis: {
41
+ hideNumbers: true,
42
+ steps: 1,
43
+ showPositive: true,
44
+ },
45
+ yAxis: {
46
+ hidden: true,
47
+ },
48
+ forbidShiftDragZoom: true,
49
+ });
50
+ return ggb.getOptions({
51
+ coords: [-1, 10, -2, 2],
52
+ });
53
+ };
54
+ const isGGBAnswerValid = (ans, { ggbAnswer, absciss, abscissTex, abscissType, axisUnit, coeff, oneUnitTex }) => {
55
+ const points = (0, parseGGBPoints_1.parseGGBPoints)(ans).map((p) => (0, ggbPointToCoords_1.ggbPointToCoords)(p));
56
+ return points.some((point) => point.y === 0 && Math.abs(point.x - coeff) < 0.1);
57
+ };
58
+ const getPlaceAbscissOnSemiLineQuestion = () => {
59
+ const abscissType = (0, random_1.random)([
60
+ nombre_1.NumberType.Integer,
61
+ nombre_1.NumberType.Rational,
62
+ nombre_1.NumberType.Decimal,
63
+ ]);
64
+ let absciss, axisUnit, oneUnitTex, abscissTex, coeff;
65
+ switch (abscissType) {
66
+ case nombre_1.NumberType.Integer:
67
+ axisUnit = (0, randint_1.randint)(1, 10);
68
+ coeff = (0, randint_1.randint)(2, 10);
69
+ absciss = axisUnit * coeff;
70
+ oneUnitTex = axisUnit.frenchify();
71
+ abscissTex = absciss.frenchify();
72
+ break;
73
+ case nombre_1.NumberType.Rational:
74
+ const randomFrac = (0, random_1.random)([
75
+ [1, 2],
76
+ [1, 3],
77
+ [2, 3],
78
+ [1, 4],
79
+ [3, 4],
80
+ [1, 5],
81
+ [2, 5],
82
+ [3, 5],
83
+ [4, 5],
84
+ ]);
85
+ axisUnit = randomFrac[0] / randomFrac[1];
86
+ const oneUnit = new fractionNode_1.FractionNode(randomFrac[0].toTree(), randomFrac[1].toTree());
87
+ oneUnitTex = oneUnit.toTex();
88
+ coeff = (0, randint_1.randint)(2, 10);
89
+ absciss = axisUnit * coeff;
90
+ abscissTex = new multiplyNode_1.MultiplyNode(oneUnit, coeff.toTree()).simplify().toTex();
91
+ break;
92
+ case nombre_1.NumberType.Decimal:
93
+ default:
94
+ axisUnit = (0, randfloat_1.randfloat)(0, 5, 1);
95
+ coeff = (0, randint_1.randint)(2, 10);
96
+ absciss = (0, round_1.round)(axisUnit * coeff, 2);
97
+ oneUnitTex = axisUnit.frenchify();
98
+ abscissTex = absciss.frenchify();
99
+ break;
100
+ }
101
+ const identifiers = {
102
+ absciss,
103
+ abscissTex,
104
+ abscissType,
105
+ axisUnit,
106
+ coeff,
107
+ oneUnitTex,
108
+ };
109
+ const question = {
110
+ ggbAnswer: getGGBAnswer(identifiers),
111
+ instruction: getInstruction(identifiers),
112
+ studentGgbOptions: getStudentGGBOptions(identifiers),
113
+ identifiers,
114
+ // hint: getHint(identifiers),
115
+ // correction: getCorrection(identifiers),
116
+ };
117
+ return question;
118
+ };
119
+ exports.placeAbscissOnSemiLine = {
120
+ id: "placeAbscissOnSemiLine",
121
+ label: "Placer un point d'abscisse donnée sur une demi-droite graduée",
122
+ isSingleStep: true,
123
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getPlaceAbscissOnSemiLineQuestion, nb),
124
+ ggbTimer: 60,
125
+ isGGBAnswerValid,
126
+ subject: "Mathématiques",
127
+ // getHint,
128
+ // getCorrection,
129
+ getGGBAnswer,
130
+ getStudentGGBOptions,
131
+ answerType: "GGB",
132
+ };
@@ -6,7 +6,7 @@ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQ
6
6
  const geogebraConstructor_1 = require("../../../../geogebra/geogebraConstructor");
7
7
  const point_1 = require("../../../../math/geometry/point");
8
8
  const randint_1 = require("../../../../math/utils/random/randint");
9
- const random_1 = require("../../../../utils/random");
9
+ const random_1 = require("../../../../utils/alea/random");
10
10
  const getPointCoordinatesNoAxisNumbersQuestion = () => {
11
11
  const x = (0, randint_1.randint)(-10, 10);
12
12
  const y = (0, randint_1.randint)(-10, 10);
@@ -1 +1,13 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ import { NumberType } from "../../../../math/numbers/nombre";
3
+ type Identifiers = {
4
+ abscissType: NumberType;
5
+ axisUnit: number;
6
+ oneUnitTex: string;
7
+ absciss: number;
8
+ abscissTex: string;
9
+ coeff: number;
10
+ };
11
+ export declare const readAbscissOnLine: Exercise<Identifiers>;
12
+ export {};
1
13
  //# sourceMappingURL=readAbscissOnLine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"readAbscissOnLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/readAbscissOnLine.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"readAbscissOnLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/readAbscissOnLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAUvD,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA2JF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAgBnD,CAAC"}
@@ -1,92 +1,152 @@
1
1
  "use strict";
2
- // import {
3
- // Exercise,
4
- // Proposition,
5
- // QCMGenerator,
6
- // Question,
7
- // QuestionGenerator,
8
- // VEA,
9
- // GGBVEA,
10
- // addValidProp,
11
- // shuffleProps,
12
- // tryToAddWrongProp,
13
- // GetAnswer,
14
- // GetHint,
15
- // GetCorrection,
16
- // GetInstruction,
17
- // GetKeys,
18
- // GetGGBOptions,
19
- // GetStudentGGBOptions,
20
- // GetGGBAnswer,
21
- // } from "../../../../exercises/exercise";
22
- // import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions";
23
- // type Identifiers = {
24
- // axisUnit: number; //for ggb
25
- // oneUnitTex: string;
26
- // absciss: number | [number, number];
27
- // };
28
- // const getPropositions: QCMGenerator<Identifiers> = (n, { answer }) => {
29
- // const propositions: Proposition[] = [];
30
- // addValidProp(propositions, answer);
31
- // while (propositions.length < n) {
32
- // throw Error("QCM not implemented");
33
- // }
34
- // return shuffleProps(propositions, n);
35
- // };
36
- // const getAnswer: GetAnswer<Identifiers> = (identifiers) => {};
37
- // const getInstruction: GetInstruction<Identifiers> = (identifiers) => {};
38
- // const getHint: GetHint<Identifiers> = (identifiers) => {};
39
- // const getCorrection: GetCorrection<Identifiers> = (identifiers) => {};
40
- // const getGGBAnswer: GetGGBAnswer<Identifiers> = (identifiers) => {};
41
- // const getGGBOptions: GetGGBOptions<Identifiers> = (identifiers) => {};
42
- // const getStudentGGBOptions: GetStudentGGBOptions<Identifiers> = (
43
- // identifiers,
44
- // ) => {};
45
- // const getKeys: GetKeys<Identifiers> = (identifiers) => {
46
- // return [];
47
- // };
48
- // const isAnswerValid: VEA<Identifiers> = (ans, { answer }) => {
49
- // throw Error("VEA not implemented");
50
- // };
51
- // const isGGBAnswerValid: GGBVEA<Identifiers> = (ans, { ggbAnswer }) => {
52
- // throw Error("GGBVea not implemented");
53
- // };
54
- // const getReadAbscissOnLineQuestion: QuestionGenerator<Identifiers> = () => {
55
- // const identifiers: Identifiers = {
56
- // absciss,
57
- // axisUnit,
58
- // oneUnitTex,
59
- // };
60
- // const question: Question<Identifiers> = {
61
- // answer: getAnswer(identifiers),
62
- // instruction: getInstruction(identifiers),
63
- // keys: getKeys(identifiers),
64
- // answerFormat: "tex",
65
- // identifiers,
66
- // hint: getHint(identifiers),
67
- // correction: getCorrection(identifiers),
68
- // };
69
- // return question;
70
- // };
71
- // export const readAbscissOnLine: Exercise<Identifiers> = {
72
- // id: "readAbscissOnLine",
73
- // connector: "=",
74
- // label: "",
75
- // isSingleStep: true,
76
- // generator: (nb: number) =>
77
- // getDistinctQuestions(getReadAbscissOnLineQuestion, nb),
78
- // qcmTimer: 60,
79
- // freeTimer: 60,
80
- // ggbTimer: 60,
81
- // getPropositions,
82
- // isAnswerValid,
83
- // isGGBAnswerValid,
84
- // subject: "Mathématiques",
85
- // getHint,
86
- // getCorrection,
87
- // getAnswer,
88
- // getGGBAnswer,
89
- // getGGBOptions,
90
- // getStudentGGBOptions,
91
- // rebuildIdentifiers,
92
- // };
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.readAbscissOnLine = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const geogebraConstructor_1 = require("../../../../geogebra/geogebraConstructor");
7
+ const point_1 = require("../../../../math/geometry/point");
8
+ const nombre_1 = require("../../../../math/numbers/nombre");
9
+ const randfloat_1 = require("../../../../math/utils/random/randfloat");
10
+ const randint_1 = require("../../../../math/utils/random/randint");
11
+ const round_1 = require("../../../../math/utils/round");
12
+ const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
13
+ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
14
+ const latexParser_1 = require("../../../../tree/parsers/latexParser");
15
+ const random_1 = require("../../../../utils/alea/random");
16
+ const getPropositions = (n, { answer, absciss, abscissTex, abscissType, axisUnit, oneUnitTex }) => {
17
+ const propositions = [];
18
+ (0, exercise_1.addValidProp)(propositions, answer);
19
+ const unitNode = (0, latexParser_1.parseLatex)(oneUnitTex);
20
+ while (propositions.length < n) {
21
+ const coeff = (0, randint_1.randint)(-6, 7, [0, 1]);
22
+ (0, exercise_1.tryToAddWrongProp)(propositions, new multiplyNode_1.MultiplyNode(unitNode, coeff.toTree()).simplify().toTex());
23
+ }
24
+ return (0, exercise_1.shuffleProps)(propositions, n);
25
+ };
26
+ const getAnswer = ({ absciss, abscissType, axisUnit, abscissTex, oneUnitTex, }) => {
27
+ return abscissTex;
28
+ };
29
+ const getInstruction = (identifiers) => {
30
+ return `Quelle est l'abscisse du point $A$ sur la droite graduée ci-dessous ?`;
31
+ };
32
+ const getGGBOptions = ({ absciss, abscissType, axisUnit, oneUnitTex, coeff, }) => {
33
+ const O = new point_1.Point("O", (0).toTree(), (0).toTree());
34
+ const I = new point_1.Point("I", (1).toTree(), (0).toTree());
35
+ const A = new point_1.Point("A", coeff.toTree(), (0).toTree());
36
+ const commands = [
37
+ ...O.toGGBCommand(),
38
+ `Text("\\small 0", (0, -0.5), false, true, 0, 0)`,
39
+ ...I.toGGBCommand(),
40
+ `Text("\\small ${oneUnitTex}", (1, ${abscissType === nombre_1.NumberType.Rational ? -1 : -0.5}), false, true, 0, 0)`,
41
+ ...A.toGGBCommand(),
42
+ ];
43
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
44
+ hideGrid: true,
45
+ forbidShiftDragZoom: true,
46
+ commands,
47
+ yAxis: {
48
+ hidden: true,
49
+ },
50
+ xAxis: {
51
+ hideNumbers: true,
52
+ steps: 1,
53
+ },
54
+ });
55
+ return ggb.getOptions({
56
+ coords: [-7, 7, -2, 2],
57
+ });
58
+ };
59
+ const getKeys = (identifiers) => {
60
+ return [];
61
+ };
62
+ const isAnswerValid = (ans, { answer, abscissTex }) => {
63
+ try {
64
+ const node = (0, latexParser_1.parseLatex)(abscissTex);
65
+ return node
66
+ .toAllValidTexs({
67
+ allowFractionToDecimal: true,
68
+ allowMinusAnywhereInFraction: true,
69
+ })
70
+ .includes(ans);
71
+ }
72
+ catch (err) {
73
+ return false;
74
+ }
75
+ };
76
+ const getReadAbscissOnLineQuestion = () => {
77
+ const abscissType = (0, random_1.random)([
78
+ nombre_1.NumberType.Integer,
79
+ nombre_1.NumberType.Rational,
80
+ nombre_1.NumberType.Decimal,
81
+ ]);
82
+ let absciss, axisUnit, oneUnitTex, abscissTex, coeff;
83
+ switch (abscissType) {
84
+ case nombre_1.NumberType.Integer:
85
+ axisUnit = (0, randint_1.randint)(1, 10);
86
+ coeff = (0, randint_1.randint)(-6, 7, [0, 1]);
87
+ absciss = axisUnit * coeff;
88
+ oneUnitTex = axisUnit.frenchify();
89
+ abscissTex = absciss.frenchify();
90
+ break;
91
+ case nombre_1.NumberType.Rational:
92
+ const randomFrac = (0, random_1.random)([
93
+ [1, 2],
94
+ [1, 3],
95
+ [2, 3],
96
+ [1, 4],
97
+ [3, 4],
98
+ [1, 5],
99
+ [2, 5],
100
+ [3, 5],
101
+ [4, 5],
102
+ ]);
103
+ axisUnit = randomFrac[0] / randomFrac[1];
104
+ const oneUnit = new fractionNode_1.FractionNode(randomFrac[0].toTree(), randomFrac[1].toTree());
105
+ oneUnitTex = oneUnit.toTex();
106
+ coeff = (0, randint_1.randint)(-6, 7, [0, 1]);
107
+ absciss = axisUnit * coeff;
108
+ abscissTex = new multiplyNode_1.MultiplyNode(oneUnit, coeff.toTree()).simplify().toTex();
109
+ break;
110
+ case nombre_1.NumberType.Decimal:
111
+ default:
112
+ axisUnit = (0, randfloat_1.randfloat)(0, 5, 1);
113
+ coeff = (0, randint_1.randint)(-6, 7, [0, 1]);
114
+ absciss = (0, round_1.round)(axisUnit * coeff, 2);
115
+ oneUnitTex = axisUnit.frenchify();
116
+ abscissTex = absciss.frenchify();
117
+ break;
118
+ }
119
+ const identifiers = {
120
+ absciss,
121
+ axisUnit,
122
+ oneUnitTex,
123
+ abscissType,
124
+ abscissTex,
125
+ coeff,
126
+ };
127
+ const question = {
128
+ answer: getAnswer(identifiers),
129
+ instruction: getInstruction(identifiers),
130
+ keys: getKeys(identifiers),
131
+ answerFormat: "tex",
132
+ identifiers,
133
+ ggbOptions: getGGBOptions(identifiers),
134
+ };
135
+ return question;
136
+ };
137
+ exports.readAbscissOnLine = {
138
+ id: "readAbscissOnLine",
139
+ connector: "=",
140
+ label: "Lire une abscisse sur une droite graduée",
141
+ isSingleStep: true,
142
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getReadAbscissOnLineQuestion, nb),
143
+ qcmTimer: 60,
144
+ freeTimer: 60,
145
+ ggbTimer: 60,
146
+ getPropositions,
147
+ isAnswerValid,
148
+ subject: "Mathématiques",
149
+ getAnswer,
150
+ getGGBOptions,
151
+ hasGeogebra: true,
152
+ };
@@ -0,0 +1,13 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ import { NumberType } from "../../../../math/numbers/nombre";
3
+ type Identifiers = {
4
+ abscissType: NumberType;
5
+ axisUnit: number;
6
+ oneUnitTex: string;
7
+ absciss: number;
8
+ abscissTex: string;
9
+ coeff: number;
10
+ };
11
+ export declare const readAbscissOnSemiLine: Exercise<Identifiers>;
12
+ export {};
13
+ //# sourceMappingURL=readAbscissOnSemiLine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readAbscissOnSemiLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/readAbscissOnSemiLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAUvD,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA4JF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAgBvD,CAAC"}