mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
set param defaults on addition and subtraction, readme formatting
This commit is contained in:
16
README.md
16
README.md
@@ -5,11 +5,11 @@ To try out generators, go to todarith.ml/generate
|
|||||||
|
|
||||||
## List of Generators
|
## List of Generators
|
||||||
|
|
||||||
| Skill | Id | Difficulty | Current Status | Contributors | Example problem | Example Solution |
|
| Id | Skill | Ex. problem | Ex. Solution | Usage | Status |
|
||||||
|----------------------------|------|---------------|----------------|--------------|-----------------|-------------------|
|
|------|----------------------------|-------------|---------------|----------------------------------|-------------|
|
||||||
| Addition | 2 | Low | Complete | @lukew3 | 1+5= | 6 |
|
| 2 | Addition | 1+5= | 6 | addition(maxSum, maxAddend) | Complete |
|
||||||
| Subtraction | 3 | Low | Complete | @lukew3 | 9-4= | 5 |
|
| 3 | Subtraction | 9-4= | 5 | subtraction(maxMinuend, maxDiff) | Complete |
|
||||||
| Multiplication | 4 | Low | In Progress | @lukew3 | 4*6= | 24 |
|
| 4 | Multiplication | 4*6= | 24 | | In Progress |
|
||||||
| Division | 5 | Low | In Progress | @lukew3 | 4/2= | 2 |
|
| 5 | Division | 4/2= | 2 | | In Progress |
|
||||||
| Factoring | - | Medium | Not Started | - | x^2+x-6 | (x-2)(x+3) |
|
| - | Factoring | x^2+x-6 | (x-2)(x+3) | | Not Started |
|
||||||
| Power Rule Differentiation | - | Medium | Not Started | - | x^5 | 5x^4 |
|
| - | Power Rule Differentiation | x^5 | 5x^4 | | Not Started |
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import random
|
import random
|
||||||
|
|
||||||
def addition(maxSum, maxAddend):
|
def addition(maxSum = 99, maxAddend = 50):
|
||||||
"""
|
"""
|
||||||
DESCRIPTION:
|
DESCRIPTION:
|
||||||
Generates addition problems with positive addends less than maxAddend and sum less than maxSum
|
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)
|
solution = str(c)
|
||||||
return problem, solution
|
return problem, solution
|
||||||
|
|
||||||
def subtraction(maxDiff, maxMinuend):
|
def subtraction(maxMinuend = 99, maxDiff = 99):
|
||||||
"""
|
"""
|
||||||
DESCRIPTION:
|
DESCRIPTION:
|
||||||
Generates subtraction problems with difference between 0 and maxDiff. Minuend and subtrahend are between 0 and maxMinuend.
|
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) + "="
|
problem = str(a) + "-" + str(b) + "="
|
||||||
solution = str(c)
|
solution = str(c)
|
||||||
return problem, solution
|
return problem, solution
|
||||||
|
|
||||||
|
print(subtraction())
|
||||||
|
|||||||
Reference in New Issue
Block a user