summaryrefslogtreecommitdiff
path: root/Problem15.py
blob: 5bc1d1e30e0e5d501a0a3a4f370570598e10dd95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
counter = 0
size = 20
def lattice(x,y):
    global counter
    if x > 0: #moves right
        lattice(x-1,y)
        counter+=1
    if y > 0: #moves down
        lattice(x,y-1)
        counter+=1
    print(counter)
lattice(size,size)
print(counter/(size+1))
input("")