Information & documentation
norm2
def norm2(values): sum = 0.0 for value in values: sum = sum + value**2 return sum print norm2([3.0, 4.0, 5.0]) vector = [12.0, 5.0] print norm2(vector)
Information & documentation
def norm2(values): sum = 0.0 for value in values: sum = sum + value**2 return sum print norm2([3.0, 4.0, 5.0]) vector = [12.0, 5.0] print norm2(vector)