Skip to content

Instantly share code, notes, and snippets.

@o-nnerb
Last active May 7, 2023 13:19
Show Gist options
  • Save o-nnerb/5609c5ca1c56627d1db1a5890e08b89a to your computer and use it in GitHub Desktop.
Save o-nnerb/5609c5ca1c56627d1db1a5890e08b89a to your computer and use it in GitHub Desktop.
# Function that calculates the average of a list of numbers
# Version 2.0, updated on 2022-05-01 by João Silva
# Last modification: 2022-05-01 14:30:00 (Brasilia time)
def calculate_mean(numbers):
total = sum(numbers)
return total / len(numbers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment