Answer
The solution is
$$\lim_{x\to1^-}(1-x)\tan\left(\frac{\pi x}{2}\right)=\frac{2}{\pi}.$$
Work Step by Step
We will use L'Hopital's rule to calculate this limit. "LR" wll stand for "Apply L'Hopital's rule"
$$\lim_{x\to1^-}(1-x)\tan\left(\frac{\pi x}{2}\right)=\lim_{x\to1^-}\frac{1-x}{\cot\left(\frac{\pi x}{2}\right)}=\left[\frac{1-1^-}{\cot\frac{\pi\cdot1^-}{2}}\right]=\left[\frac{0}{0}\right][\text{LR}]=\lim_{x\to 1^-}\frac{(1-x)'}{(\cot\frac{\pi x}{2})'}=\lim_{x\to1^-}\frac{-1}{-\frac{1}{\sin^2\frac{\pi x}{2}}\left(\frac{\pi x}{2}\right)'}=\lim_{x\to1^-}\frac{2}{\pi}\sin^2\frac{\pi x}{2}=\frac{2}{\pi}\sin^2\frac{\pi \cdot1^-}{2}=\frac{2}{\pi}.$$