#------------------------------------------------------------------------------- # Euclid.py # Find the GCD of two positive integers by Euclid's algorithm #------------------------------------------------------------------------------- def GCD(a, b): """ returns the GCD of two positive integers a and b """ if a0: a = b b = r r = a%b # print( a, b, r) return b # main program print('Enter two positive integers') a = int(input('First: ')) b = int(input('Second: ')) print( 'GCD('+str(a)+', '+str(b)+') = '+str(GCD(a, b)) )