To find the height \( h \) of the square pyramid using the Pythagorean theorem, we will set up the problem based on the information given.
We have:
- The slant height \( l = 25 \) ft.
- The half of the front base edge, which is half of \( 40 \) ft, so \( \frac{40}{2} = 20 \) ft.
In the right triangle formed by the height \( h \), half the base length \( 20 \) ft, and the slant height \( 25 \) ft, we can apply the Pythagorean theorem:
\[ l^2 = h^2 + \left(\frac{\text{base edge}}{2}\right)^2 \]
Substituting the values we have:
\[ 25^2 = h^2 + 20^2 \]
Calculating the squares:
\[ 625 = h^2 + 400 \]
Now, isolate \( h^2 \):
\[ h^2 = 625 - 400 \] \[ h^2 = 225 \]
Taking the square root:
\[ h = \sqrt{225} = 15 \text{ ft} \]
So the height of the square pyramid is \( \boxed{15.0 \text{ ft}} \).