A rock has a mass of 20 grams and a volume of 30 milliliters. What is the density of this rock?
Every time a problem asks you to find the density of a substance, your goal will essentially be to determine the mass of one unit of volume of said substance.
That is exactly what density tells you -- the mass associated with one unit of volume of a given substance.
In your case, the volume of the sample is expressed in milliliters, so one unit of volume will be
Now, your rock has a volume of
That means that the ratio that exists between the mass and volume of this sample will be identical to the ratio that exists between the mass and volume of any sample.
You can thus say that
#1 color(red)(cancel(color(black)("mL"))) * "20 g"/(30 color(red)(cancel(color(black)("mL")))) = "0.67 g"#
#"density" = rho = color(green)(|bar(ul(color(white)(a./a)"0.67 g mL"^(-1)color(white)(a/a)|)))#
I'll leave the answer rounded to two sig figs.