def Euclidean_algorithm(a,b): if b==0: return a mod=a%b print(a,b,mod) if mod==0: print ("Checkered flag") #to show that the progran reaches the expected point return b Euclidean_algorithm(b,mod) def Euclidean(a,b): found=False if b==0: return a mod=a%b print(a,b,mod) if mod!=0: Euclidean(b,mod) else: found=True result=b if found: print("checkered flag") print(result,mod) return result def Euclid_LP (a,b): if b==0: return a else: Euclid_LP(b,a%b) greater=input("Greater number ") smaller=input("Smaller number ") greater=int(greater) smaller=int(smaller) result1=Euclidean_algorithm(greater,smaller) result2=Euclidean(greater,smaller) result3=Euclid_LP(greater,smaller) print("The results are ",result1,result2,result3)