Math Question ... on string.

Divide by ten. If you get an even number (or zero) the segment goes right, if you get an odd number it goes left.