summaryrefslogtreecommitdiffstats
path: root/docs/source/_static/QuickStart/simple_submission_4/euclid.py
blob: 064d1e594c7d4fa45b317b2334aa00f9fabbc458 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# assessment A
# student id: 4

def gcd(x,y):
    if x > y:
        small = y
    else:
        small = x
    for i in range(1, small+1):
        if((x % i == 0) and (y % i == 0)):
            g = i
              
    return g

# calling function with parameters and printing it out
print(gcd(8,12))