<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#euclid.py
"""Lecture example to demonstrate while-loop in Euclid's Algorithm for finding
the greatest common factor of two positive integers.
Trivia: it is one of the oldest recorded algorithms (~200B.C.)
"""

a= 8
b= 12
while a!=b:
    if a&gt;b:
        a= a - b
    else:
        b= b - a
print(a)
</pre></body></html>