🔧 fixed some stuff with gen#69&#70

This commit is contained in:
D-T-666
2020-10-19 18:08:20 +04:00
parent 6611182c64
commit 53071a276d
4 changed files with 97 additions and 88 deletions

View File

@@ -1,7 +1,8 @@
from .__init__ import *
def euclidianNormFunc(v1: list):
problem = f"Euclidian norm or L2 norm of the vector{v1} is:"
solution = sqrt(sum([i**2 for i in v1]))
def euclidianNormFunc(maxEltAmt=20):
vec = [random.uniform(0, 1000) for i in range(random.randint(2,maxEltAmt))]
problem = f"Euclidian norm or L2 norm of the vector{vec} is:"
solution = math.sqrt(sum([i**2 for i in vec]))
return problem, solution