To find the scale factor used to create the printed photo of the sandbox, we start by comparing the sides of the actual sandbox to the printed photo.
- Length of the sides of the actual hexagon: 40 inches
- Length of the sides of the printed hexagon: 4 inches
The scale factor is determined by the ratio of the length of the sides in the photo to the length of the sides in reality:
\[ \text{Scale Factor} = \frac{\text{Length in Photo}}{\text{Actual Length}} = \frac{4 \text{ inches}}{40 \text{ inches}} \]
Now we can simplify this fraction:
\[ = \frac{4}{40} = \frac{1}{10} = 0.1 \]
Thus, the scale factor that was used to create the printed photo of the sandbox is:
\[ \boxed{0.1} \]