Question: how does density affect whether an object sinks or floats?
Answer: Density is the only thing affecting whether something floats or sinks. If an object has a higher density than the fluid it is in (fluid can mean liquid or gas), it will sink. If it has a lower density, it will float. Density is determined by an object's mass and volume.