Loading topic
% in Python is the remainder operator. Up to now the inputs have been7 min readgcd(a, b) function and the convention that gcd(0, 0) = 0. You should also be comfortable with Python's integer division // and with reading short proofs. Prime factorization appears as one way t7 min reada and b, it finds integers x and y such that a*x + b*y = gcd(a, b). These coefficients answer questions the plain GCD cannot.7 min readextended_gcd(a, b) returns: a triple (g, x, y) with a*x + b*y == g. It also assumes you are comfortable with the % operator and with congruence notation, where a ≡ b (mod m) means that m divi7 min read