mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
added vector dot product
This commit is contained in:
@@ -71,3 +71,4 @@ from .multiplyComplexNumbersFunc import *
|
||||
from .geomProgrFunc import *
|
||||
from .geometricMeanFunc import *
|
||||
from .harmonicMeanFunc import *
|
||||
from .vectorDotFunc import *
|
||||
|
||||
13
mathgenerator/funcs/vectorDotFunc.py
Normal file
13
mathgenerator/funcs/vectorDotFunc.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from .__init__ import *
|
||||
|
||||
|
||||
def vectorDotFunc(minVal=-20, maxVal=20):
|
||||
a = [random.randint(minVal, maxVal) for i in range(3)]
|
||||
b = [random.randint(minVal, maxVal) for i in range(3)]
|
||||
c = [a[0] * b[0],
|
||||
a[1] * b[1] ,
|
||||
a[2] * b[2] ]
|
||||
|
||||
problem = str(a) + " . " + str(b) + " = "
|
||||
solution = str(c)
|
||||
return problem, solution
|
||||
Reference in New Issue
Block a user