Skip to content

Instantly share code, notes, and snippets.

@Satjpatel
Created May 18, 2020 15:47
Show Gist options
  • Save Satjpatel/125cde543af6c15d51b394d587211d22 to your computer and use it in GitHub Desktop.
Save Satjpatel/125cde543af6c15d51b394d587211d22 to your computer and use it in GitHub Desktop.
Basic Python Code for GCD
def gcd(m,n):
cf = []
for i in range(1,min(m,n)):
if (m%i)==0 and (n%i)==0 :
cf.append(i)
return cf[-1]
x = gcd(45,135)
print(x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment