mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
Update readme.md table and naming inconsistencies
This commit is contained in:
26
README.md
26
README.md
@@ -19,13 +19,19 @@ problem, solution = mathgen.addition()
|
|||||||
```
|
```
|
||||||
## List of Generators
|
## List of Generators
|
||||||
|
|
||||||
| Id | Skill | Example problem | Example Solution | Function Name | Status |
|
| Id | Skill | Example problem | Example Solution | Function Name |
|
||||||
|------|----------------------------|-----------------|-------------------|--------------------------|-------------|
|
|------|-----------------------------------|--------------------|-------------------|--------------------------|
|
||||||
| 0 | Addition | 1+5= | 6 | addition | Complete |
|
| 0 | Addition | 1+5= | 6 | addition |
|
||||||
| 1 | Subtraction | 9-4= | 5 | subtraction | Complete |
|
| 1 | Subtraction | 9-4= | 5 | subtraction |
|
||||||
| 2 | Multiplication | 4*6= | 24 | multiplication | Complete |
|
| 2 | Multiplication | 4*6= | 24 | multiplication |
|
||||||
| 3 | Division | 4/2= | 2 | division | Complete |
|
| 3 | Division | 4/3= | 1.33333333 | division |
|
||||||
| 4 | Binary Complement 1s | 1010= | 0101 | binaryComplement1s | Complete |
|
| 4 | Binary Complement 1s | 1010= | 0101 | binaryComplement1s |
|
||||||
| 5 | Modulo Division | 10%3= | 1 | moduloDivision | Complete |
|
| 5 | Modulo Division | 10%3= | 1 | moduloDivision |
|
||||||
| 6 | Square Root | sqrt(a)= | b | squareRootFunction | Complete |
|
| 6 | Square Root | sqrt(25)= | 5 | squareRootFunction |
|
||||||
| 7 | Power Rule Differentiation | nx^m | (n*m)x^(m-1) | powerRuleDifferentiation | Complete |
|
| 7 | Power Rule Differentiation | 4x^3 | 12x^2 | powerRuleDifferentiation |
|
||||||
|
| 8 | Square | 4^2 | 16 | square |
|
||||||
|
| 9 | LCM (Least Common Multiple) | LCM of 14 and 9 = | 126 | lcm |
|
||||||
|
| 10 | GCD (Greatest Common Denominator) | GCD of 18 and 18 = | 18 | gcd |
|
||||||
|
| 11 | Basic Algebra | 9x + 7 = 10 | 1/3 | basicAlgebra |
|
||||||
|
| 12 | Logarithm | log3(3) | 1 | log |
|
||||||
|
| 13 | Easy Division | 270/15 = | 18 | intDivision |
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ def moduloFunc(maxRes = 99, maxModulo= 99):
|
|||||||
solution = str(c)
|
solution = str(c)
|
||||||
return problem, solution
|
return problem, solution
|
||||||
|
|
||||||
def squareRootFunction(minNo = 1, maxNo = 12):
|
def squareRootFunc(minNo = 1, maxNo = 12):
|
||||||
b = random.randint(minNo, maxNo)
|
b = random.randint(minNo, maxNo)
|
||||||
a = b*b
|
a = b*b
|
||||||
problem = "sqrt(" + str(a) + ")="
|
problem = "sqrt(" + str(a) + ")="
|
||||||
@@ -163,16 +163,16 @@ def divisionToIntFunc(maxA=25, maxB=25):
|
|||||||
solution=int(divisor/dividend)
|
solution=int(divisor/dividend)
|
||||||
return problem,solution
|
return problem,solution
|
||||||
|
|
||||||
def DecimalToBinary(max_dec=99):
|
def DecimalToBinaryFunc(max_dec=99):
|
||||||
a = random.randint(1, max_dec)
|
a = random.randint(1, max_dec)
|
||||||
b = bin(a).replace("0b", "")
|
b = bin(a).replace("0b", "")
|
||||||
problem = "Binary of "+str(a)+"="
|
problem = "Binary of "+str(a)+"="
|
||||||
solution = str(b)
|
solution = str(b)
|
||||||
return problem, solution
|
return problem, solution
|
||||||
|
|
||||||
def BinaryToDecimal(max_dig=10):
|
def BinaryToDecimalFunc(max_dig=10):
|
||||||
problem=''
|
problem=''
|
||||||
for i in range(random.randint(1,max_dig)):
|
for i in range(random.randint(1,max_dig)):
|
||||||
temp = str(random.randint(0, 1))
|
temp = str(random.randint(0, 1))
|
||||||
problem += temp
|
problem += temp
|
||||||
|
|
||||||
@@ -211,17 +211,16 @@ addition = Generator("Addition", 0, "a+b=", "c", additionFunc)
|
|||||||
subtraction = Generator("Subtraction", 1, "a-b=", "c", subtractionFunc)
|
subtraction = Generator("Subtraction", 1, "a-b=", "c", subtractionFunc)
|
||||||
multiplication = Generator("Multiplication", 2, "a*b=", "c", multiplicationFunc)
|
multiplication = Generator("Multiplication", 2, "a*b=", "c", multiplicationFunc)
|
||||||
division = Generator("Division", 3, "a/b=", "c", divisionFunc)
|
division = Generator("Division", 3, "a/b=", "c", divisionFunc)
|
||||||
binaryComplement1s = Generator("binary_complement_1s", 4, "1010=", "0101", binaryComplement1sFunc)
|
binaryComplement1s = Generator("Binary Complement 1s", 4, "1010=", "0101", binaryComplement1sFunc)
|
||||||
moduloDivision = Generator("Modulo_Division", 5, "a%b=", "c", moduloFunc)
|
moduloDivision = Generator("Modulo Division", 5, "a%b=", "c", moduloFunc)
|
||||||
squareRoot = Generator("Square_Root", 6, "sqrt(a)=", "b", squareRootFunction)
|
squareRoot = Generator("Square Root", 6, "sqrt(a)=", "b", squareRootFunc)
|
||||||
powerRuleDifferentiation = Generator("Power_Rule_Differentiation", 7, "nx^m=", "(n*m)x^(m-1)", powerRuleDifferentiationFunc)
|
powerRuleDifferentiation = Generator("Power Rule Differentiation", 7, "nx^m=", "(n*m)x^(m-1)", powerRuleDifferentiationFunc)
|
||||||
square = Generator("Square", 8,"a^2", "b", squareFunc)
|
square = Generator("Square", 8,"a^2", "b", squareFunc)
|
||||||
lcm = Generator("Lcm_generator", 9, "LCM of a and b = ", "c", lcmFunc)
|
lcm = Generator("LCM (Least Common Multiple)", 9, "LCM of a and b = ", "c", lcmFunc)
|
||||||
gcd = Generator("Gcd_generator", 10, "GCD of a and b = ", "c", gcdFunc)
|
gcd = Generator("GCD (Greatest Common Denominator)", 10, "GCD of a and b = ", "c", gcdFunc)
|
||||||
basicAlgebra = Generator("Basic_Algebra", 11, "ax + b = c", "d", basicAlgebraFunc)
|
basicAlgebra = Generator("Basic Algebra", 11, "ax + b = c", "d", basicAlgebraFunc)
|
||||||
log = Generator("Logarithm", 12, "log2(8)", "3", logFunc)
|
log = Generator("Logarithm", 12, "log2(8)", "3", logFunc)
|
||||||
intdivision = Generator("Easy Divisio", 13,"a/b=","c",divisionToIntFunc)
|
intDivision = Generator("Easy Division", 13,"a/b=","c",divisionToIntFunc)
|
||||||
|
decimalToBinary = Generator("Decimal to Binary",14,"Binary of a=","b",DecimalToBinaryFunc)
|
||||||
decimaltobinary = Generator("Decimal to Binary",15,"Binary of a=","b",DecimalToBinary)
|
binaryToDecimal = Generator("Binary to Decimal",15,"Decimal of a=","b",BinaryToDecimalFunc)
|
||||||
binarytodecimal = Generator("Binary to Decimal",16,"Decimal of a=","b",BinaryToDecimal)
|
fractionDivision = Generator("Fraction Division", 16, "(a/b)/(c/d)=", "x/y", divideFractionsFunc)
|
||||||
fractionDivision = Generator("Fraction Division", 17, "(a/b)/(c/d)=", "x/y", divideFractionsFunc)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user