mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
@@ -386,6 +386,7 @@ def primeFactors(minVal=1, maxVal=200):
|
|||||||
problem = f"Find prime factors of {a}"
|
problem = f"Find prime factors of {a}"
|
||||||
solution = f"{factors}"
|
solution = f"{factors}"
|
||||||
return problem, solution
|
return problem, solution
|
||||||
|
|
||||||
def permutationFunc(maxlength=20):
|
def permutationFunc(maxlength=20):
|
||||||
def factorial(a):
|
def factorial(a):
|
||||||
d=1
|
d=1
|
||||||
@@ -399,6 +400,7 @@ def permutationFunc(maxlength=20):
|
|||||||
problem= "Number of combinations from {} objects picked {} at a time = ".format(a,b)
|
problem= "Number of combinations from {} objects picked {} at a time = ".format(a,b)
|
||||||
return problem, solution
|
return problem, solution
|
||||||
|
|
||||||
|
|
||||||
# || Class Instances
|
# || Class Instances
|
||||||
|
|
||||||
#Format is:
|
#Format is:
|
||||||
@@ -432,4 +434,6 @@ distance2Point = Generator("Distance between 2 points", 24, "Find the distance b
|
|||||||
pythagoreanTheorem = Generator("Pythagorean Theorem", 25, "The hypotenuse of a right triangle given the other two lengths a and b = ", "hypotenuse", pythagoreanTheoremFunc)
|
pythagoreanTheorem = Generator("Pythagorean Theorem", 25, "The hypotenuse of a right triangle given the other two lengths a and b = ", "hypotenuse", pythagoreanTheoremFunc)
|
||||||
linearEquations = Generator("Linear Equations", 26, "2x+5y=20 & 3x+6y=12", "x=-20 & y=12", linearEquationsFunc) #This has multiple variables whereas #23 has only x and y
|
linearEquations = Generator("Linear Equations", 26, "2x+5y=20 & 3x+6y=12", "x=-20 & y=12", linearEquationsFunc) #This has multiple variables whereas #23 has only x and y
|
||||||
primeFactors = Generator("Prime Factorisation", 27, "Prime Factors of a =", "[b, c, d, ...]", primeFactors)
|
primeFactors = Generator("Prime Factorisation", 27, "Prime Factors of a =", "[b, c, d, ...]", primeFactors)
|
||||||
|
|
||||||
permutations= Generator("Permutations",28, "Total permutations of 4 objects at a time from 10 objects is","5040", permutationFunc)
|
permutations= Generator("Permutations",28, "Total permutations of 4 objects at a time from 10 objects is","5040", permutationFunc)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user