Develop an algorithm that will calculate the average of five numbers
Answers
Answered by
4
def avg(nums):
A = min(nums)
d = [n - A for n in nums]
return A + (sum(d) / len(nums))
print("Average:", avg((nums := list(map(int, input("nums: ").split())))))
Similar questions