The equation that is applicable is as follows:
F = G * M * m ÷ r^2 F = G * M * m ÷ r^2
Weight = m * g
Weight = F m * g = G * M * m ÷ r^2 g = G * M ÷ r^2
Now you can determine the mass of the planet. For mars, r = 3,400,000 = 3.4 * 10^6 meters
0.38 = 6.67 * 10^-11 * M ÷ (3.4 * 10^6)^2 0.38 = 6.67 * 10^-11 * M ÷ 1.156 * 10^13
3.8 = 6.67 * 10^-11 * M ÷ (3.4 * 10^6)^2 0.38 = 6.67 * 10^-11 * M ÷ 1.156 * 10^13 Multiply both sides by 1.156 * 10^13
1.156 * 10^13 * 0.38 = 6.67 * 10^-11 * M Divide both sides by 6.67 * 10^-11
1.156 * 10^13 * 0.38 ÷ 6.67 * 10^-11 = M The answer is approximately 6.586 * 10^22 kg The actual mass of Mars is 6.42 * 10^23 kg. I think the acceleration of gravity on Mars is 3.8 m/s^2
1.156 * 10^13 * 3.8 ÷ 6.67 * 10^-11 = M The answer is approximately 6.586 * 10^23 kg