Files
mathgenerator/mathgenerator/funcs/determinantToMatrix22.py
2020-10-19 14:00:28 -04:00

14 lines
376 B
Python

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