Learn practical skills, build real-world projects, and advance your career
Updated 3 years ago
!pip install jovian --upgrade --quiet
weights = [0.1,0.3,0.5]
paris = [8,9,7]
def crop_yeild(region,weights):
result = 0
for x,y in zip(region,weights):
result += x*y
return result
crop_yeild(paris,weights)
7.0
import numpy as np
weights = np.array([0.1,0.3,0.5])
paris = np.array([8,9,7])
def crop_yeild(region,weights):
return np.dot(region,weights)