Learn practical skills, build real-world projects, and advance your career
k=[73, 67,43]
j=[91, 88,64]
h=[87, 134,58]
s=[102, 43,37]
u=[69, 96,70]
w1,w2,w3=0.3,0.2,0.5
weights=[w1,w2,w3]

def yield_crop(region,weights):
    result=0
    for x, w in zip(region,weights):
        result+=x*w
    return result
yield_crop(k,weights)
!pip install numpy
import numpy as np
k=np.array([73,67,43])
w1,w2,w3=0.3,0.2,0.5
weights=np.array([0.3,0.5,0.5])