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("")