To find the initial number of weeds before Grant used the weed killer, we need to evaluate the function \( f(x) \) at \( x = 0 \).
The function is given by:
\[ f(x) = 100 \cdot \left(\frac{1}{2}\right)^x \]
Now, plug in \( x = 0 \):
\[ f(0) = 100 \cdot \left(\frac{1}{2}\right)^0 \]
Since \( \left(\frac{1}{2}\right)^0 = 1 \):
\[ f(0) = 100 \cdot 1 = 100 \]
Therefore, the number of weeds in the garden before Grant used the weed killer was 100.