Written by Emily Leng
Head over to the Python Editor and print the greatest common factor between args[0]
and args[1]
.
Defining a function that finds a GCF will be of use.
def gcd(x, y):
while y != 0:
(x, y) = (y, x % y)
return x
print gcd(args[0],args[1])
programming_beats_calculating_by_hand_any_day