Solve in Python:
In this kata, you have to define a function named **func** that will take a list as input.

You must try and guess the pattern how we get the output number and return list - **[output number,binary representation,octal representation,hexadecimal representation]**, but **you must convert that specific number without built-in : bin,oct and hex functions.**

Examples : 

```python
func([12,13,6,3,6,45,123]) returns - [29,'11101','35','1d']

func([1,9,23,43,65,31,63,99]) returns - [41,'101001','51','29']

func([2,4,6,8,10,12,14,16,18,19]) returns - [10,'1010','12','a']
```
def binary(x):
    result = []
    while True:
        remainder = x % 2
        result.append(str(remainder))
        x = x // 2

        if x == 0:
            break

    result.reverse()
    return "".join(result)

def octal(x):
    result = []
    while True:
        remainder = x % 8
        result.append(str(remainder))
        x = x // 8

        if x == 0:
            break

    result.reverse()
    return "".join(result)

def hexadecimal(x):
    result = []
    while True:
        remainder = x % 16

        if remainder == 10:
            result.append('a')
        elif remainder == 11:
            result.append('b')
        elif remainder == 12:
            result.append('c')
        elif remainder == 13:
            result.append('d')
        elif remainder == 14:
            result.append('e')
        elif remainder == 15:
            result.append('f')
        else:
            result.append(str(remainder))

        x = x // 16
        if x == 0:
            break

    result.reverse()
    return "".join(result)

import math

def func(l):
    average = math.floor(sum(l) / len(l))
    result = [average, binary(average), octal(average), hexadecimal(average)]
    return result