Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Próba1 solution in Creative category for Open Labyrinth by 13lvlna2wyspach
import random
def checkio(m):
x = 1
y = 1
a=''
while (x!=10 or y!=10):
q=random.randrange(1,5,1)
if q==1 and m[x][y+1]==0:
a+='E'
y+=1
if q==2 and m[x+1][y]==0:
a+='S'
x+=1
if q==3 and m[x][y-1]==0:
a+='W'
y-=1
if q==4 and m[x-1][y]==0:
a+='N'
x-=1
return(a)
Nov. 25, 2016
Comments: