INF205/lab_1/2.py
2024-02-24 11:37:06 +01:00

4 lines
113 B
Python

def scalar_product(x, y, dimension):
sum = 0.0
for i in range(dimension): sum += x[i]*y[i]
return sum