def aPowerN(a,n):
    """
    Recursive function that calculates a to the power of n
    @param int a: an integer number
    @param int n: exponent
    @rtype: int
    >>> aPowerN(2,11)
    2048
    >>> aPowerN(4,4)
    256
    >>> aPowerN(10,3)
    1000
    """
    if n == 0:
        return 1
    elif n == 1:
        return a
    else:
        return a * aPowerN(a, n - 1)


if __name__ == '__main__':
    import doctest
    doctest.testmod()
