def find_gcd(num1, num2):
# Find the smaller number between num1 and num2
if num1 < num2:
smaller = num1
else:
smaller = num2
# Loop through possible divisors of the smaller number
for i in range(1, smaller+1):
if num1 % i == 0 and num2 % i == 0:
gcd = i
return gcd
# Example usage
print("GCD of 12 and 18 is", find_gcd(12, 18))
GCD of 12 and 18 is 6
find_gcd()
` function takes two numbers as input parameters and returns their GCD. The function works by finding the smaller number between the two, and then looping through possible divisors of the smaller number until it finds the greatest common divisor that is also a divisor of the other number.