Question: def hRec ( n ) : if ( n = = 0 ) : return 0 ; else: return hRec ( int ( n /

def hRec(n):
if (n ==0):
return 0;
else:
return hRec(int(n/10))+ n%10
What is the output for each function call
(a) Function call hRec(736). Output:
(b) Function call hRec(12345). Output:
1.26,25
2.16,15
3.36,35
446,45

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!