Question: What does the following function print for n 1 = 1 2 and n 2 = 1 5 ? def div ( n 1 ,

What does the following function print for n1=12 and n2=15?
def div(n1, n2):
if n1n2==0 :
return n2
else:
return div(n2,n1%n2)
print (div (12,15))
a.12
b.15
c.3
d.9
 What does the following function print for n1=12 and n2=15? def

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 Databases Questions!