math-exercises 3.0.186 → 3.0.188

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 (79) hide show
  1. package/lib/exercises/math/derivation/derivative/exp/expDerivativeProductFExp.d.ts.map +1 -1
  2. package/lib/exercises/math/derivation/derivative/exp/expDerivativeProductFExp.js +22 -6
  3. package/lib/exercises/math/derivation/derivative/exp/expDerivativeQuotientFExp.d.ts.map +1 -1
  4. package/lib/exercises/math/derivation/derivative/exp/expDerivativeQuotientFExp.js +16 -8
  5. package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberAndImageReading.d.ts +9 -0
  6. package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberAndImageReading.d.ts.map +1 -0
  7. package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberAndImageReading.js +155 -0
  8. package/lib/exercises/math/derivation/derivativeNumber/index.d.ts +1 -0
  9. package/lib/exercises/math/derivation/derivativeNumber/index.d.ts.map +1 -1
  10. package/lib/exercises/math/derivation/derivativeNumber/index.js +1 -0
  11. package/lib/exercises/math/derivation/problems/problemMaximizeBoxVolumeFindX.d.ts.map +1 -1
  12. package/lib/exercises/math/derivation/problems/problemMaximizeBoxVolumeFindX.js +80 -29
  13. package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.d.ts.map +1 -1
  14. package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.js +30 -2
  15. package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.d.ts.map +1 -1
  16. package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.js +59 -16
  17. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingSecant.d.ts.map +1 -1
  18. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingSecant.js +0 -4
  19. package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.d.ts.map +1 -1
  20. package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.js +23 -9
  21. package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.d.ts.map +1 -1
  22. package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.js +5 -29
  23. package/lib/exercises/math/derivation/variations/findExtremaFromFunctionExpression.d.ts.map +1 -1
  24. package/lib/exercises/math/derivation/variations/findExtremaFromFunctionExpression.js +2 -7
  25. package/lib/exercises/math/functions/basics/inverseImageFunction.js +1 -1
  26. package/lib/exercises/math/functions/sign/affineSignTable.d.ts.map +1 -1
  27. package/lib/exercises/math/functions/sign/affineSignTable.js +1 -1
  28. package/lib/exercises/math/functions/sign/equationFromSignTable.d.ts +1 -0
  29. package/lib/exercises/math/functions/sign/equationFromSignTable.d.ts.map +1 -1
  30. package/lib/exercises/math/functions/sign/equationFromSignTable.js +60 -33
  31. package/lib/exercises/math/functions/sign/partialSignTableFromGraph.d.ts +6 -4
  32. package/lib/exercises/math/functions/sign/partialSignTableFromGraph.d.ts.map +1 -1
  33. package/lib/exercises/math/functions/sign/partialSignTableFromGraph.js +160 -63
  34. package/lib/exercises/math/functions/sign/readSignTable.d.ts +4 -1
  35. package/lib/exercises/math/functions/sign/readSignTable.d.ts.map +1 -1
  36. package/lib/exercises/math/functions/sign/readSignTable.js +32 -9
  37. package/lib/exercises/math/functions/sign/signTableFromGraph.d.ts +6 -4
  38. package/lib/exercises/math/functions/sign/signTableFromGraph.d.ts.map +1 -1
  39. package/lib/exercises/math/functions/sign/signTableFromGraph.js +160 -57
  40. package/lib/exercises/math/percent/evolutions/averageEvolutionRateFromStartAndEndValue.d.ts +9 -0
  41. package/lib/exercises/math/percent/evolutions/averageEvolutionRateFromStartAndEndValue.d.ts.map +1 -0
  42. package/lib/exercises/math/percent/evolutions/averageEvolutionRateFromStartAndEndValue.js +135 -0
  43. package/lib/exercises/math/percent/evolutions/index.d.ts +1 -0
  44. package/lib/exercises/math/percent/evolutions/index.d.ts.map +1 -1
  45. package/lib/exercises/math/percent/evolutions/index.js +1 -0
  46. package/lib/exercises/math/powers/equationOnePlusTPowerN.d.ts +9 -0
  47. package/lib/exercises/math/powers/equationOnePlusTPowerN.d.ts.map +1 -0
  48. package/lib/exercises/math/powers/equationOnePlusTPowerN.js +118 -0
  49. package/lib/exercises/math/powers/estimateNthRoot.d.ts +13 -0
  50. package/lib/exercises/math/powers/estimateNthRoot.d.ts.map +1 -0
  51. package/lib/exercises/math/powers/estimateNthRoot.js +126 -0
  52. package/lib/exercises/math/powers/index.d.ts +3 -0
  53. package/lib/exercises/math/powers/index.d.ts.map +1 -1
  54. package/lib/exercises/math/powers/index.js +3 -0
  55. package/lib/exercises/math/powers/solveNthRootEquation.d.ts +9 -0
  56. package/lib/exercises/math/powers/solveNthRootEquation.d.ts.map +1 -0
  57. package/lib/exercises/math/powers/solveNthRootEquation.js +111 -0
  58. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRecurrenceFormulaFromSituation.d.ts.map +1 -1
  59. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRecurrenceFormulaFromSituation.js +2 -2
  60. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.js +1 -1
  61. package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.js +1 -1
  62. package/lib/exercises/vea/percentVEA.d.ts +6 -1
  63. package/lib/exercises/vea/percentVEA.d.ts.map +1 -1
  64. package/lib/exercises/vea/percentVEA.js +15 -1
  65. package/lib/index.d.ts +34 -9
  66. package/lib/index.d.ts.map +1 -1
  67. package/lib/math/utils/sequences/situations/seqArithmeticSituations.d.ts.map +1 -1
  68. package/lib/math/utils/sequences/situations/seqArithmeticSituations.js +5 -8
  69. package/lib/math/utils/sequences/situations/seqArithmeticUtils.d.ts +1 -1
  70. package/lib/math/utils/sequences/situations/seqArithmeticUtils.d.ts.map +1 -1
  71. package/lib/math/utils/sequences/situations/seqArithmeticUtils.js +1 -3
  72. package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts.map +1 -1
  73. package/lib/math/utils/sequences/situations/seqGeometricSituations.js +8 -10
  74. package/lib/tests/questionTest.d.ts.map +1 -1
  75. package/lib/tests/questionTest.js +8 -0
  76. package/lib/tree/nodes/sets/closure.d.ts +1 -0
  77. package/lib/tree/nodes/sets/closure.d.ts.map +1 -1
  78. package/lib/tree/nodes/sets/closure.js +12 -0
  79. package/package.json +1 -1
