Write a python function that returns the Highest Common Factor of two given numbers


Topic: Write a python function that returns the Highest Common Factor of two given numbers

Solution

def calculate_hcf(x1, x2):
    if x1 == 0:
        return x2
    else:
        return hcf(x2 % x1, x1)



List all Python Programs