Question: Which function correctly encodes the multiplication of 2 positive numbers a and b recursively? ( i . e . mult ( a , b )
Which function correctly encodes the multiplication of positive numbers a and b recursively? ie multab should return the numerical equivalent of ab Hint: Recall that multiplication is repeated addition.
Group of answer choices
def multa b:
if b :
return b
else:
return b multa b
def multa b:
if a :
return
else:
return b multa b
def multa b:
if a :
return b
else:
return b multa b
def multa b:
if a :
return a
else:
return b multa b
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
