This WSW was a littel tricky because i had to look for the algorith in google. Here is the code working:

If you want to see my code in Hithub is on this link:
https://github.com/Jocapear/TC1014/blob/master/WSQ12.py

CC BY 4.0 WSQ12 – Greatest common divisor by Jose Carlos Peñuelas Armenta is licensed under a Creative Commons Attribution 4.0 International License.