People who code: we want your input. Take the Survey

New answers tagged

1

You are only moving in one direction for each axis. coin_x = random.randint(1,2) # Move on x axis if coin_x == HEAD: b[step,0]+=1 elif coin_x == TAIL: b[step,0]-=1 # Move on y axis coin_y = random.randint(1,2) if coin_y == HEAD: b[step,1]+=1 elif coin_y == TAIL: b[step,1]-=1 ```


Top 50 recent answers are included