Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def least_common_multiple(a, b):
if a > b:
greater = a
elif b > a:
greater = b
while(True):
if ((greater % a == 0) and (greater % b == 0)):
lcm = greater
break
greater = greater + 1
return lcm
print(least_common_multiple(10, 12))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment