Insect combinatorics challenge
Using nonlocal rather than global is certainly good, but better yet would be returning values.

def paths(m, n):
    def find_number_of_paths(x, y):
        if x == 0 and y == 0:
            return 1

        ret = 0

        if x &gt; 0:
            ret += find_number_of_paths(x-1, y)

        if y &gt; 0:
            ret += find_number_of_paths(x, y-1)

        return ret

    return find_number_of_paths(m-1, n-1)


That lets us elide the outer function entirely:

def paths(x, y):
    if x == 1 and y == 1:
        return 1

    ret = 0

    if x &gt; 1:
        ret += paths(x-1, y)

    if y &gt; 1:
        ret += paths(x, y-1)

    return ret


It's a bit strange to critique this since "no closed-form solution" basically means no good solution. There are ways of speeding this up, though, that avoid that. A trivial one is memoization:

_paths_cache = {(1, 1): 1}
def paths(x, y):
    if (x, y) in _paths_cache:
        return _paths_cache[x, y]

    ret = 0

    if x &gt; 1:
        ret += paths(x-1, y)

    if y &gt; 1:
        ret += paths(x, y-1)

    _paths_cache[x, y] = ret
    return ret