-
-
Save parzibyte/98628afc8b31be483f04bf56d1caa237 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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