This function takes space separated number series and then convert it to a list. Then calculates the average of that list of numbers.
()
| 45 | |
| 46 | |
| 47 | def 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 | |
| 55 | def factorial(num): |