GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Python/maths/average_mean.py at master · SharathKumarGithub/Python Expand file tree/ Copy pathaverage_mean.pyMore file actions 20 lines (14 loc) · 503 Bytes / Copy pathaverage_mean.pyFile metadata and controls20 lines (14 loc) · 503 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 """Find mean of a list of numbers.""" def average(nums): """Find mean of a list of numbers.""" return sum(nums) / len(nums) def test_average(): """ >>> test_average() """ assert 12.0 == average([3, 6, 9, 12, 15, 18, 21]) assert 20 == average([5, 10, 15, 20, 25, 30, 35]) assert 4.5 == average([1, 2, 3, 4, 5, 6, 7, 8]) if __name__ == "__main__": """Call average module to find mean of a specific list of numbers.""" print(average([2, 4, 6, 8, 20, 50, 70])) |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |