Lesson 1 of 16
Density and Specific Gravity
Density and Specific Gravity
Density is the mass per unit volume of a substance:
where is mass in kilograms and is volume in cubic metres. The SI unit of density is kg/m³.
Common Densities
| Substance | Density (kg/m³) |
|---|---|
| Air (sea level) | 1.225 |
| Ethanol | 789 |
| Water (4 °C) | 1000 |
| Seawater | ~1025 |
| Mercury | 13 546 |
Specific Gravity
Specific gravity (SG) is the dimensionless ratio of a substance's density to that of pure water at standard conditions ():
A specific gravity greater than 1 means the substance is denser than water and will sink; less than 1 means it will float.
Examples
| Substance | (kg/m³) | SG |
|---|---|---|
| Ethanol | 789 | 0.789 |
| Water | 1000 | 1.000 |
| Mercury | 13 546 | 13.546 |
Your Task
Implement density(mass, volume) that returns density in kg/m³, and specific_gravity(rho) that returns the dimensionless specific gravity relative to water.
Python runtime loading...
Loading...
Click "Run" to execute your code.