You can download this code by clicking the button below.
This code is now available for download.
Calculate the average of a given list of numbers.
Technology Stack : Built-in Python library
Code Type : Function
Code Difficulty : Beginner
def avarage(numbers):
if not numbers:
return 0
return sum(numbers) / len(numbers)