1#Python program for calculating the H.C.F. of two numbers
2
3# define a function
4def calc_the_hcf(x, y):
5
6#Select the smaller number
7 if x > y:
8 smaller = y
9 else:
10 smaller = x
11 for i in range(1, smaller+1):
12 if((x % i == 0) and (y % i == 0)):
13 hcf = i
14 return hcf
15
16num1 = 35
17num2 = 12
18
19print("The H.C.F. is", calc_the_hcf(num1, num2))
20