Skip to content
Snippets Groups Projects
Commit 1a15deb5 authored by Taddeus Kroes's avatar Taddeus Kroes
Browse files

Clarified function name.

parent b2981eeb
No related branches found
No related tags found
No related merge requests found
from ..node import ExpressionLeaf as L, OP_MUL, OP_DIV
def gcd(a, b):
def greatest_common_divisor(a, b):
"""
Return greatest common divisor using Euclid's Algorithm.
Return greatest common divisor of a and b using Euclid's Algorithm.
"""
while b:
a, b = b, a % b
......@@ -15,7 +15,7 @@ def lcm(a, b):
"""
Return least common multiple of a and b.
"""
return a * b // gcd(a, b)
return a * b // greatest_common_divisor(a, b)
def least_common_multiple(*args):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment