Learn practical skills, build real-world projects, and advance your career
Created 2 years ago
w = [0.3, 0.4, 0.5]
kanto = [73, 67, 43]
def cop_yeld(region, weight):
result = 0
for x, w in zip(region, weight):
result += x * w
return result
cop_yeld(kanto, w)
21.9
hoenn = [120, 234, 233]
cop_yeld(hoenn, w)
36.0
import numpy as np
kanto = np.array([73, 673, 43])
w = np.array([0.3, 0.4, 0.5])