@@ -69,6 +69,14 @@ export const questionTest = (exo, question) => {
69
69
  throw new Error(`exo ${exo.id} has no initTable`);
70
70
  if (!question.initTable.some((row) => row.some((cell) => cell === "")))
71
71
  throw new Error(`exo ${exo.id} is answertype table but no input in table`);
72
+ const initTableRowsLengths = question.initTable.map((row) => row.length);
73
+ if (initTableRowsLengths.some((rowLength, i) => rowLength !== initTableRowsLengths[0]))
74
+ throw new Error(`exo ${exo.id} has different row lengths in initTable`);
75
+ const answerTableRowsLengths = question.answerTable.map((row) => row.length);
76
+ if (answerTableRowsLengths.some((rowLength, i) => rowLength !== answerTableRowsLengths[0]))
77
+ throw new Error(`exo ${exo.id} has different row lengths in answerTable`);
78
+ if (initTableRowsLengths.some((rowLength, i) => rowLength !== question.answerTable[i].length))
79
+ throw new Error(`exo ${exo.id} has different row lengths in answerTable and initTable`);
72
80
  }
73
81
  else if (exo.answerType === "treeDiagram") {
74
82
  if (!question.initTreeTable?.length)
@@ -10,6 +10,7 @@ export declare abstract class Closure {
10
10
  static leftReverse(closure: ClosureType): ClosureType;
11
11
  static rightReverse(closure: ClosureType): ClosureType;
12
12
  static switch(closure: ClosureType): ClosureType;
13
+ static fromBooleans(isLeftClosed: boolean, isRightClosed: boolean): ClosureType;
13
14
  static fromBrackets(left: "[" | "]", right: "]" | "["): ClosureType;
14
15
  static toBrackets(closure: ClosureType): string[];
15
16
  static isLeftOpen(closure: ClosureType): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"closure.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/sets/closure.ts"],"names":[],"mappings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nC,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW;IAYvC,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,WAAW;IAYxC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,WAAW;IAYlC,MAAM,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO;IAOjE,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG;IAQrD,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW;IAatC,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW;IAUtC,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW;IAWvC,MAAM,CAAC,iBAAiB,GAAI,GAAG,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,eAGpD;IACF,MAAM,CAAC,kBAAkB,GAAI,GAAG,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,eAGrD;IACF,MAAM,CAAC,iBAAiB,GAAI,GAAG,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,eAGpD;IACF,MAAM,CAAC,kBAAkB,GAAI,GAAG,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,eAGrD;CACH"}
@@ -69,6 +69,18 @@ export class Closure {
69
69
  return ClosureType.FO;
70
70
  }
71
71
  }
72
+ static fromBooleans(isLeftClosed, isRightClosed) {
73
+ if (isLeftClosed) {
74
+ if (isRightClosed)
75
+ return ClosureType.FF;
76
+ else
77
+ return ClosureType.FO;
78
+ }
79
+ else if (isRightClosed)
80
+ return ClosureType.OF;
81
+ else
82
+ return ClosureType.OO;
83
+ }
72
84
  static fromBrackets(left, right) {
73
85
  if (left === "[")
74
86
  if (right === "]")
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "math-exercises",
3
3
  "type": "module",
4
- "version": "3.0.186",
4
+ "version": "3.0.188",
5
5
  "description": "Math exercises generator for middle school and high school",
6
6
  "main": "lib/index.js",
7
7
  "files": [