mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35: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 .sectorAreaFunc 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
|
||||
Reference in New Issue
Block a user