diff --git a/README.md b/README.md
index 2ecc69801..f97069ea7 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,15 @@
## Table of Contents
+### :heavy_division_sign: Math
+
+View contents
+
### :books: List
View contents
chunk
@@ -26,16 +35,206 @@
View contents
-### :heavy_division_sign: Math
-
-View contents
-
+## :heavy_division_sign: Math
+
+### average
+
+:information_source: Already implemented via `statistics.mean`. `statistics.mean` takes an array as an argument whereas this function takes variadic arguments.
+
+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`.
+
+```py
+
+
+def average(*args):
+ return sum(args, 0.0) / len(args)
+
+
+ ```
+
+View Examples
+
+```py
+
+average(*[1, 2, 3]) # 2.0
+average(1, 2, 3) # 2.0
+
+```
+
+
+
:arrow_up: Back to top
+
+### gcd
+
+:information_source: `math.gcd` works with only two numbers
+
+Calculates the greatest common divisor between two or more numbers/lists.
+
+The `helperGcdfunction` uses recursion. Base case is when `y` equals `0`. In this case, return `x`. Otherwise, return the GCD of `y` and the remainder of the division `x/y`.
+
+Uses the reduce function from the inbuilt module `functools`. Also defines a method `spread` for javascript like spreading of lists.
+
+```py
+
+
+from functools import reduce
+
+
+def spread(arg):
+ ret = []
+ for i in arg:
+ if isinstance(i, list):
+ ret.extend(i)
+ else:
+ ret.append(i)
+ return ret
+
+
+def gcd(*args):
+ numbers = []
+ numbers.extend(spread(list(args)))
+
+ def _gcd(x, y):
+ return x if not y else gcd(y, x % y)
+
+ return reduce((lambda x, y: _gcd(x, y)), numbers)
+
+
+ ```
+
+
+View Examples
+
+```py
+
+gcd(8,36) # 4
+
+```
+
+
+
:arrow_up: Back to top
+
+### lcm
+
+Returns the least common multiple of two or more numbers.
+
+Use the `greatest common divisor (GCD)` formula and the fact that `lcm(x,y) = x * y / gcd(x,y)` to determine the least common multiple. The GCD formula uses recursion.
+
+Uses `reduce` function from the inbuilt module `functools`. Also defines a method `spread` for javascript like spreading of lists.
+
+```py
+
+
+from functools import reduce
+
+
+def spread(arg):
+ ret = []
+ for i in arg:
+ if isinstance(i, list):
+ ret.extend(i)
+ else:
+ ret.append(i)
+ return ret
+
+
+def lcm(*args):
+ numbers = []
+ numbers.extend(spread(list(args)))
+
+ def _gcd(x, y):
+ return x if not y else gcd(y, x % y)
+
+ def _lcm(x, y):
+ return x * y / _gcd(x, y)
+
+ return reduce((lambda x, y: _lcm(x, y)), numbers)
+
+
+ ```
+
+
+View Examples
+
+```py
+
+lcm(12, 7) # 84
+lcm([1, 3, 4], 5) # 60
+
+```
+
+
+
:arrow_up: Back to top
+
+### max_n
+
+Returns the `n` maximum elements from the provided list. If `n` is greater than or equal to the provided list's length, then return the original list(sorted in descending order).
+
+Use `list.sort()` combined with the `deepcopy` function from the inbuilt `copy` module to create a shallow clone of the list and sort it in ascending order and then use `list.reverse()` reverse it to make it descending order. Use `[:n]` to get the specified number of elements. Omit the second argument, `n`, to get a one-element array
+
+```py
+
+
+from copy import deepcopy
+
+
+def max_n(arr, n=1):
+ numbers = deepcopy(arr)
+ numbers.sort()
+ numbers.reverse()
+ return numbers[:n]
+
+
+ ```
+
+View Examples
+
+```py
+
+max_n([1, 2, 3]) # [3]
+max_n([1, 2, 3], 2) # [3,2]
+
+```
+
+
+
:arrow_up: Back to top
+
+### min_n
+
+Returns the `n` minimum elements from the provided list. If `n` is greater than or equal to the provided list's length, then return the original list(sorted in ascending order).
+
+Use `list.sort()` combined with the `deepcopy` function from the inbuilt `copy` module to create a shallow clone of the list and sort it in ascending order. Use `[:n]` to get the specified number of elements. Omit the second argument, `n`, to get a one-element array
+
+```py
+
+
+from copy import deepcopy
+
+
+def min_n(arr, n=1):
+ numbers = deepcopy(arr)
+ numbers.sort()
+ return numbers[:n]
+
+
+ ```
+
+View Examples
+
+```py
+
+min_n([1, 2, 3]) # [1]
+min_n([1, 2, 3], 2) # [1,2]
+
+```
+
+
+
:arrow_up: Back to top
+
## :books: List
### chunk
@@ -328,175 +527,6 @@ count_vowels('gym') # 0
:arrow_up: Back to top
-## :heavy_division_sign: Math
-
-### gcd
-
-:information_source: `math.gcd` works with only two numbers
-
-Calculates the greatest common divisor between two or more numbers/lists.
-
-The `helperGcdfunction` uses recursion. Base case is when `y` equals `0`. In this case, return `x`. Otherwise, return the GCD of `y` and the remainder of the division `x/y`.
-
-Uses the reduce function from the inbuilt module `functools`. Also defines a method `spread` for javascript like spreading of lists.
-
-```py
-
-
-from functools import reduce
-
-
-def spread(arg):
- ret = []
- for i in arg:
- if isinstance(i, list):
- ret.extend(i)
- else:
- ret.append(i)
- return ret
-
-
-def gcd(*args):
- numbers = []
- numbers.extend(spread(list(args)))
-
- def _gcd(x, y):
- return x if not y else gcd(y, x % y)
-
- return reduce((lambda x, y: _gcd(x, y)), numbers)
-
-
- ```
-
-
-View Examples
-
-```py
-
-gcd(8,36) # 4
-
-```
-
-
-
:arrow_up: Back to top
-
-### lcm
-
-Returns the least common multiple of two or more numbers.
-
-Use the `greatest common divisor (GCD)` formula and the fact that `lcm(x,y) = x * y / gcd(x,y)` to determine the least common multiple. The GCD formula uses recursion.
-
-Uses `reduce` function from the inbuilt module `functools`. Also defines a method `spread` for javascript like spreading of lists.
-
-```py
-
-
-from functools import reduce
-
-
-def spread(arg):
- ret = []
- for i in arg:
- if isinstance(i, list):
- ret.extend(i)
- else:
- ret.append(i)
- return ret
-
-
-def lcm(*args):
- numbers = []
- numbers.extend(spread(list(args)))
-
- def _gcd(x, y):
- return x if not y else gcd(y, x % y)
-
- def _lcm(x, y):
- return x * y / _gcd(x, y)
-
- return reduce((lambda x, y: _lcm(x, y)), numbers)
-
-
- ```
-
-
-View Examples
-
-```py
-
-lcm(12, 7) # 84
-lcm([1, 3, 4], 5) # 60
-
-```
-
-
-
:arrow_up: Back to top
-
-### max_n
-
-Returns the `n` maximum elements from the provided list. If `n` is greater than or equal to the provided list's length, then return the original list(sorted in descending order).
-
-Use `list.sort()` combined with the `deepcopy` function from the inbuilt `copy` module to create a shallow clone of the list and sort it in ascending order and then use `list.reverse()` reverse it to make it descending order. Use `[:n]` to get the specified number of elements. Omit the second argument, `n`, to get a one-element array
-
-```py
-
-
-from copy import deepcopy
-
-
-def max_n(arr, n=1):
- numbers = deepcopy(arr)
- numbers.sort()
- numbers.reverse()
- return numbers[:n]
-
-
- ```
-
-View Examples
-
-```py
-
-max_n([1, 2, 3]) # [3]
-max_n([1, 2, 3], 2) # [3,2]
-
-```
-
-
-
:arrow_up: Back to top
-
-### min_n
-
-Returns the `n` minimum elements from the provided list. If `n` is greater than or equal to the provided list's length, then return the original list(sorted in ascending order).
-
-Use `list.sort()` combined with the `deepcopy` function from the inbuilt `copy` module to create a shallow clone of the list and sort it in ascending order. Use `[:n]` to get the specified number of elements. Omit the second argument, `n`, to get a one-element array
-
-```py
-
-
-from copy import deepcopy
-
-
-def min_n(arr, n=1):
- numbers = deepcopy(arr)
- numbers.sort()
- return numbers[:n]
-
-
- ```
-
-View Examples
-
-```py
-
-min_n([1, 2, 3]) # [1]
-min_n([1, 2, 3], 2) # [1,2]
-
-```
-
-
-
:arrow_up: Back to top
-
## Credits
diff --git a/tag_database b/tag_database
index 565a2403b..bdc88a214 100644
--- a/tag_database
+++ b/tag_database
@@ -1,3 +1,4 @@
+average:math
chunk:list
compact:list
count_occurences:list