Answer
The theorem does not apply, because f is not continuous on $[0,\pi]$.
Work Step by Step
The Mean Value Theorem
If $f$ is continuous on the closed interval $[a, b]$ and differentiable on the open interval $(a, b)$ ,
then there exists a number $c$ in $(a, b)$ such that$ f^{\prime}(c)=\displaystyle \frac{f(b)-f(a)}{b-a}$
---
First of all, to apply the theorem,$ f(x)$ should be continuous on $[0,\pi].$
But, since $\tan x$ is not defined for $x=\displaystyle \frac{\pi}{2}$, which belongs to the interval,
f is not continuous on $[0,\pi]$.
The theorem does not apply.