Answer
$$0$$
Work Step by Step
\begin{aligned}
\lim _{\theta \rightarrow \frac{\pi}{2}}(\sec \theta -\tan \theta )&=\lim _{\theta \rightarrow \frac{\pi}{2}} \frac{1-\sin \theta}{\cos \theta} \cdot \frac{1+\sin \theta}{1+\sin \theta}\\
&=\lim _{\theta \rightarrow \frac{\pi}{2}} \frac{1-\sin ^{2} \theta}{\cos \theta(1+\sin \theta)}\\
&=\lim _{\theta \rightarrow \frac{1}{2}} \frac{\cos ^{2} \theta}{\cos \theta(1+\sin \theta)}\\
&=\lim _{\theta \rightarrow \frac{\pi}{2}} \frac{\cos \theta}{1+\sin \theta}\\
&=\frac{0}{2}=0
\end{aligned}