Learn practical skills, build real-world projects, and advance your career
Created 3 years ago
kanto = [73,67,43]
weights = [0.3, 0.2, 0.5]
for item in zip(kanto,weights):
print(item)
(73, 0.3)
(67, 0.2)
(43, 0.5)
def crop_yield(region, weights):
result = 0
for x,y in zip(region, weights):
result += x*y
return result
crop_yield(kanto,weights)
56.8