Professional Documents
Culture Documents
Indirect
Indirect
funA(10)
def funA(n):
def funB(n)
if(n > 1)
9
print(n)
4
funA(n // 2) // 9 divided by 2 results to 4.5/4, then pass its answer to funA(n)
def funA(n):
def funB(n)
if(n > 1)
3
print(n)
1
funA(n // 2) // 3 divided by 2 results to 1.5/1, then pass its answer to funA(n)
def funA(n):
Output:
10 9 4 3 1
The yellow highlighted text represents the answer.
While the purple highlighted text represents the new value of n, passing onto another function.
And the sky blue highlighted text is where the program will be terminated because zero [0] doesn’t pass the
condition of funB().