Answer
The mass of the sun is $2.01\times 10^{30}~kg$.
Work Step by Step
We can convert the earth's orbital period to units of seconds.
$T = (1.0~year)[\frac{(365~days)(24~hours/day)(3600~s/hr)}{1~year}]$
$T = 3.154\times 10^7~s$
We then use the earth's orbital period $T$ and the earth's orbital radius $R$ to find the mass of the sun $M_s$.
$T^2 = \frac{4\pi^2~R^3}{G~M_s}$
$M_s = \frac{4\pi^2~R^3}{G~T^2}$
$M_s = \frac{(4\pi^2)(1.50\times 10^{11}~m)^3}{(6.67\times 10^{-11}~m^3/kg~s^2)(3.154\times 10^7~s)^2}$
$M_s = 2.01\times 10^{30}~kg$
The mass of the sun is $2.01\times 10^{30}~kg$.