Write a python function that returns the weighted average of numbers


Topic: Write a python function that returns the weighted average of numbers

Solution

def get_weighted_average(numbers, weightage):
   return sum(x * y for x, y in zip(numbers, weightage)) / sum(weightage)



List all Python Programs