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

Function hcf

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

Source from the content-addressed store, hash-verified

24 L+=1
25
26def hcf(a,b):
27 if a<0 or b<0: return
28 H = a if a<b else b
29 while H >= 1:
30 if a%H == 0 and b%H ==0:
31 return H
32 H-=1
33
34def extract_from_text(text):
35 l = []

Callers 1

test_hcf_functionMethod · 0.90

Calls

no outgoing calls

Tested by 1

test_hcf_functionMethod · 0.72