Cody Bable

Generation

generate functionTue, 25 Apr 2023

calculate the product of m x n but without using the * operator

def multiply(m, n): product = 0 while n > 0: product = add(m, product) n -= 1 return product multiply(5, 4)

Questions about programming?Chat with your personal AI assistant