MCPcopy Create free account
hub / github.com/geekcomputers/Python / product

Function product

Multiply.py:1–11  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

1def product(a, b):
2 # Handle negative values
3 if b < 0:
4 return -product(a, -b)
5
6 if a < b:
7 return product(b, a)
8 elif b != 0:
9 return a + product(a, b - 1)
10 else:
11 return 0
12
13
14a = int(input("Enter first number: "))

Callers 2

findPasswordFunction · 0.85
Multiply.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected