Answer
There are two possible geometric sequences:
$\text{Sequence 1:} \quad a_n=-8 \left(\frac{1}{2}\right)^{n-1}\quad\text{where} \quad a_4=-1\\$
$\text{Sequence 2:} \quad a_n=-8 \left(-\frac{1}{2}\right)^{n-1}\quad\text{where} \quad a_4=1\\$
Work Step by Step
The $n^{th}$ term of a geometric sequence given by the formula:
$$a_n=a_1 \cdot r^{n-1}$$
where, $r$ is the common ratio, $a_1$ is the first term, and $r=\dfrac{a_n}{a_{n-1}}$ (the quotient of a term and the term preceding it).
The first term is $-8$ so $a_1=-8$, and the seventh term is $-\dfrac{1}{8}$ so $a_7=\dfrac{1}{8}$.
Using the formula for the $n^{th}$ term of a geometric sequence, we have:
$$a_7=a_1r^6 $$
Plug $-8$ for $a_1$ and $\dfrac{-1}{8}$ for $a_7$ in the above formula to compute the common ratio $r$.
\begin{align*}\dfrac{-1}{8}&=-8r^6\\
-\frac{1}{8}\left(\frac{-1}{8}\right)&=r^6\\
\frac{1}{64}&=r^6\\
\left(\frac{1}{2}\right)^6&=r^6\\
\pm\sqrt[6]{\left(\frac{1}{2}\right)^6}&=r\\
\pm\dfrac{1}{2}&=r
\end{align*}
There are two possible values of $r$ so there are two different geometric sequences that could have the $a_1=-8$ and $a_7=-\frac{1}{8}$, and these are:
\begin{align*}
\text{Sequence 1:} \quad a_n&=a_1\cdot \left(\frac{1}{2}\right)^{n-1}\implies a_n=-8 \left(\frac{1}{2}\right)^{n-1}\\
\text{Sequence 2:} \quad a_n&=a_1\cdot \left(-\frac{1}{2}\right)^{n-1}\implies a_n=-8 \left(-\frac{1}{2}\right)^{n-1}\\
\end{align*}
Solving for the fourth term of each sequence yields:
Sequence 1: $a_4=-8\left(\dfrac{1}{2}\right)^{4-1} \implies a_4=-1$
Sequence 2: $a_4=-8\left(-\dfrac{1}{2}\right)^{4-1} \implies a_4=1$
Therefore, the nth term of the given geometric sequence is:
$a_n=-8(\dfrac{1}{2})^{n-1} $