Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created April 17, 2021 17:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/98628afc8b31be483f04bf56d1caa237 to your computer and use it in GitHub Desktop.
Save parzibyte/98628afc8b31be483f04bf56d1caa237 to your computer and use it in GitHub Desktop.
"""
Ayudantes
https://parzibyte.me/blog/2021/03/30/python-maximo-comun-divisor/
https://parzibyte.me/blog/2021/04/01/python-minimo-comun-multiplo/
"""
def maximo_comun_divisor(self, a, b):
temporal = 0
while b != 0:
temporal = b
b = a % b
a = temporal
return a
def minimo_comun_multiplo(self, a, b):
return (a * b) / self.maximo_comun_divisor(a, b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment