The astronomical unit (AU, equal to the mean radius of the Earth’s orbit) is 1.4960E11 m, and a year is 3.1557E7 s. Newton’s gravitational constant is G=6.6743E-11 m^3kg^-1s^-2. Calculate the mass of the Sun in kilograms. (Recalling or looking up the mass of the Sun does not constitute a solution of this problem.)

First compute the velocity of the earth in its orbit

V = 2 pi R/P
where P is the period of the orbit in seconds, and R = 1.4960*10^11 m

You can now solve for the sun's mass. M, by setting the gravity force equal to the centripetal force.