MCPcopy Create free account
hub / github.com/ndleah/python-mini-project / lcm

Function lcm

Smart_Calculator/calculator.py:18–24  ·  view source on GitHub ↗
(a,b)

Source from the content-addressed store, hash-verified

16 return a % b
17
18def lcm(a,b):
19 if a<0 or b<0: return
20 L = a if a > b else b
21 while L <= a * b:
22 if L%a == 0 and L%b ==0:
23 return L
24 L+=1
25
26def hcf(a,b):
27 if a<0 or b<0: return

Callers 1

test_lcm_functionMethod · 0.90

Calls

no outgoing calls

Tested by 1

test_lcm_functionMethod · 0.72