Question: Describe what this function does. Try different numbers as input. def test(num): if num > 0: return test(num-2) * test(num-1) else: return 0

Describe what this function does. Try different numbers as input.

def test(num): if num > 0: return test(num-2) * test(num-1) else: return 0

def test(num): if num > 0: return test(num-2) * test(num-1) else: return 0

Step by Step Solution

3.50 Rating (167 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

This method recursively calls itself by calling it... View full answer

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 Introduction to Computing and Programming in Pytho Questions!