factorial
This commit is contained in:
@ -6,12 +6,10 @@ Returns the average of two or more numbers.
|
||||
|
||||
Takes the sum of all the `args` and divides it by `len(args)`. The secind argument `0.0` in sum is to handle floating point division in `python2`.
|
||||
|
||||
```python
|
||||
|
||||
```python
|
||||
|
||||
def average(*args):
|
||||
return sum(args, 0.0) / len(args)
|
||||
|
||||
```
|
||||
|
||||
``` python
|
||||
|
||||
Reference in New Issue
Block a user