Search for question
Question

Task2: Write a Python program that defines a function ackermann to calculate the Ackermann function. Prompt the user to input two non-negative integers (m,n) and display the result using the defined function. The Ackermann function is defined as follows. Note: Don't include the input statement inside the function. A(m, n) = n+1 A (m - 1,1) (A(m-1,A(m, n-1)) Required output (stick to the input numbers): Enter non-negative m: 31 Enter non-negative n: 2 29 if m=0 if m> 0 and n = 0 if m> 0 and n>0

Fig: 1