The nucleus of an iron atom is spherical and his radius is $4.6x10^{-15}m$.
The mass of the nucleus is $9.5x10^{-26} kg$.
What is the density of the nclear material?
(express your anwer in metric tons per cubic cm)
The volume of a sphere is: \begin{equation}Vol = \frac{4}{3}*\pi*r^3\end{equation} The density is: \begin{equation*}\rho = \frac{mass}{volume}\end{equation*}
# Calculations
import numpy as np
radius_Fe = 4.6e-15 # m
mass_Fe = 9.5e-26 # kg
vol_Fe = (4/3) * np.pi * radius_Fe**3
rho_Fe_kg_m3 = mass_Fe / vol_Fe
print(f'The density in kg/m3 is {rho_Fe_kg_m3:0.1e} kg/m3')
1 metric Ton = 1000 kg
rho_Fe_ton_m3 = rho_Fe_kg_m3 / 1000
print(f'The density in Ton/m3 is {rho_Fe_ton_m3:0.1e} Ton/m3')
$1 m^3 = 100 * 100 * 100 cm^3 = 10^6 cm^3$
rho_Fe_ton_cm3 = rho_Fe_ton_m3 / 1e6
print(f'The density in Ton/cm3 is {rho_Fe_ton_cm3:0.1e} Ton/cm3')
Alternatively we can use the phyton library Pint to solve the conversion problem, all calculations and conversions are done internally and the values are displayed with the correct units.
# Same using Pint unit conversion lybrary
from pint import UnitRegistry
ureg = UnitRegistry()
_rho_Fe_kg_m3 = rho_Fe_kg_m3 * (ureg.kg / ureg.m**3 )
_rho_Fe_ton_cm3 = _rho_Fe_kg_m3.to(ureg.metric_ton / ureg.cm**3 )
print(f'{_rho_Fe_kg_m3:5.2}')
print(f'{_rho_Fe_ton_cm3:5.2}')