How to make a function return a value
I'm writing a Sage Function for the Euclid's Algorithm. However when I run it, it doesn't compute any values. Please let me know what is wrong or anyway to help.
def euclide(a,b): r=a%b print (a,b,r) while r !=0: a=b; b=r r=a%b print (a,b,r) sage: euclide(12,5) (12, 5, 2) (5, 2, 1) (2, 1, 0)