'''
Homework Week 2
Blane Moore
The Ackermann Function
'''

def ack(m,n):
    if m == 0:
        return  n + 1
    elif m > 0 and n == 0:
        return ack(m-1,1)
    elif m > 0 and n > 0:
        return ack(m-1, ack(m, n-1))
    else:
        print "Numbers can not be evaluated.  Please try again."


print ack(-5,2)


