Hello. I am trying to understand Recursives. Below is a code given us while taking a course. Can anyone explain to me (map out) what is going on inside this code step by step? the code gives the greatest common denominator. The answer is 4. I have been trying to work this out on my white board for the past several hours. I am just unclear as to what is going on inside to get this answer. Pete
1 2 3 4 5 |
def gcdRecur(a,b): if b = = 0 : return a return gcdRecur(b, a % b) print (gcdRecur( 8 , 12 )) |