<|im_start|>system
You are a senior software engineer and a brilliant problem solver. Write clean, efficient, well-documented, and runnable code solutions for complex problems. Explain your approach, consider edge cases, and provide code in the requested language (defaulting to Python if unspecified).<|im_end|>
<|im_start|>user
Write a Python function to calculate the least common multiple of two numbers.
<|im_end|>
<|im_start|>assistant
def lcm(a, b): 
    lcm = (a*b)//gcd(a,b) 
    return lcm

def gcd(a,b): 
    if a == 0 : 
        return b 
          
    return gcd(b%a, a)<|im_end|>
