MCPcopy Create free account
hub / github.com/Mrinank-Bhowmick/python-beginner-projects / average

Function average

projects/Calculator/main.py:47–52  ·  view source on GitHub ↗

This function takes space separated number series and then convert it to a list. Then calculates the average of that list of numbers.

()

Source from the content-addressed store, hash-verified

45
46
47def average():
48 """This function takes space separated number series and then convert it to a list.
49 Then calculates the average of that list of numbers."""
50
51 nums = list(map(int, input("Enter all numbers separated by space: ").split()))
52 return sum(nums) / len(nums)
53
54
55def factorial(num):

Callers 1

main.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected