mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
Merge branch 'master' of https://github.com/Todarith/mathgenerator
This commit is contained in:
@@ -79,3 +79,4 @@ from .binary2sComplement import *
|
|||||||
from .matrixInversion import *
|
from .matrixInversion import *
|
||||||
from .sectorAreaFunc import*
|
from .sectorAreaFunc import*
|
||||||
from .meanMedianFunc import*
|
from .meanMedianFunc import*
|
||||||
|
from .determinantToMatrix22 import *
|
||||||
|
|||||||
12
mathgenerator/funcs/determinantToMatrix22.cpp
Normal file
12
mathgenerator/funcs/determinantToMatrix22.cpp
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
from .__init__ import *
|
||||||
|
|
||||||
|
def determinantToMatrix22(maxMatrixVal = 100):
|
||||||
|
a = random.randint(0, maxMatrixVal)
|
||||||
|
b = random.randint(0, maxMatrixVal)
|
||||||
|
c = random.randint(0, maxMatrixVal)
|
||||||
|
d = random.randint(0, maxMatrixVal)
|
||||||
|
|
||||||
|
determinant = a*d - b*c
|
||||||
|
problem = f"Det([[{a}, {b}], [{c}, {d}]]) = "
|
||||||
|
solution = f" {determinant}"
|
||||||
|
return problem, solution
|
||||||
@@ -111,3 +111,4 @@ binary2sComplement = Generator("Binary 2's Complement", 73, "2's complement of 1
|
|||||||
invertmatrix = Generator("Inverse of a Matrix", 74, "Inverse of a matrix A is", "A^(-1)", matrixInversion)
|
invertmatrix = Generator("Inverse of a Matrix", 74, "Inverse of a matrix A is", "A^(-1)", matrixInversion)
|
||||||
sectorArea=Generator("Area of a Sector", 75,"Area of a sector with radius, r and angle, a ","Area",sectorAreaFunc)
|
sectorArea=Generator("Area of a Sector", 75,"Area of a sector with radius, r and angle, a ","Area",sectorAreaFunc)
|
||||||
meanMedian=Generator("Mean and Median", 76,"Mean and median of given set of numbers","Mean, Median",meanMedianFunc)
|
meanMedian=Generator("Mean and Median", 76,"Mean and median of given set of numbers","Mean, Median",meanMedianFunc)
|
||||||
|
intMatrix22determinant = Generator("Determinant to 2x2 Matrix", 77, "Det([[a,b],[c,d]]) =", " a * d - b * c", determinantToMatrix22)
|
||||||
|
|||||||
Reference in New Issue
Block a user