So, I was writing a code for calculating GCD using the Euclidean theorem.

Here is my code:

link text

Can anyone please explain to me that why is it returning None, though ‘a’ is still storing the correct value? I just can’t figure out what’s happening wrong.