number_triangle.py
def base_representation(num, base):
    """
    This function generates the base representation of a number in a given base.
    :param num: An integer.
    :param base: The desired base.
    :return: The representation of the number in the given base.
    """
    r = []
    t = num
    while(t!=0):
        r = r + [int(np.mod(t,base))]
        t = t - np.mod(t,base)
        t = t/base
    s = str(r[::-1][0])
    for k in r[::-1][1:]:
        s = s + ',' + str(k)

    return s

    This function generates the base representation of a number in a given base.
    :param num: An integer.
    :param base: The desired base.
    :return: The representation of the number in the given base.
    
This function generates the base representation of a number in a given base.
This function generates the base representation of a number in a given base .
def base_representation(num, base):
    r = []
    t = num
    while(t!=0):
        r = r + [int(np.mod(t,base))]
        t = t - np.mod(t,base)
        t = t/base
    s = str(r[::-1][0])
    for k in r[::-1][1:]:
        s = s + ',' + str(k)
    return s
def base_representation ( num , base ) : r = [ ] t = num while ( t != 0 ) : r = r + [ int ( np . mod ( t , base ) ) ] t = t - np . mod ( t , base ) t = t / base s = str ( r [ : : - 1 ] [ 0 ] ) for k in r [ : : - 1 ] [ 1 : ] : s = s + ',' + str ( k ) return s
This function generates the base representation of a number in a given base.
This function generates the base representation of a number in a given base .
"""
    This function generates the base representation of a number in a given base.
    :param num: An integer.
    :param base: The desired base.
    :return: The representation of the number in the given base.
    """
The representation of the number in the given base.
The representation of the number in the given base .
num
None
base
The desired base.
The desired base .