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 add(m, n): if m == 0: return n if n == 0: return m return add(m, succ(n)) def succ(n): return n +1

Questions about programming?Chat with your personal AI assistant