1.2 Density of a Gas#
Problem Statement:#
A container with a volume of 2 m³ holds 5 kg of nitrogen gas. Calculate the density of the gas.
## Solution:
# Given values
m = 5 # Mass of nitrogen in kg
V = 2 # Volume in m^3
# Density calculation
density = m / V
# Output the result
print(f"Density of the nitrogen gas: {density} kg/m^3")
Density of the nitrogen gas: 2.5 kg/m^3