Question: For the questions below, use the following recursive method. def question 1 _ 2 ( x , y ) { if ( x = =

For the questions below, use the following recursive method.
def question1_2( x, y)
{
if (x == y):
return 0
else:
return question1_2(x-1, y)+1;
}
If the method is called as question1_2(8,3), what is returned?

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!