From e77af6cdef48c660d3a82b80b22d983416da69e7 Mon Sep 17 00:00:00 2001 From: midhun varman Date: Mon, 19 Oct 2020 15:01:19 +0530 Subject: [PATCH] added dot product --- mathgenerator/funcs/vectorDotFunc.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mathgenerator/funcs/vectorDotFunc.py b/mathgenerator/funcs/vectorDotFunc.py index a15cd75..0364c65 100644 --- a/mathgenerator/funcs/vectorDotFunc.py +++ b/mathgenerator/funcs/vectorDotFunc.py @@ -4,9 +4,7 @@ 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] ] + c = a[0] * b[0] + a[1] * b[1] + a[2] * b[2] problem = str(a) + " . " + str(b) + " = " solution = str(c)