Coding challenge

Write some code to find two random points in 3D space. Choose each to be between 0 and 1, that is $(x,y,z)$ for the two points are random in $0\le x\le1$, $0\le y\le1$, and $0\le z\le1$. What expected distance exists between the two points? (From Cheney, p. 590.)

Type your code here:


Lua reference

See your results here: