Blog post for WSQ12 which is Greatest Common Divisor or gcd for short.

QUIZ12

What i do here is, ask the user for 2 values, declare a function, and then use a loop which then changes the value of “x” to “y” and “y” to the remainder of the division from “x” and “y”, while “y” exists or has a value.

Then return “x”.

I honestly got this code from:

http://www.programiz.com/python-programming/examples/hcf

But i do try to understand the code and give it a use.

Besides i’m not that good at math…

CC BY 4.0 WSQ 12 by chozacastro is licensed under a Creative Commons Attribution 4.0 International License.