Multiplication Made Simple

Chris wrote a multiplication function which he believes is the next big thing.

1
2
3
4
def mult(a,b):
    if b == 0:
        return 0
    return a + mult(a,b-1)

Which of the options best describes​ the domain of \(a\) and \(b\) respectively, such that the above function works as intended?

×

Problem Loading...

Note Loading...

Set Loading...