Cody Bable

Generation

generate functionTue, 25 Apr 2023

calculate the product of m x n but without using the * operator. Use both functions below def add(m, n): if m == 0: return n if n == 0: return m return add(m, succ(n)) def succ(n): return n +1

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

Questions about programming?Chat with your personal AI assistant