Let \( A = \lim_{x \to 1} (2-x)^{\tan {\frac{\pi x}{2}}}\)
\( \ln {A} = \lim_{x \to 1} \ln {(2-x)^{\tan {\frac{\pi x}{2}}}} \)
\( \ln {A} = \lim_{x \to 1} \ln {(2-x)} (\tan {\frac{\pi x}{2}}) \)
\( \ln {A} = \lim_{x \to 1} \frac{ \ln {(2-x)}}{\cot {\frac{\pi x}{2}}} \)
Apply L'Hospitals Rule
\( \ln {A} = \lim_{x \to 1} \frac{\frac{1}{2-x}}{\frac{\pi}{2} \csc^{2} {\frac{\pi x}{2}}} \)
\( \ln {A} = \frac{2}{\pi} \)
\( A = e^{\frac{2}{\pi}} \)
\( \lim_{x \to 1} (2-x)^{\tan {\frac{\pi x}{2}}} = e^{\frac{2}{ \pi}} \)