diff --git a/README.md b/README.md index 65bdf2b..27c7b42 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,11 @@ To try out generators, go to todarith.ml/generate ## List of Generators -| Skill | Id | Difficulty | Current Status | Contributors | Example problem | Example Solution | -|----------------------------|------|---------------|----------------|--------------|-----------------|-------------------| -| Addition | 2 | Low | Complete | @lukew3 | 1+5= | 6 | -| Subtraction | 3 | Low | Complete | @lukew3 | 9-4= | 5 | -| Multiplication | 4 | Low | In Progress | @lukew3 | 4*6= | 24 | -| Division | 5 | Low | In Progress | @lukew3 | 4/2= | 2 | -| Factoring | - | Medium | Not Started | - | x^2+x-6 | (x-2)(x+3) | -| Power Rule Differentiation | - | Medium | Not Started | - | x^5 | 5x^4 | +| Id | Skill | Ex. problem | Ex. Solution | Usage | Status | +|------|----------------------------|-------------|---------------|----------------------------------|-------------| +| 2 | Addition | 1+5= | 6 | addition(maxSum, maxAddend) | Complete | +| 3 | Subtraction | 9-4= | 5 | subtraction(maxMinuend, maxDiff) | Complete | +| 4 | Multiplication | 4*6= | 24 | | In Progress | +| 5 | Division | 4/2= | 2 | | In Progress | +| - | Factoring | x^2+x-6 | (x-2)(x+3) | | Not Started | +| - | Power Rule Differentiation | x^5 | 5x^4 | | Not Started | diff --git a/mathGenerator/generator.py b/mathGenerator/generator.py index 9613219..c3fcb0b 100644 --- a/mathGenerator/generator.py +++ b/mathGenerator/generator.py @@ -1,6 +1,6 @@ import random -def addition(maxSum, maxAddend): +def addition(maxSum = 99, maxAddend = 50): """ DESCRIPTION: Generates addition problems with positive addends less than maxAddend and sum less than maxSum @@ -18,7 +18,7 @@ def addition(maxSum, maxAddend): solution = str(c) return problem, solution -def subtraction(maxDiff, maxMinuend): +def subtraction(maxMinuend = 99, maxDiff = 99): """ DESCRIPTION: Generates subtraction problems with difference between 0 and maxDiff. Minuend and subtrahend are between 0 and maxMinuend. @@ -35,3 +35,5 @@ def subtraction(maxDiff, maxMinuend): problem = str(a) + "-" + str(b) + "=" solution = str(c) return problem, solution + +print(subtraction())