function is defined, which takes two arguments a and b and uses the Euclidean algorithm to find the greatest common divisor of the two numbers. The while loop iterates as long as b is not equal to 0. On each iteration, the variables a and b are updated using the formula: a = b and b = a % b. After the loop terminates, the value of a will contain the greatest common divisor.
We set two numbers num1 = 36 and num2 = 48, then call the gcd() function with these numbers and store the result in the result variable. Finally, we print the message with the greatest common divisor of the two numbers.