Suppose a planet has a mass M and radius R but a non-uniform density rho(r) = A*r. What is the value of A? What is the magnitude of the gravitational field inside and outside the planet?
Of course there's a numerical model using python and random numbers.
Here is the code
https://trinket.io/glowscript/51bacdd2f735
Here is my uniform density Gauss's law problem
https://youtu.be/dAFc78eXkd0
For homework you might want to look at the tunneling through the Earth video.
https://youtu.be/04U6wmOOwRE