Skip to content

Instantly share code, notes, and snippets.

@pschanely
Created March 23, 2024 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pschanely/7877e51e735bd9c2049cc7d4aeb859cb to your computer and use it in GitHub Desktop.
Save pschanely/7877e51e735bd9c2049cc7d4aeb859cb to your computer and use it in GitHub Desktop.
Shared via CrossHair Playground
from typing import List
def average(numbers: List[float]) -> float:
'''
pre: len(numbers) >= 0
post: min(numbers) <= __return__ <= max(numbers)
'''
return sum(numbers) / len(numbers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment